Is it possible in WPF to make JAWS read the content of a text block without focusing on it.
Not sure if WPF has this concept but in HTML, you can have an aria-live region and when you inject new text into it, the screen reader reads it without the focus moving to it.
Related
I know that WPF disables ClearType text rendering if it is in doubt whether the background is fully opaque. There's the RenderOptions.ClearTypeHint attached property that can be used to assure WPF that it's safe to use ClearType rendering in a certain subtree. This is what I used on my popup with an opaque background and a shadow around it. But it has no effect. The text always shows up with greyscale smoothing.
I tried the official documentation of this property, and its example in Kaxaml. They say the third text should use ClearType but may show wrong rendering. But it's wrong! The third text is also just greyscale.
Also when inspecting the default control template for a ComboBox popup, they don't do anything else but it works fine in their control. I want the same rendering performance in my customised popup control.
Is there a way to definitely, finally force WPF to use ClearType text rendering in some place? I don't like its stupid smartness that prevents the right things from happening because they might be unsafe (but really are not).
On click of a button I need to freeze (Read Only) the entire screen even the menus / tab controls is there any possibility to do that.
Have you tried setting Application.Current.MainWindow.IsEnabled=false? That should propagate down to all other controls which have not overriden IsEnabled.
If you're looking for MVVM way: Disable WPF buttons during longer running process, the MVVM way
I've read articles that Child Windows in SL3 cannot be set to non-moveable, without creating your own custom window. Was this fixed in SL4? This is a problem, because the user is able to drag windows off the silverlight stage, which seems like an awkard UI design. On my first try I moved it offscreen and was not able to move it back or close it. I do not understand the logic behind leaving out the option to make the window non-moveable.
Is there any other way to prevent the user from dragging a child window off the screen? Or is creating my own custom window the only way.
I created my own custom Style which gets rid of the close button in the header and stops the moving.
In your control set: <controls:ChildWindow ... Style="{StaticResource themeChildWindowStyle}"
You can create the style with Blend pretty easy.
Here's a discussion on this topic which has another solution from "friendy1108" ~"My solution right now is to hide the title bar and make a button to close the child window.
From the link you sent, I can do this: title.Visibility = Visibility.Collapsed;" That would do it, but I prefer the style override.
Literally, I want to know that.
In some case, .Focus() appear better than SetFocusedElement(). But another case, it's reversal. So I must know what's different things are there.
Additionally, by MSDN, .Focus() is for keyboard focus, and SetFocusedElement is for logical focus. But I can't feel different thing between logical focus and keyboard focus.
The keyboard focus is generally easier to understand, as that is effectively the control that would receive keyboard input if the user typed. So if you click in a TextBox it will receive keyboard focus and you can start typing. Other controls have other behaviors and may not really support the keyboard, but they can still get the keyboard focus.
For logical focus, your application can be made up of several parts. For example, most applications would have a ToolBar/Ribbon at the top and then their main content below. Now, imagine that your content is a TextBox that currently has the keyboard focus. When you click in a ToolBar/Ribbon control, the keyboard focus is moved to that control. But you really want to "remember" that the TextBox in your content had the keyboard focus before.
To achieve this the ToolBar/Ribbon will create new "focus scope". So when you click in the ToolBar/Ribbon control, you move the keyboard focus but the TextBox still has the logical focus for the window. That allows the TextBox to be given the keyboard focus back when the user is done working with the ToolBar/Ribbon.
The same holds true if you interact with another application, as your application doesn't have the keyboard focus. When you go back to working in your application, it uses the logical focus to know who had keyboard focus last (and should have it restored).
Using FocusManager.SetFocusedElement(), you can specify a UserControl of which you want to set focus on an element. So you can set focus on a control that is in a different part of your program.
Control.Focus() is just straightforward, you set focus on the said control (which is more intuitive).
Wild guess: you use FocusManager.SetFocusedElement() improperly, resulting in unwanted behaviors but bottom line, it's the same thing really.
Sidenote: "logical" focus and "keyboard" focus are 2 different things in WPF.
i am trying to create a wpf app and have different parts in user controls.
in the navigation i have some buttons (now using the ribbon ctp). is it possible to change the main user control when different buttons are pressed in xaml. or is this just a bad way to do things?
sorry, really new to xaml and im trying to get my head arround it.
Further to what Carlo has said,
The way we do it is to have a blank grid in the place you want your controls to all appear and then use BlankGrid.Children.Clear() and BlankGrid.Children.Add() to set up which control is visible in this position.
We found that was the nicest programatically as we have a large number of custom controls, but Carlo's method would work nicely if you wanted to use the designer.
I think this is a pretty regular procedure in WPF. In my experience, me and other programmers put the controls where we want to show them and make their visibility hidden, collapsed or visible depending on what we want to show the user.