FAQ |
Here is a collection of frequently asked questions, common problems and solutions.
This topic contains the following sections:
The UIScreen class has a Background property which defines the color used to fill the background of the whole screen. You can set this color to transparent, for example:
myScreen.Background = new Color(0, 0, 0, 0);
Just move the caret. The TextBox will scroll automatically to make the caret visible. For example, to scroll to the end:
myTextBox.CaretIndex = myTextBox.Text.Length;
A more complicated way is to get the scroll bar and manipulate it: After the text box was loaded (e.g. shown on the screen), get the contained scroll bar:
scrollBar = myTextBox.GetDescendants(false) // GetDescendants() is an extension method of the UIHelper class. .OfType<ScrollBar>() .First(); scrollBar.Value = scrollBar.Maximum;
This is a limitation of the Window drag implementation. It only works for the default left/top alignment. The current system supports following window positioning scenarios:
If you want to raise the Click event of a button from "outside" the button code, you can get the IsClicked property and set it to true:
var isClickedProperty = myButton.Properties.Get<bool>(ButtonBase.IsClickedPropertyId); isClickedProperty.Value = true;
When the IsClicked property changes to true, it triggers the Click event. You could also trigger the Click event directly:
var clickEvent = myButton.Events.Get<EventArgs>(Button.ClickEventId);
clickEvent.Raise();
You can use the LayoutSerializer class to load controls from an XML file. The class does not support serialization into an XML file yet. You have to create this part yourself. Use .NET reflection to enumerate the class properties of the controls and create an XML that is compatible to the XML required by the LayoutSerializer.
References:
Some more tips: