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

accessiblename_qt accessiblename_accessiblename属性(3)

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

using Windows.UI.Xaml.Automation;

myControl.SetValue(AutomationProperties.NameProperty, <The desired localized accessible name>);

Similarly, the AutomationProperties.LabeledByProperty could be set in code-behind.

4. Use a custom AutomationPeer

A custom AutomationPeer can be used to customize an element’s accessible properties and behaviors in a way that goes beyond what’s possible through the AutomationProperties class. (I talk about XAML’s AutomationPeers at Does your XAML UI support the Patterns that your customer needs?)

It is not expected that a custom AutomationPeer is required solely to add a useful accessible name to an element. But if an element already uses a custom AutomationPeer, then that custom AutomationPeer can supply an accessible name by overriding the GetNameCore() function. The following example shows the custom AutomationPeer returning a feature-specific property called AccessibleName in a custom control associated with the AutomationPeer.

protected overridestring GetNameCore()

{

return this.owner.AccessibleName;

}

Other posts in this series:

Giving your XAML element an accessible name: Part 1 Introduction

Giving your XAML element an accessible name: Part 2 – Set the AutomationProperties.Name


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

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

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