سؤال

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