Nevron .NET Vision
User Interface for .NET / User's Guide / Skinning / Loading a Skin

In This Topic
    Loading a Skin
    In This Topic
     Skin Resource
    The NSkinResource component describes a resource that contains a XML-saved version of a NSkin object. Each NSkin may be loaded from such a resource as well as directly from a file or a Stream. Since it is a Component you may drop it on your Form, adjust its properties and attach it to a NUIManagerController instance.
     Predefined Skins

    The library ships with two predefined skins - "Vista" and "MacOS". These are contained as an embedded resources within the Nevron.UI.WinForm.Skins.dll assembly. The following code demonstrates how to load a predefined NSkin instance:

    C#
    Copy Code
    NSkinResource resource = new NSkinResource();
    resource.ResourceType = SkinResourceType.GlobalAssembly;
    resource.AssemblyName = "Nevron.UI.WinForm.Skins";
    resource.SkinName = "Vista";
    
    NSkin skin = new NSkin();
    if(skin.Load(resource))
    {
        NSkinManager.Instance.Skin = skin;
    }
    
    Visual Basic
    Copy Code
    Dim resource As NSkinResource = New NSkinResource()
    resource.ResourceType = SkinResourceType.GlobalAssembly
    resource.AssemblyName = "Nevron.UI.WinForm.Skins"
    resource.SkinName = "Vista"
    
    Dim skin As NSkin = New NSkin()
    If skin.Load(resource) Than
        NSkinManager.Instance.Skin = skin
    End If
    
     Remarks
    Note that you should either add a reference to the Nevron.UI.WinForm.Skins.dll assembly to your entry point application or have the same installed into the GAC (Global Assembly Cache). Since the NSkinResource object is a component you may drop it at design-time and adjust its properties.
    See Also