叙述者.扫描模式.对于 TextBlock,叙述者读取 Text 属性两次 [英] Narrator. Scan mode. For TextBlock the narrator reads the Text properties twice

查看:19
本文介绍了叙述者.扫描模式.对于 TextBlock,叙述者读取 Text 属性两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有动态数据(计时器)的 TextBlock.Text 属性每秒更新一次.

叙述者有时(并非总是)在扫描模式下阅读文本两次,因为它有两个文本属性:TextAutomationProperty.Name.我尝试将数据直接写入文本块 TextBlock.Text = Text;(不是绑定)并更改不同的参数 AutomatonProperties,但没有帮助.>

XAML:

C#:

私有字符串_text;公共字符串文本{得到 { 返回 _text;}放{_text = 值;OnPropertyChanged("文本");}}

如何正确调整扫描模式下讲述人读取一次的TextBlock?

解决方案

你知道叙述者何时阅读你的 TextBlock 吗?

也许您可以在讲述人阅读文本时停止文本更新,并在讲述人停止阅读时继续.那可以解决问题.

你知道叙述者什么时候开始阅读你的 TextBlock 吗?

例如,您可以停止文本更新 2 秒钟.这也可以解决问题.

TextBlock 每秒的娱乐是否有很大影响?

您可以每秒创建一个新的文本块.也许这可以适当地改变叙述者的行为.

I have a TextBlock with dynamic data (Timer). The Text property is updated once per second.

The narrator sometimes (not always) reads the text twice in scan mode, because it have two properties with text: Text and AutomationProperty.Name. I tried to write data directly to the text block TextBlock.Text = Text; (not a binding) and to change different parameters AutomatonProperties, it didn't help.

XAML:

<TextBlock Text="{x:Bind Text, Mode=OneWay}"/>

C#:

private string _text;
public string Text
{
    get { return _text; }
    set
    {
        _text = value;
        OnPropertyChanged("Text");
    }
}

How correctly to adjust the TextBlock that the Narrator in a Scan Mode read it once?

解决方案

Do you know when narrator is reading your TextBlock?

Maybe you can stop text update while narrator is reading text and continue when narrator will stop reading. That can fix the problem.

Do you know when narrator starts reading your TextBlock?

You can stop text update for a 2 seconds for example. That also can fix the problem.

Is TextBlock recreation every second do a lot of impact?

You can create a new textblock every second. Maybe that can properly change the behavior of narrator.

这篇关于叙述者.扫描模式.对于 TextBlock,叙述者读取 Text 属性两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆