Profile Picture

NPalette.FromFile Type parameter example needed

Posted By Brad Swearingen 12 Years Ago
Author
Message
Brad Swearingen
Posted 12 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 8 Years Ago
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.






Similar Topics


Reading This Topic