Search code examples
c#wpfoxyplot

Changing Title Font in WPF OxyPlot


Is there currently any way to change the font of the title text for a plot in OxyPlot? I'm using WPF and have a custom font in a resources directory that I would like to use for this. I looked into the OxyPlot code and found that there is a field for it, but it does not seem to be implemented. Am I missing something on how to use it, or is there some other way I could go about achieving this? Thanks for your help!


Solution

  • Yes, there is a TitleFont property for PlotModel in OxyPlot (OxyPlot.PlotModel.TitleFont). Just assign the Fontfamily name in string to the property. For Example:

    plotModel.TitleFont = "Arial";
    plotModel.TitleFont = "Segoe UI";