The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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.