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
1310
importing/exporting resources, building stylesets
posted

 I am working with your appstyler.  Not understanding what exactly a styleset is, what it does, and where it is stored.

How does it relate to the Style Library?  How is it intended to be used?

Also, I have a Style Library that I am working with and I like most of it, but I like the grid settings from one of your predefined Style Libraries.  I tried to import the grid settings, but could not get it to show up in mine.  I looked at the appstyler help files, but still confused.  How do I get the grid settings from one Style Library to another?  Do you have a step by step I can follow?

One more thing.  If I set UseOSTheme on a control, does that override the StyleLibrary settings?

 thanks for the help.

 

Parents
  • 469350
    Offline posted

    A StyleSet is aset of styles. For most application, you probably only need one StyleSet and when you create a new Style Library in AppStylist, the Librarywill automatically contain one default style set.

    But, there are case where you may want to style different instances of the same controls differently in the same application. For example, you might have some UltraWinGrids in your application that are large and detailed and others that are small and more simplified. This is where StyleSets come in. You can use the default styleset for one set of grids (say the large complicated one) and a completely different StyleSet for the smaller, simpler grids. All you have to do to make this work is set the StyleSetName on all of the the smaller grid in the application and they will use the information from the StyleSet with that name, instead of the default StyleSet information. 

    KDuaneS said:
    Also, I have a Style Library that I am working with and I like most of it, but I like the grid settings from one of your predefined Style Libraries.  I tried to import the grid settings, but could not get it to show up in mine.  I looked at the appstyler help files, but still confused.  How do I get the grid settings from one Style Library to another?  Do you have a step by step I can follow?

    I don't think there's any built-in functionality to import a StyleSet from one library to another.You might be able to do this by editing the XML directly. Style Library (isl) files are all just XML documents. So theoretically, you could copy and paste from one to another. But this might be more complicated when you factor in things like Resources, to it might not be feasible to do. 

    Another option might be to start with the existing isl file and delete all the StyleSet you don't want, leaving just the one you do. Then you could add new StyleSets to it and set a new Default. 

    Still another option would be to load multiple Style Libraries into your application at the same time. The StyleManager.Load method takes an optional name parameter. By default, if you don't specify a name, the Style Library applies to all controls. But if you specify a name, the library applies only to those controls whose StyleLibraryName matches the name you specified. 

    KDuaneS said:
    One more thing.  If I set UseOSTheme on a control, does that override the StyleLibrary settings?

    It depends on the object. But most of the time, themed drawing overrides settings like BackColor and ForeColor. This is why, when you create a new StyleSet, you are prompted to turn off themes.

Reply Children