Supportedorientations and orientation
Supportedorientations is useful, and orientation can only affect the status at design time, but cannot affect the status at runtime. Therefore, orientation can be ignored.
Landscape is divided into left and right
If you look at it vertically, landscape left is the screen on the left side of the keyboard, and landscape right is the screen on the right side of the keyboard.
Once landscape is supported, either or both of them must be supported.
Get resolution
Application. Current. Host. content. actualwidth
Application. Current. Host. content. actualheight
Screen Keyboard
On-screen keyboard, also known as software Input Panel (SIP), features a height of 339 pixels vertically and 259 pixels horizontally.
Input scope: Call up different keyboards
Currently, there are 62 types of input scopes, but there are only 11 different keyboards. That is to say, many of them are input scopes with different names that correspond to the same keyboard, such as numbers and digits.
For more information, see P66.
The input scope can only be used to roughly limit the input (and without a physical keyboard). The precise control still needs to be implemented through programming.
For example, to control textbox input, only numbers are allowed:
Textbox with multiple rows
Generally, perform the following three steps:
- Set the acceptsreturn attribute to true (the default value is false)
- Set the textwrapping attribute to wrap (nowrap by default)
- Setting minheight to a higher value makes it possible to see multiple rows.
Textwrapping indicates whether to automatically fold a line when the text of a row exceeds the textbox width. If only textwrapping = wrap and acceptsreturn = false are set for a Textbox, there are multiple rows, but the carriage return cannot be used for line feed.
English case sensitivity Specification
Full capital: Application title
Lower case:
1 various titles: page title, group title, list title, Panorama and your headings.
2 button text
Uppercase letters: All other
Uppercase letters: Do not use
Punctuation Specification
Do not use a colon unless it should have been.
Do not use ellipsis unless the text on the progress bar is described. (Not like adding a new window ...)
Use commas (,) to represent segmentation.
Use & don't use and, use short don't use long.
Scrollviewer
The visibility of the scroll bar verticalscrollbarvisibility/horizontalscrollbarvisibility has four enumeration values, but essentially there are only two meanings.
Visible = auto = Enabled
Disabled = hidden = disabled
Verticalscrollbarvisibility is enabled by default.
The default value of horizontalscrollbarvisibility is disabled.
Width and height
A range should be provided through minheight and maxheight, rather than a specific value (assign a value to height ).
Auto means that its value is double. Nan, that is, the size is determined based on the content. When no value is assigned to the height and width values, the values are double. Nan.
To determine whether the length and width are auto, you only need to use the static isnan method of the double class to determine.
To obtain the length and width, use actualheight and actualwidth, both of which are read-only.
Margin and padding
Both margin and padding are values of the thickness type. The value of this type can be determined by one, two, or four parameters.
The order of the four parameters is: left, top, right, bottom
The order of the two parameters is: left and right, and up and down. For example, 1 or 2 indicates that four parameters are 1, 2, 2.
Margin refers to the interval between it and the parent element, which is usually used. Negative values are allowed.
Padding refers to the interval between subelements and is not commonly used. Negative values are not allowed. The default padding value of textbox is 2. It is generally not recommended to modify the default value of padding, because these default values are preset by Microsoft after repeated attempts.
Call
Phonecalltask is used for calling, but instantiating phonecalltask on the simulator will throw an exception and exit. Therefore, you can use the Microsoft. devices. environment. devicetype attribute to determine the runtime environment.
CalledCodeAs follows:
void tapheretocall_mouseleftbuttonup ( Object sender, mousebuttoneventargs E) { If (Microsoft. devices. environment . devicetype = Microsoft. devices. devicetype . emulator) { return ;}< span style = "color: # 2b91af "> phonecalltask phonelauncher = New phonecalltask (); phonelauncher. displayname = This . contactnametextbox. text; phonelauncher. phonenumber = This . phonenumbertextbox. text; phonelauncher. show () ;}