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
925
XamDataChart zoombar styling
posted

Hi,

Could you please tell me how to style the built-in zoombar that comes with the xamDataChart? I have created a custom style that gets applied to XamZoombar controls used outside of the chart and I want this applied to the built-in controls also. Setting all the available styling properties for vertical/horizontal properties i.e. HorizontalScaleLeftStyle, HorizontalScrollLeftStyle etc. seems to set the styles to a degree, but there is clearly some additional styles/templates at work:

Style applied to XamZoombar outside of chart:

Style applied to built-in chart zoombar:

Code to set styles:

chart.HorizontalZoombar.Style = Application.Current.Resources["XamZoombarStyle"as Style;
            chart.HorizontalZoombar.HorizontalThumbStyle = Application.Current.Resources["HorizontalThumbStyle"as Style;
            chart.HorizontalZoombar.HorizontalScaleLeftStyle = Application.Current.Resources["HorizontalScaleLeftStyle"as Style;
            chart.HorizontalZoombar.HorizontalScaleRightStyle = Application.Current.Resources["HorizontalScaleRightStyle"as Style;
            chart.HorizontalZoombar.HorizontalScrollLeftStyle = Application.Current.Resources["HorizontalScrollLeftStyle"as Style;
            chart.HorizontalZoombar.HorizontalScrollRightStyle = Application.Current.Resources["HorizontalScrollRightStyle"as Style;
Parents
  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I created a sample project for you with the functionality you want. Basically I handled the XamDataChart’s Loaded event and get the Vertical and Horizontal Zoombars and set their Style Properties.

     

    Feel free to write me if you have further questions.

    xamDataChartZoombarStyle.zip
Reply Children