narrator

Use Windows Narrator through .NET

烂漫一生 提交于 2020-04-13 08:02:32
问题 Is there a way to use text-to-speech capabilities of Windows Narrator in .NET applications? I want to use it or a similar service to read out loud strings from my C# application. Would that be possible? 回答1: Ms has a speech API and now have a easily consumed managed interface. 回答2: When using Visual Studio; in Solution Explorer. Right Click ' References ' then click on ' Add Reference... '. Search for ' System.Speech ' under ' Framework ' then tick it. Click ' OK ' Then use code along the

Narrator. Scan mode. For TextBlock the narrator reads the Text properties twice

五迷三道 提交于 2020-01-15 10:42:40
问题 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

Narrator. Scan mode. For TextBlock the narrator reads the Text properties twice

耗尽温柔 提交于 2020-01-15 10:42:32
问题 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

Desktop Air Application Accessibility

冷暖自知 提交于 2019-12-25 07:05:04
问题 I'm trying to add accessibility to my application. I still can't figure out exactly how accessibility works in spark components. I'm on window's platform with the narrator function enabled. All I want to do is to name the three fields with a different name for accessibility so the user knows what to do. I tried to just use declaration to define the accessibility properties but it seems like it will always only speak out one name of the button. Thus, I took another approach and tried to create

Narrator does not read the text in a TextBlock as expected. Only in the selected TextBox

痴心易碎 提交于 2019-12-24 05:16:14
问题 I have a Visual Studio 2019 solution that contains two projects: a Class Library (Universal Windows) that contains a login Page and a Blank App (Universal Windows) that simply navigates to said login Page. One of my requirements is that the overall solution must pass an accessibility test. The test involves having Narrator (it must be Narrator) read all of the text on the screen. My problem is that Narrator only reads the text of the TextBox that has focus when the Page loads. I expected

Wrong reading order in Narrator

半腔热情 提交于 2019-12-12 01:18:29
问题 I've got a problem with Microsoft Narrator. I've got a WPF fragment like this: <Window x:Class="InlineEditbox.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Narrator test" SizeToContent="WidthAndHeight"> <TextBlock> <Run xml:space="preserve">I want to pay </Run> <InlineUIContainer> <TextBox Width="70" HorizontalContentAlignment="Right">0</TextBox> </InlineUIContainer> <Run xml:space="preserve"> % more<

How to prevent Windows Narrator from reading hidden HTML tags?

廉价感情. 提交于 2019-12-11 10:18:32
问题 I have an HTML page, with multiple hidden elements that become visible only under certain circumstances. When I set the focus on the page wrapper (to read all the content), Windows Narrator reads all the elements, even the hidden ones. I have tried using aria-hidden="true", CSS display: none, HTML5 hidden attribute, all are completely ignored. So far, the only mechanism that I found that works is to remove this elements from the DOM, before setting the focus on the wrapper. But it's not an

How to detect that narrator tool is running?

坚强是说给别人听的谎言 提交于 2019-12-06 07:10:56
问题 I have a custom control. i like to provide the support for System screen reading support. Is there any logic to find that the narrator or coded UI tool is enabled in our machine.?? 回答1: You can use namespace Windows.UI.Xaml.Automation.Peers and this method: var isNarratorStarted = AutomationPeer.ListenerExists(AutomationEvents.AutomationFocusChanged); 回答2: I had similiar case but when working with UWP app and I solved it that way. Maybe you can take something from here: private bool

How to detect that narrator tool is running?

不羁岁月 提交于 2019-12-04 13:15:16
I have a custom control. i like to provide the support for System screen reading support. Is there any logic to find that the narrator or coded UI tool is enabled in our machine.?? You can use namespace Windows.UI.Xaml.Automation.Peers and this method: var isNarratorStarted = AutomationPeer.ListenerExists(AutomationEvents.AutomationFocusChanged); I had similiar case but when working with UWP app and I solved it that way. Maybe you can take something from here: private bool isAutomationPeerCreated = false; private bool IsAutomationPeerAttached => this.isAutomationPeerCreated || AutomationPeer