12-18-2014 10:02 AM
Please is it possible to make the label size in a wpf image smaller or larger?
Thank you.
Solved! Go to Solution.
12-18-2014 02:19 PM
If you want to set the size of all text elements in the graph, you can change the FontSize
on the graph:
<ni:Graph FontSize="22" ...>
If you want to set the size of the major division labels, you can change the FontSize
on the LabelPresenter
for the MajorDivisions
:
<ni:AxisDouble ...>
<ni:AxisDouble.MajorDivisions>
<ni:RangeLabeledDivisions>
<ni:RangeLabeledDivisions.LabelPresenter>
<ni:GeneralValueFormatter FontSize="22" />
</ni:RangeLabeledDivisions.LabelPresenter>
</ni:RangeLabeledDivisions>
</ni:AxisDouble.MajorDivisions>
</ni:AxisDouble>
Or if you want to set the size of the axis label, you can use a custom LabelTemplate
:
<ni:AxisDouble Label="Label" ...>
<ni:AxisDouble.LabelTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontSize="22" />
</DataTemplate>
</ni:AxisDouble.LabelTemplate>
</ni:AxisDouble>
12-20-2014 07:48 AM
Thank you very mush Paul. That solved my problem.