We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Getting specifiec StyleInfoProperty objects?

Hi, Is there a way to get a specific StyleInfoProperty object? For example if I want to get the BackColor StyleInfoProperty object what do I do? Also are StyleInfoProperty objects global to an object? For example it seems that Bold is a sub property of Font, if I had a StyleInfoProperty object which represents Font.Bold would HasValue on a GridStyleInfo object work correctly? Thanks, Sue

1 Reply

AD Administrator Syncfusion Team April 24, 2003 08:37 AM UTC

> Hi, > > Is there a way to get a specific StyleInfoProperty object? For example if I want to get the BackColor StyleInfoProperty object what do I do? > > Also are StyleInfoProperty objects global to an object? For example it seems that Bold is a sub property of Font, if I had a StyleInfoProperty object which represents Font.Bold would HasValue on a GridStyleInfo object work correctly? > > Thanks, > > Sue When you refer to style.BackColor you are getting the value from a static 'BackColor' StyleInfoProperty that populated dynamically to hold this value. So, the StyleInfoProperty is mainly an internally used class that facilitates you being able to access particular style properties from a style object. In version 1.6, all StyleInfoProperties will be public. This will allow then also hooking into their parsing/formatting routines. It also allow you to dynamically create your own style properties that you can use just like the ones provided by the class library (samples on this in 1.6 ). So, I am not sure you should 'think about; getting a StyleInfoProperty. It is mainly intended to be used so you can access particular properties in a style object. In fact, it is what 'defines' these properties in a style object. In 1.6, to access individual values when you have a StyleInfoStore it is still recommended to construct a new GridStyleInfo(store) passing in the GridStyleInfoStore and then accessing values through strongly typed properties. To access subproperties, you would have to go through the parent property. So, you would use style.Font.HasBold.

Loader.
Up arrow icon