b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

accessiblename_qt accessiblename_accessiblename属性(2)

电脑杂谈  发布时间:2017-05-26 04:01:55  来源:网络整理

<Setter Property=Template>

<Setter.Value>

<ControlTemplate TargetType=customControls:PlaceholderTextButton>

qt accessiblename_accessiblename_accessiblename属性

<Grid

Background={ThemeResource ApplicationPageBackgroundThemeBrush}>

<Border

<Grid>

<TextBlock

x:Name=PlaceholderText

Text={TemplateBinding PlaceholderText}

2. Set an accessible name on a list item

Depending on how you populate the data shown in your list items, you may find the accessible name of your list items is exactly the same as your C# class name used to manage the items. To expose that to your customer would make the list unusable.

The easiest way to avoid this is to return a useful accessible name for the list item by overriding the ToString() function of whatever class youve added for the list items. The following example shows the accessible name being set from a single view model property called PlantName.

The following example shows the accessible name being set as a formatted string based on multiple view model properties:

public override string ToString()

{

return this.PlantName;

}

The following example shows the accessible name being set as a formatted string based on multiple view model properties:

public override string ToString()

{

return string.Format(

accessiblename属性_qt accessiblename_accessiblename

this.stringResources.PlantListItemAccessibleNameFormat,

this.Genus,

this.Name,

this.Colour);

}

3. Set an accessible name in code-behind

If for some reason it is not practical to set the accessible name on an element through XAML, then it can be done in code-behind. For example:


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-49289-2.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...