Hi,
I want to apply a different CurrentVisibleRangeText dependant on what view definition the user is in.
So DayView would be in the format ddd dd\MM\yyyy
Timeline and MonthView would be dd\MM\yyyy - dd\MM\yyyy
So I've changed the CurrentInterval ContentControl to use VisibleRange instead of CurrentVisibleText :
<
ContentControl
x:Name
=
"CurrentInterval"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Right"
Style
=
"{StaticResource NavigationIntervalStyle}"
Content
=
"{TemplateBinding VisibleRange}"
/>
Now how do I apply the NavigationIntervalStyle? So far I have :
<
Style
x:Key
=
"NavigationIntervalStyle"
TargetType
=
"ContentControl"
>
<
Setter
Property
=
"Margin"
Value
=
"5"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Right"
/>
<
Setter
Property
=
"FontWeight"
Value
=
"Bold"
/>
<
Setter
Property
=
"ContentTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
Grid
>
<
TextBlock
Margin
=
"0 1 0 0"
Text
=
"{Binding Path=Start, StringFormat={}{0:ddd dd/MM/yyyy}}"
Foreground
=
"White"
/>
</
Grid
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
This works ok for DayView but obviously not giving me what I want for Timeline or MonthView - I would presume I would need another TextBlock linked to VisibleRange.End - but how to set the Visibility of this textbox so I don't get it in DayView? Also would it be at all feasible for MonthView to run off the actual Month date and not just what is visible.. i.e. so it says 01/07/2016 - 31/07/2016 and not 27/07/2016 - 31/07/2016 (which is the actual VisibleRange of the month).