iink SDK on Device


Using package.Save() Method

I am developing a c# UWP application that uses the iink SDK to allow for math input. I am trying to use the package.Save() method however when the method is called I get an unspecified error "INVALID ARGUMENT" even though it appears that the method takes no arguments. Am I using this method wrong?


Best Answer

Dear Michael,

We reproduced your issue and indeed you try to write at a location where do do not have the rights.

Your "_packageName" should be generated like in the GetStarted example:

private static string MakeUntitledFilename()
    var localFolder = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
    var num = 0;
    string name;

        var baseName = "File" + (++num) + ".iink";
        name = System.IO.Path.Combine(localFolder, baseName);
    while (System.IO.File.Exists(name));

     return name;

It contains the concatenation of the localFolder path and the fileName.



Hi Maël,

That seems to have been the issue, thank you very much for all your help.