All, I am running the AppStylist for the first time. I havn't been able to find any code samples to use in Visual Studio (2005).
I want to use (atleast at first) one of the default style libraries (such as "FlatNature.isl" or "TheBlues.isl").
I can add a appStylistRuntime, but can't seem to load a library.
What is the fastest, simplest way to load a library?
Also, where can I get technical (i.e. C#) documentation on AppStylist
dap
I'm not sure exactly what you're trying to do with AppStylist. There is no programmatic interface to use within AppStylist itself, though you can use code in your application to load style libraries, or resolve appearances for a given role. To load a style library in your application, you can use:
Infragistics.Win.AppStyling.StyleManager.Load("myFile.isl");
Could you be a little more specific with what you're trying to accomplish?
-Matt
My problem is in the loading of the style library.
when I use the following. It does not does not appear to work.
I have added the appStylistRunTime object
I have added the following lines of code
using Infragistics.Win;
using Infragistics.Win.AppStyling;
using Infragistics.Win.AppStyling.Runtime;
It does not seem to use the default style
Do the controls on the form have the UseAppStyling property set to True (the default)? Are you certain that the styleset you're using targets those controls (i.e. you can see the controls properly styled when loading the style from within AppStylist)? It's difficult to say what's going on here without seeing your code, so it may be best to submit this issue to the support group so that they can look into it:
Get Help
It seems to work if I use the following code
StyleManager.Load(@"C:\style_libs\black.isl");
How do I set it up to have it use a style that is in a "styles" directory within the project directory?
This would be the same as trying to programmatically open a FileStream with a file, since the path that you specify to this method is relative to the location of the running application, so you could have @"..\..\styles\black.isl", assuming that your styles directory is two levels above the directory of the exe. Of course, this isn't a good solution in the long-term unless you know that you're deploying your application with the styles directory in the same relative location.
What is the typcial method of deploying applications using the AppStylist?
Do you set a default directory (relative to the executeable) where you store your styles?
Can the styles be incorporated into the executeable durring the build?
Calling StyleManager.Load and passing in an isl file applies to the entire application. You do not have to do it for each form.
If you want to style the inbox (non-Infragistics) controls, like the TextBox, Button, etc. then you will need to place an InboxControlStyler component on each form/usercontrol which contains any of those controls.
Thanks, I had the same question, one follow up one, do I need to set this on each form, or can I do it one for the entire application?
Thanks again for the help. Where can I get additional styles?
That was it. Had a dumb ass attack. Thanks everyone. Much appreciated
Are you sure that you've included Aero.isl as an embedded resource in the project? It should be visible in Solution Explorer, right-click on the file and make sure that the Build Action is set to "Embedded Resource". Also make sure that you have this in a Styles folder within the project.