Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2085
Does an Axis Title have "Text Decorations"?
posted

An Axis type  has a sub-property for tick mark labels called Axis.LabelSettings.TextDecorations, however, the main title of an axis does not appear to have the same property/capability (ex: there is no Axis.TitleSettings.TextDecorations property).  Is this feature available with the Axis title like it is for tick mark labels?

Parents
No Data
Reply
  • 34810
    Verified Answer
    Offline posted

    Hello Gary,

    Thank you for your post!

    Currently TextDecorations are not supported through the Axis.TitleSettings, but you can still add them by obtaining the TextBlock used for the axis Title and adding TextDecorations to its TextDecorations collection programmatically.

    To do this, I would recommend handling the Loaded event of the XamDataChart. Using the Infragistics.Windows.Utilities.GetDescendantFromType method, you can obtain a HorizontalAxisLabelPanel and a VerticalAxisLabelPanel from the XamDataChart. Then, by looping through each element in these panels, you can see which one is a TextBlock with its Text property matching the titles of your axes. If it is, then you can add your TextDecorations to it. I have attached a sample project to demonstrate this.

    If you would like to see TextDecorations added to the TitleSettings of the XamDataChart in a future version, consider suggesting a new product idea for it at http://ideas.infragistics.com. This product idea site allows you to vote on other Infragistics community-suggested ideas, and puts you in direct communication with our product management team who plans and prioritizes upcoming features and products based on community feedback.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamDataChartTitleDecorationsCase.zip
Children