Custom control resets font properties set through Xaml
-
Hello, I have a custom control, and in the Xaml declaration I set its FontFamily and FontSize properties to Consolas and 72 respectively. However, in the constructor, the FontFamily is Segoe UI and FontSize is 12 - and I haven't done any kind of editing of those properties other than the Xaml. Would could cause this? Thanks, Theo EDIT: I just tested something - if I set the FontFamily to be Consolas in the constructor, it still renders the text as if it were Segoe UI, and in the child TextView control, in its constructors, the debugger displays the control's FontFamily to be Segoe UI.
-
Hello, I have a custom control, and in the Xaml declaration I set its FontFamily and FontSize properties to Consolas and 72 respectively. However, in the constructor, the FontFamily is Segoe UI and FontSize is 12 - and I haven't done any kind of editing of those properties other than the Xaml. Would could cause this? Thanks, Theo EDIT: I just tested something - if I set the FontFamily to be Consolas in the constructor, it still renders the text as if it were Segoe UI, and in the child TextView control, in its constructors, the debugger displays the control's FontFamily to be Segoe UI.
Could you please share some more details like code snippet of your constructor, OnApplyTemplate and the XAML block you are setting the font properties?