Profile Picture

Loading a skin

Posted By JSW W. 14 Years Ago
Author
Message
JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1

Public m_Skin As New NSkin() 'Nevron skin

'Public NevronSkinResource As New NSkinResource()

NevronSkinResource.SkinName = "Vista"

If (m_Skin.Load(NevronSkinResource)) Then

NSkinManager.Instance.Skin = m_Skin

End If

I dropped NSkinResource() in designer view but ... this code never goes inside the If statement.

Could you suggest? the Fix?



JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1

I played around and cheked copy to local in reference setting for

nevron.WinForm.Skins

So it works now. However, i did not want to ship dll as is with the project do you have alternative? I am new so please show steps. 



JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1

With above I can load Vista, Orange etc. but can not load "Office 2007 Black"

It never pass the load() function.



JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1

Never mind, I change name "Office2007Black" then it works.

Is there a way to see what available skin name in dll. The guessing is not healthy.

Anyway, still waiting on adding reference without shiping skin.dll with the project.



Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hello JSW W.,

To load all available skins you can do the following:

Dim skins() As NSkin = NSkinManager.Instance.LoadResourceSkins(Assembly.Load("Nevron.UI.WinForm.Skins"))

 

You can apply skin to your application without reference the Nevron.UI.WinForm.Skins.dll.

To do that you have to open the skin designer and load the Nevron.UI.WinForm.Skins.dll.

Pick the desired skin from the list with available skins, and then save it as xml file.

Check this topic in our online documentation for more info.

Then you can load this skin in your application by the following way:

Dim resource As NSkinResource = New NSkinResource()

resource.ResourceType = SkinResourceType.File

resource.FilePath = filePath

resource.SkinName = skinName

Dim skin As NSkin = New NSkin()

If skin.Load(resource) Then

NSkinManager.Instance.Skin = skin

End If

This way you will only ship the xml file with the skin and not the assembly file.

Regards,

Angel.

 



JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1
Thanks,



Similar Topics


Reading This Topic