الاثنين، 12 ديسمبر 2011

How to get the control that has the focus in Silverlight?

Is very simple. To get the control with the focus do something just use the FocusManager.GetFocusedElement()

See: http://msdn.microsoft.com/en-us/library/system.windows.input.focusmanager(v=VS.95).aspx

You can also add an extension method like:

public static class FocusExtensionMethods
{

public static bool HasFocus(this Control c)
{
     return FocusManager.GetFocusedElement() == c;
}

}

Source: http://blogs.artinsoft.net/mrojas/archive/2011/11/22/how-to-get-the-control-that-has-the-focus-in-silverlight.aspx

how to forums how to forum how to make a forum how to make forums how to make a signature for forums how to make your own forums how to program a forum how to program forum rock band forums are forum

ليست هناك تعليقات:

إرسال تعليق