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
15
[WPF] XamZoombar: how to know the size of sliders
posted

Hi,

I would llike to know how to get the size of sliders, in code behind.

I know that the default value is 20px but maybe a style can modify the default value.

Here is the size that I want to know:

Thanks,

Stéphane

Parents
  • 18204
    Verified Answer
    Offline posted

    Hello Stéphane,

    Thank you for posting in our forums!

    You can get the height with the help of our Utilities class.  The class has static methods like GetDescendantFromType which will search the Visual Tree and return objects matching the type.  You could use this to dig down to the elements in the XamZoombar and check their height.

    I have attached a simple sample below that demonstrates this.  To see the height, click the button up top and a MessageBox should appear.

    If you have any further questions or concerns with this, please let me know and I will be glad to help.

    1586.XamZoomBar_GetSliderHeight.zip

Reply Children
No Data