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 am using the following code...
{
}
But the stream is returning as null.
What am I forgetting?
BTW... you do not need the AppStylistRunTime component on your form unless you want to allow the users to style your application or unless you want to modify the styles yourself at run-time. Loading the library with the line of code listed here is sufficient.
You may want to add an InboxControlStyler to the form - you need this if you want the inbox controls to be styled. Otherwise, only the Infragistics controls on the form will be styled.
I can't say how most users are deploying their applications with ISL libraries, so perhaps someone will chime in here with his/her experiences on deployment, but you could certainly create your own directory to look for in the installation directory, or you could make the ISL an embedded resource of the solution and load it into a stream. In order to do this, you need to have a type that exists in your assembly/project, such as your derived Form. Additionally, you need to make sure that the isl is included in the project and its Build Action is set to Embedded Resource. Then, you could use code similar to the following:
Type type = typeof(Form1);using (System.IO.Stream stream = type.Assembly.GetManifestResourceStream(type, "Styles.Aero.isl")){ Infragistics.Win.AppStyling.StyleManager.Load(stream);}
Note that a period is used to separate directories in addition to file extentions (i.e. 'Styles' is the project folder that contains 'Aero.isl').
-Matt
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?
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.