Designers have always been an interesting challenge. In WPF, having a control
that doesn't have a name reduces the overall size of the project and overall
performance. In effect, any time a control has a name, it generates stubs for
that method in the .g.cs file that goes with the XAML. For this reason, the
default behavior of the designer only gives names when the control needs one
(e.g. gets an Event handler).
There's an option in Tools > Options under XAML Designer -> General that reads
"Automatically name interactive elements on creation". That will cause any
interactive elements (e.g. excluding things like panels and shapes) to get a
name. This may partially solve your problem.
Although, to be fair, if you insert two buttons and tab around them, you'll
hear "grid" "button1" "button2" "window". I'm not sure that makes things
substantially better.
--Dante
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On Behalf
Of sonfire11@xxxxxxxxx
Sent: Friday, April 26, 2019 6:22 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Visual Studio 2019: wpf designer mostly not accessible
Hi,
The Visual Studio 2019 WPF designer is mostly not accessible for screen
readers. When putting controls on the designer, then tabbing around, controls
are not unique. In fact, new controls on the WPF designer surface never receive
a new control name as they do in WinForms applications. Returning to the WPF
designer, even if controls received a new name at design time, they are never
uniquely identified on the designer surface to a screen reader. For instance,
putting 2 buttons on a WPF designer surface, then tabbing around, forces the
screen reader to say "grid" "button" "button" "window". What button is what
one? The designer needs to assign default names to controls dropped on the
designer surface and expose them to screen readers.