fix: fix cross row flashing issue.
This commit is contained in:
@@ -119,7 +119,7 @@
|
|||||||
<Setter Property="Cursor" Value="No" />
|
<Setter Property="Cursor" Value="No" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type u:CalendarYearButton}" TargetType="u:CalendarYearButton">
|
<ControlTheme x:Key="{x:Type u:CalendarYearButton}" TargetType="u:CalendarYearButton">
|
||||||
<Setter Property="MinWidth" Value="32" />
|
<Setter Property="MinWidth" Value="32" />
|
||||||
<Setter Property="MinHeight" Value="32" />
|
<Setter Property="MinHeight" Value="32" />
|
||||||
@@ -161,106 +161,105 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type u:CalendarView}" TargetType="u:CalendarView">
|
<ControlTheme x:Key="{x:Type u:CalendarView}" TargetType="u:CalendarView">
|
||||||
<Setter Property="MinHeight" Value="260" />
|
<Setter Property="MinHeight" Value="260" />
|
||||||
<Setter Property="MinWidth" Value="260" />
|
<Setter Property="MinWidth" Value="260" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="u:CalendarView">
|
<ControlTemplate TargetType="u:CalendarView">
|
||||||
<Panel>
|
<Grid Background="{TemplateBinding Background}" RowDefinitions="Auto, *">
|
||||||
<Grid RowDefinitions="Auto, *">
|
<Grid
|
||||||
<Grid
|
Grid.Row="0"
|
||||||
Grid.Row="0"
|
Margin="0,0,0,16"
|
||||||
Margin="0,0,0,16"
|
ColumnDefinitions="Auto, Auto,*, Auto, Auto">
|
||||||
ColumnDefinitions="Auto, Auto,*, Auto, Auto">
|
<Button
|
||||||
|
Name="{x:Static u:CalendarView.PART_FastPreviousButton}"
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource CalendarViewFastForwardGlyph}"
|
||||||
|
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Name="{x:Static u:CalendarView.PART_PreviousButton}"
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
|
||||||
|
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Grid Grid.Column="2" ColumnDefinitions="*, *">
|
||||||
<Button
|
<Button
|
||||||
Name="{x:Static u:CalendarView.PART_FastPreviousButton}"
|
Name="{x:Static u:CalendarView.PART_YearButton}"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Center"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
Theme="{DynamicResource BorderlessButton}" />
|
||||||
<PathIcon
|
|
||||||
Width="12"
|
|
||||||
Height="12"
|
|
||||||
Data="{DynamicResource CalendarViewFastForwardGlyph}"
|
|
||||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Name="{x:Static u:CalendarView.PART_PreviousButton}"
|
Name="{x:Static u:CalendarView.PART_MonthButton}"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Center"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
Theme="{DynamicResource BorderlessButton}" />
|
||||||
<PathIcon
|
|
||||||
Width="12"
|
|
||||||
Height="12"
|
|
||||||
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
|
|
||||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Grid Grid.Column="2" ColumnDefinitions="*, *">
|
|
||||||
<Button
|
|
||||||
Name="{x:Static u:CalendarView.PART_YearButton}"
|
|
||||||
Grid.Column="0"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Foreground="{TemplateBinding Foreground}"
|
|
||||||
Theme="{DynamicResource BorderlessButton}" />
|
|
||||||
<Button
|
|
||||||
Name="{x:Static u:CalendarView.PART_MonthButton}"
|
|
||||||
Grid.Column="1"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
Foreground="{TemplateBinding Foreground}"
|
|
||||||
Theme="{DynamicResource BorderlessButton}" />
|
|
||||||
<Button
|
|
||||||
Name="{x:Static u:CalendarView.PART_HeaderButton}"
|
|
||||||
Grid.Column="0"
|
|
||||||
Grid.ColumnSpan="2"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
HorizontalContentAlignment="Center"
|
|
||||||
IsVisible="True" />
|
|
||||||
</Grid>
|
|
||||||
<Button
|
<Button
|
||||||
Name="{x:Static u:CalendarView.PART_NextButton}"
|
Name="{x:Static u:CalendarView.PART_HeaderButton}"
|
||||||
Grid.Column="3"
|
Grid.Column="0"
|
||||||
HorizontalContentAlignment="Left"
|
Grid.ColumnSpan="2"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
HorizontalAlignment="Stretch"
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
HorizontalContentAlignment="Center"
|
||||||
<PathIcon
|
IsVisible="True" />
|
||||||
Width="12"
|
|
||||||
Height="12"
|
|
||||||
Data="{DynamicResource CalendarItemNextIconGlyph}"
|
|
||||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
Name="{x:Static u:CalendarView.PART_FastNextButton}"
|
|
||||||
Grid.Column="4"
|
|
||||||
HorizontalContentAlignment="Left"
|
|
||||||
Foreground="{TemplateBinding Foreground}"
|
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
|
||||||
<PathIcon
|
|
||||||
Width="12"
|
|
||||||
Height="12"
|
|
||||||
Data="{DynamicResource CalendarViewFastBackwardGlyph}"
|
|
||||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Button
|
||||||
Name="{x:Static u:CalendarView.PART_MonthGrid}"
|
Name="{x:Static u:CalendarView.PART_NextButton}"
|
||||||
Grid.Row="1"
|
Grid.Column="3"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalContentAlignment="Left"
|
||||||
VerticalAlignment="Stretch"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
ColumnDefinitions="*, *, *, *, *, *, *"
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
RowDefinitions="*, Auto, *, *, *, *, *, *" />
|
<PathIcon
|
||||||
<Grid
|
Width="12"
|
||||||
Name="{x:Static u:CalendarView.PART_YearGrid}"
|
Height="12"
|
||||||
Grid.Row="1"
|
Data="{DynamicResource CalendarItemNextIconGlyph}"
|
||||||
HorizontalAlignment="Stretch"
|
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||||
VerticalAlignment="Stretch"
|
</Button>
|
||||||
ColumnDefinitions="*, *, *"
|
<Button
|
||||||
RowDefinitions="*, *, *, *" />
|
Name="{x:Static u:CalendarView.PART_FastNextButton}"
|
||||||
|
Grid.Column="4"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource CalendarViewFastBackwardGlyph}"
|
||||||
|
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Panel>
|
<Grid
|
||||||
|
Name="{x:Static u:CalendarView.PART_MonthGrid}"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ColumnDefinitions="*, *, *, *, *, *, *"
|
||||||
|
RowDefinitions="*, Auto, *, *, *, *, *, *" />
|
||||||
|
<Grid
|
||||||
|
Name="{x:Static u:CalendarView.PART_YearGrid}"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ColumnDefinitions="*, *, *"
|
||||||
|
RowDefinitions="*, *, *, *" />
|
||||||
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
Reference in New Issue
Block a user