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
but the sample code you provide is this:
//copy this palette to another buttonthis.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.
Best Regards,Nevron Support Team
Thanks for clarifying. I first tried saving a palette through the "Save" button on the palette dialog launched via NUIManager.Palette.ShowEditor(). That produces the same .XML file that a call to NUIManager.Palette.SaveToFile produces. Both seem like valid palette files to me and look the same. I've attached the file I see.
If I make calls like below the FromFile always returns null for me. I'm running on Windows7 using build 11.12.14.12.
Changing the tags from NUIPalette to NPalette in the .XML file did not work but changing the typeof to NUIPalette like below did. Thanks. Let me know if there is any problem with this: