currently i am using fontsize resource as
<sys:Double x:Key="FontSize13">13</sys:Double>
<sys:Double x:Key="FontSize12">12</sys:Double>
<sys:Double x:Key="FontSize11">11</sys:Double>
and using as
<Setter Property="FontSize"
Value="{DynamicResource FontSize13}" />
How to set the FontSize in point like 10pt instead of pixel?
The type conversion happens at compile time by the XAML compiler and specifically in response to the
FontSizeConverterbeing present for theFontSizeproperty so we have a basic problem getting the converter to run. But we can create a helper markup extension to do the job.Here’s what the XAML looks like:
and here’s the markup extension: