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
295
StyleSet and Preset
posted

What is the relation between StyleSet and Preset? Thanks!

Parents
  • 19308
    Verified Answer
    posted

    I'm glad you ask, because I don't think the differentiation is very clear for many.  In a nutshell, a preset is applied to a single instance of a grid, and actually changes the ASPX markup for that grid.  A StyleSet is a set of CSS StyleSheets that are associated with one or many controls.  Key takeaways:

    Presets = 1:1 mapping

    StyleSets= 1:Many mapping

    Why does this matter?  Think of an instance where you've used the same preset and applied it to 30 grids on 20 different pages in your application.  Your manager walks in and says - we need to change the colors on this grid... that's 30 places you must go back and revisit.  So you might be thinking, ok.. I'll dynamically load my presets and avoid the 1:1 mapping that's created when I load a preset at design-time.  This is a step in the right direction, but Application Styling takes this one step further. 

    Application Styling isn't just a bunch of random CSS classes.  It's all completely UI Role based, and has an inheritence scheme built in.  So if tomorrow your boss (or visual design team) comes in and says, "I want all of the fonts in this applicatoin to be Calibri, 12pt, with a color of #3d3d3d", you can make that change in seconds by setting the font properties on the "Control" ui role, which sits at the top of the UI Role Hierarchy.  The change will be applied to EVERY Infragistics control on EVERY form of your application (unless you overrode it at deeper level).  

    As one last key benefit - building Application Styles does not require a developer or Visual Studio.  It can be done through AppStylist which is an Infragistics tool that allows designers and developers to build styles for Infragistics control, in a very quick and easy way.  If you're hardcore, you can also build the styles by hand with CSS (just grab an existing styleset and fill out the css classes in your favorite text editor). 

    I hope that helps explain it.  The whole concept is extremely powerful, and I want to be sure that you understand just how powerful it is so that you can be as productive as possible with NetAdvantage.

    -Tony 

     

Reply Children