How to change fontsize of DateTimeEditBox?

Editors for WPF Forum

Posted 9 years ago by Xarm 8k2
Version: 15.1.0622
Avatar

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.

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thanks for reporting this.  We have found the problem and fixed it for the next release.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.