I'm trying to work with the single line sample but I first get the error "Cannot resolve Assembly or Windows Metadata file 'MyScript.Atk.Sltw.winmd'" and I think It's because of this that when I use the singlelinewidget and add the property "BaselinePosition" or "BaselineColor", I get the error "Failed to assign to property 'MyScript.Atk.Text.Sltw.SingleLineWidget.BaselineColor'. [Line: 35 Position: 125]" (the same happens when I add BaselinePosition. Are these errors related? can you help me?
The error message "Cannot resolve Assembly or Windows Metadata file ... " does not prevent from running the widget. On our side, we have identified the problem but have not yet decided when it will be fixed.
Regarding the baseline api, changes have to be done after the widget configuration, for instance this way:
public const float BaselinePositionPortrait = 50; .... Widget.Configure("en_US", "cur_text"); Widget.BaselinePosition = BaselinePositionPortrait ; Widget.BaselineColor = (Windows.UI.Colors.AliceBlue);
Please let me know if it helps.
Thanks Diego for your feedback,,
In the 'Integration' section of the Single Line documentation, you can find how to add language resources:
Please download your language pack first on this page : https://developer.myscript.com/downloads
and proceed the same way than for EN_US
then in your code, just replace EN_US by ES_ES:
// References resources copied as Content var resourcesDir = System.IO.Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, "Resources", "conf"); SingleLineWidget.AddSearchDir(resourcesDir); // The configuration is an asynchronous operation. Callbacks are provided to // monitor the beginning and end of the configuration process. // // "es_ES" references the es_ES bundle name in conf/es_ES.conf file in your resources. // "cur_text" references the configuration name in es_ES.conf SingleLineWidget.Configure("es_ES", "cur_text");
Hope it helps!
Could you please check the properties of each resource file as shown below?
- Build action should be set to 'Content'
- copy to Output Directory should be set to 'Copy if newer'
It should solve the problem.
I am surprised by your message, which video did you see? Using Single Line Widget, you cannot write several lines in the writing area, however, you should be able to overwrite letters. Don't hesitate to share screenshot if you face trouble. The ATK samples do not show all the api abilities, so I invite you to read the documentation regarding your use case to see if it meet your expectations!
You can of course ask any specific questions you may have.
Indeed, if you refer to the video, you will notice a "carriage return" gesture is done.
This can be done in the ATK sample, just draw the gesture as done in the video. Any new written text will then be comitted on the new line.