質問

Is it possible to set focus to an Image control (Windows.UI.Xaml.Controls.Image) in WinRT? I'd like to be able to set focus to it programmatically and detect key presses when the image has focus.

役に立ちましたか?

解決 2

According to the MSDN Documentation on the Image Control the answer is no.

The Image class and accessibility

The Image class is not a true control class in that it is not a descendant class of Control. You can't call focus to an Image element, or place an Image element in a tab sequence. For more info on the accessibility aspects of using images and the Image element in your UI, see Exposing basic information about UI elements.

他のヒント

No, but you can put it in another control - e.g. a Button or ContentControl and handle key presses on that, show focus indicators etc.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top