Skip to content

Commit

Permalink
Fix #2332
Browse files Browse the repository at this point in the history
  Calendar ignores IsTodayHighlighted property
  Make some additional Style changes like setting the Foreground
  • Loading branch information
punker76 committed Apr 6, 2017
1 parent f31e8b2 commit 413b467
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 227 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@
- [#2857](https://github.com/MahApps/MahApps.Metro/issues/2857) HamburgerMenuItem Scrolling
- [#1835](https://github.com/MahApps/MahApps.Metro/issues/1835) Window animation interferes with WindowsFormsHost positioning
- [#2917](https://github.com/MahApps/MahApps.Metro/pull/2917) Hamburger Header Templating
- [#2332](https://github.com/MahApps/MahApps.Metro/issues/2332) Calendar ignores IsTodayHighlighted property
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Windows.Threading;
using MahApps.Metro.Controls;

internal class DateTimeNowBehavior : Behavior<DateTimePicker>
public class DateTimeNowBehavior : Behavior<DateTimePicker>
{
private DispatcherTimer _dispatcherTimer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@
VerticalAlignment="Top">
<Label Content="Calendar" Style="{DynamicResource DescriptionHeaderStyle}" />

<Calendar Margin="5" />
<Calendar Margin="5" IsEnabled="False" />
<CheckBox x:Name="IsTodayHighlightedCheckBox" Content="IsTodayHighlighted" IsChecked="True" />
<Calendar Margin="5"
SelectionMode="MultipleRange"
DisplayDateStart="{x:Static system:DateTime.Now}"
IsTodayHighlighted="{Binding ElementName=IsTodayHighlightedCheckBox, Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<Calendar Margin="5" IsEnabled="False" HorizontalAlignment="Center" />
</StackPanel>

<StackPanel Grid.Row="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:metroDemo="clr-namespace:MetroDemo"
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400"
Expand Down Expand Up @@ -211,6 +212,17 @@
controls:TextBoxHelper.Watermark="TextBox 02" />
</StackPanel>
</TabItem>
<TabItem Header="Calendar">
<StackPanel Orientation="Vertical">
<CheckBox x:Name="IsTodayHighlightedCheckBox"
Content="IsTodayHighlighted"
IsChecked="True" />
<Calendar Margin="5"
SelectionMode="MultipleRange"
DisplayDateStart="{x:Static system:DateTime.Now}"
IsTodayHighlighted="{Binding ElementName=IsTodayHighlightedCheckBox, Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</TabItem>
</controls:MetroAnimatedTabControl>
</StackPanel>
</ScrollViewer>
Expand Down
Loading

0 comments on commit 413b467

Please sign in to comment.