
I have a DateTimeEidtBox and I want to change its FontSize during runtime.
This is how I intend to do it. This is how my XAML looks like:
<editors:DateTimeEditBox x:Name="DaTe"
BorderThickness="0" DropDownButtonInactiveVisibility="Collapsed" DropDownButtonVisibility="Collapsed"
Background="{Binding ElementName=root, Path=Background}"
Foreground="{Binding ElementName=root, Path=Foreground}"
FontFamily="{Binding Path=FontFamily, ElementName=root}"
FontSize="{Binding Path=FontSizeElementName=root}"
TextElement.FontSize="{Binding Path=FontSize, ElementName=root}"
EditableParts="All"
ForegroundEditable="{Binding ElementName=root, Path=Foreground}"
ForegroundNonEditable="{Binding Path=Foreground, ElementName=root}"
Value="{Binding Path=DTValue, ElementName=root}"
Format="{Binding Path=DTPattern, ElementName=root}">
</editors:DateTimeEditBox>
And then on runtime, I just change the FontSize property. However, the only part of the DateTimeEditBox that changes are the slashes and colons (i.e. / and :).
The text that shows the Date and Time does not change. Only the slashes and the colons change.
However when I change the FontFamily, the correct FontSize gets applied to the Date and Time Text as well.
I was wondering how can I cahge the FontSize dynamically wityhout changing the FontFamily.