Implementing themes for Calendar.
This commit is contained in:
@@ -4,20 +4,24 @@
|
||||
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<!-- CalendarControl -->
|
||||
<SolidColorBrush x:Key="CalendarSeperatorBrush">#D9D9D9</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldWorkingHoursBackgroundBrush">#ffffff</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldWorkingNonHoursBackgroundBrush">#f9f9f9</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldWorkingHoursBackgroundBrush">#32000000</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldSelectedBackgroundBrush">#ebebeb</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="WinoCalendarViewBorderBrush">Yellow</SolidColorBrush>
|
||||
|
||||
<!-- CalendarView -->
|
||||
<SolidColorBrush x:Key="WinoCalendarViewBorderBrush">#2e86de</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="WinoCalendarViewVisibleDayBackgroundBrush">#dfe4ea</SolidColorBrush>
|
||||
</ResourceDictionary>
|
||||
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
|
||||
<!-- CalendarControl -->
|
||||
<SolidColorBrush x:Key="CalendarSeperatorBrush">#000000</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldWorkingHoursBackgroundBrush">#262626</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldWorkingNonHoursBackgroundBrush">#1a1a1a</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldWorkingHoursBackgroundBrush">#32262626</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="CalendarFieldSelectedBackgroundBrush">#121212</SolidColorBrush>
|
||||
|
||||
<!-- CalendarView -->
|
||||
<SolidColorBrush x:Key="WinoCalendarViewBorderBrush">#3d3d3d</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="WinoCalendarViewVisibleDayBackgroundBrush">#4b4b4b</SolidColorBrush>
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<DataTemplate x:Key="FlipTemplate" x:DataType="models:DayRangeRenderModel">
|
||||
<Grid
|
||||
x:Name="RootGrid"
|
||||
Background="Transparent"
|
||||
ColumnSpacing="0"
|
||||
RowSpacing="0">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -110,6 +111,7 @@
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
ActiveCanvas="{x:Bind ActiveCanvas, Mode=TwoWay}"
|
||||
Background="Transparent"
|
||||
IsTabStop="False"
|
||||
ItemTemplate="{StaticResource FlipTemplate}"
|
||||
ItemsSource="{TemplateBinding DayRanges}"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
DefaultLabelPosition="Right">
|
||||
|
||||
<CommandBar.PrimaryCommands>
|
||||
<!-- Today -->
|
||||
<AppBarButton x:Name="PART_TodayButton" Label="Today">
|
||||
@@ -34,6 +35,7 @@
|
||||
<!-- Week -->
|
||||
<!-- TODO: Work week -->
|
||||
<AppBarToggleButton x:Name="PART_WeekToggle" Label="Week">
|
||||
|
||||
<AppBarToggleButton.Icon>
|
||||
<PathIcon Data="F1 M 4.921875 18.75 C 4.433594 18.75 3.966471 18.650717 3.520508 18.452148 C 3.074544 18.25358 2.683919 17.986654 2.348633 17.651367 C 2.013346 17.31608 1.746419 16.925455 1.547852 16.479492 C 1.349284 16.033529 1.25 15.566406 1.25 15.078125 L 1.25 4.921875 C 1.25 4.433594 1.349284 3.966473 1.547852 3.520508 C 1.746419 3.074545 2.013346 2.68392 2.348633 2.348633 C 2.683919 2.013348 3.074544 1.74642 3.520508 1.547852 C 3.966471 1.349285 4.433594 1.25 4.921875 1.25 L 15.078125 1.25 C 15.566406 1.25 16.033527 1.349285 16.479492 1.547852 C 16.925455 1.74642 17.31608 2.013348 17.651367 2.348633 C 17.986652 2.68392 18.25358 3.074545 18.452148 3.520508 C 18.650715 3.966473 18.75 4.433594 18.75 4.921875 L 18.75 15.078125 C 18.75 15.566406 18.650715 16.033529 18.452148 16.479492 C 18.25358 16.925455 17.986652 17.31608 17.651367 17.651367 C 17.31608 17.986654 16.925455 18.25358 16.479492 18.452148 C 16.033527 18.650717 15.566406 18.75 15.078125 18.75 Z M 15.048828 17.5 C 15.374349 17.5 15.685221 17.433268 15.981445 17.299805 C 16.277668 17.166342 16.538086 16.987305 16.762695 16.762695 C 16.987305 16.538086 17.16634 16.27767 17.299805 15.981445 C 17.433268 15.685222 17.5 15.37435 17.5 15.048828 L 17.5 4.951172 C 17.5 4.625651 17.433268 4.314779 17.299805 4.018555 C 17.16634 3.722332 16.987305 3.461914 16.762695 3.237305 C 16.538086 3.012695 16.277668 2.83366 15.981445 2.700195 C 15.685221 2.566732 15.374349 2.5 15.048828 2.5 L 4.951172 2.5 C 4.625651 2.5 4.314778 2.566732 4.018555 2.700195 C 3.722331 2.83366 3.461914 3.012695 3.237305 3.237305 C 3.012695 3.461914 2.833659 3.722332 2.700195 4.018555 C 2.566732 4.314779 2.5 4.625651 2.5 4.951172 L 2.5 15.048828 C 2.5 15.37435 2.566732 15.685222 2.700195 15.981445 C 2.833659 16.27767 3.012695 16.538086 3.237305 16.762695 C 3.461914 16.987305 3.722331 17.166342 4.018555 17.299805 C 4.314778 17.433268 4.625651 17.5 4.951172 17.5 Z M 5 14.375 L 5 5.625 C 5 5.455729 5.061849 5.309245 5.185547 5.185547 C 5.309245 5.06185 5.455729 5.000001 5.625 5 C 5.794271 5.000001 5.940755 5.06185 6.064453 5.185547 C 6.188151 5.309245 6.25 5.455729 6.25 5.625 L 6.25 14.375 C 6.25 14.544271 6.188151 14.690756 6.064453 14.814453 C 5.940755 14.938151 5.794271 15 5.625 15 C 5.455729 15 5.309245 14.938151 5.185547 14.814453 C 5.061849 14.690756 5 14.544271 5 14.375 Z M 9.375 14.375 L 9.375 5.625 C 9.375 5.455729 9.436849 5.309245 9.560547 5.185547 C 9.684244 5.06185 9.830729 5.000001 10 5 C 10.169271 5.000001 10.315755 5.06185 10.439453 5.185547 C 10.56315 5.309245 10.625 5.455729 10.625 5.625 L 10.625 14.375 C 10.625 14.544271 10.56315 14.690756 10.439453 14.814453 C 10.315755 14.938151 10.169271 15 10 15 C 9.830729 15 9.684244 14.938151 9.560547 14.814453 C 9.436849 14.690756 9.375 14.544271 9.375 14.375 Z M 13.75 14.375 L 13.75 5.625 C 13.75 5.455729 13.811849 5.309245 13.935547 5.185547 C 14.059244 5.06185 14.205729 5.000001 14.375 5 C 14.544271 5.000001 14.690755 5.06185 14.814453 5.185547 C 14.93815 5.309245 14.999999 5.455729 15 5.625 L 15 14.375 C 14.999999 14.544271 14.93815 14.690756 14.814453 14.814453 C 14.690755 14.938151 14.544271 15 14.375 15 C 14.205729 15 14.059244 14.938151 13.935547 14.814453 C 13.811849 14.690756 13.75 14.544271 13.75 14.375 Z " />
|
||||
</AppBarToggleButton.Icon>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
<Style TargetType="controls:WinoCalendarView">
|
||||
<Setter Property="VisibleDateBackground" Value="{ThemeResource WinoCalendarViewVisibleDayBackgroundBrush}" />
|
||||
<Setter Property="TodayBackgroundBrush" Value="{ThemeResource SystemColorControlAccentBrush}" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
@@ -29,7 +28,10 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CalendarViewDayItem">
|
||||
<Grid>
|
||||
<Border x:Name="PART_DayViewItemBorder" CornerRadius="5">
|
||||
<Border
|
||||
x:Name="PART_DayViewItemBorder"
|
||||
Margin="0,-1,0,-3"
|
||||
CornerRadius="5">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user