[TIMOB-19516] Windows: Support setting Content property of ContentControl subclasses with a simple string content
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-09-28T09:42:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2015-09-14T23:08:06.000+0000 |
Updated | 2015-11-03T22:21:41.000+0000 |
Description
If you're using native API access and create something like a Windows.UI.Xaml.Controls.Button, you'd naturally want to set a text label for the button. But the Content property is a Platform.Object with the understanding it could be a String or it could be an UIElement (in fact it could be a UIElement, and if it's not then it's basically converted to a String representation, though how that's done isn't really talked about).
We need to understand this nuance of the API and support settings string values easily, i.e.
button.Content = "Click me!";
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.contentcontrol.content
Verified using: Windows 10 Pro Appc Core: 5.1.0-42 Appc NPM: 4.2.1 Ti SDK: 5.1.0.v2015102819002 When using the code below the app loads fine and the strings are set for both the button and textblock
Closing ticket