Код: Выделить всё
// In UIHelper.cs
public UIHelper(Control inputControl)
{
_inputControl = inputControl;
_inputControl.GotFocus += InputControl_GotFocus;
}
private void InputControl_GotFocus(object sender, RoutedEventArgs e)
{
// This code is never called...
}
< /code>
И даже если я объявляю событие в своем пользователе, как это: < /p>
public ucDriver()
{
InitializeComponent();
_uiHelper = new UIHelper(inputControl); // input type PasswordBox
inputCodeSecurite.GotFocus += _uiHelper.InputControl_GotFocus; // this code never called
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... ad-of-xaml
Мобильная версия