feat: add readonly mode.
This commit is contained in:
@@ -75,11 +75,13 @@
|
|||||||
</u:PaginationButton>
|
</u:PaginationButton>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<u:NumericIntUpDown
|
<u:NumericIntUpDown
|
||||||
|
Name="PART_PageInput"
|
||||||
Value="{TemplateBinding CurrentPage, Mode=TwoWay}"
|
Value="{TemplateBinding CurrentPage, Mode=TwoWay}"
|
||||||
ShowButtonSpinner="False"
|
ShowButtonSpinner="False"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
MinWidth="{Binding $self.Bounds.Height}"
|
MinWidth="{Binding $self.Bounds.Height}"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
|
<TextBlock Name="PART_PageTextBlock" Text="{TemplateBinding CurrentPage}" VerticalAlignment="Center" IsVisible="False"/>
|
||||||
<TextBlock Text="/"
|
<TextBlock Text="/"
|
||||||
Margin="8 0"
|
Margin="8 0"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
@@ -99,6 +101,12 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<Style Selector="^.ReadOnly /template/ TextBlock#PART_PageTextBlock">
|
||||||
|
<Setter Property="IsVisible" Value="True"></Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.ReadOnly /template/ u|NumericIntUpDown#PART_PageInput">
|
||||||
|
<Setter Property="IsVisible" Value="False"></Setter>
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type u:PaginationButton}"
|
<ControlTheme x:Key="{x:Type u:PaginationButton}"
|
||||||
|
|||||||
Reference in New Issue
Block a user