Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better coloring for blackout days #1426

Merged
merged 1 commit into from
Jun 14, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions MahApps.Metro/Styles/Controls.Calendar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<VisualState x:Name="BlackoutDay">
<Storyboard>
<DoubleAnimation Duration="0"
To=".2"
To="1"
Storyboard.TargetProperty="Opacity"
Storyboard.TargetName="Blackout" />
</Storyboard>
Expand All @@ -96,11 +96,6 @@
<Rectangle x:Name="HighlightBackground"
Opacity="0"
Fill="{DynamicResource AccentColorBrush4}" />
<ContentPresenter x:Name="NormalText"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="5,1,5,1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextElement.Foreground="{DynamicResource GrayBrush1}" />
<Path x:Name="Blackout"
Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z"
HorizontalAlignment="Stretch"
Expand All @@ -109,7 +104,12 @@
RenderTransformOrigin="0.5,0.5"
Stretch="Fill"
VerticalAlignment="Stretch"
Fill="{DynamicResource WhiteBrush}" />
Fill="{DynamicResource AccentColorBrush3}" />
<ContentPresenter x:Name="NormalText"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="5,1,5,1"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextElement.Foreground="{DynamicResource GrayBrush1}" />
<Rectangle x:Name="DayButtonFocusVisual"
IsHitTestVisible="false"
Visibility="Collapsed"
Expand Down Expand Up @@ -139,6 +139,20 @@
Property="TextElement.Foreground"
Value="{DynamicResource AccentSelectedColorBrush}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsToday"
Value="True" />
<Condition Property="IsBlackedOut"
Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="TodayBackground"
Property="Opacity"
Value="0.5" />
<Setter TargetName="Blackout"
Property="Fill"
Value="{DynamicResource AccentColorBrush}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down