NPalette.FromFile Type parameter example needed


Author
Message
Brad Swearingen
Brad Swearingen
Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)
Group: Forum Members
Posts: 53, Visits: 3

I'm trying to provide custom palette support.  I'm on the 11.12.14.12 build.

The signature for NPalette.FromFile is this:

public static NPalette FromFile(    string filePath,   Type type)

Parameters

filePath
The fully qualified path to the specified file.
type
The type of the NPalette object requesting the load.

but the sample code you provide is this:

//copy this palette to another button
this.nButton2.Palette.Copy(NPalette.FromFile(@"C:\myPalette.xml");

This won't compile because its missing the "type" parameter.  (Its missing a right paren too.  )

How does one specify the "type" parameter?  I didn't find the "type" parameter definition helpful.  I tried typeof(NPalette) and that compiles but the call is failing for me.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search