src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/MDI/MDIChild.cs
/// <summary>
/// Dependency property event once the focused value has changed.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
Dependency property event once the focused value has changed.
Dependency property event once the focused value has changed .
private static void FocusedValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
    {
      if ((bool)e.NewValue == (bool)e.OldValue)
        return;
      MDIChild mdiChild = (MDIChild)sender;
      bool focused = (bool)e.NewValue;
      if (focused)
      {
        mdiChild.Dispatcher.BeginInvoke(new Func<IInputElement, IInputElement>(Keyboard.Focus), System.Windows.Threading.DispatcherPriority.ApplicationIdle, mdiChild.Content);
        mdiChild.RaiseEvent(new RoutedEventArgs(GotFocusEvent, mdiChild));
      }
      else
        mdiChild.RaiseEvent(new RoutedEventArgs(LostFocusEvent, mdiChild));
    }
private static void FocusedValueChanged ( DependencyObject sender , DependencyPropertyChangedEventArgs e ) { if ( ( bool ) e . NewValue == ( bool ) e . OldValue ) return ; MDIChild mdiChild = ( MDIChild ) sender ; bool focused = ( bool ) e . NewValue ; if ( focused ) { mdiChild . Dispatcher . BeginInvoke ( new Func < IInputElement , IInputElement > ( Keyboard . Focus ) , System . Windows . Threading . DispatcherPriority . ApplicationIdle , mdiChild . Content ) ; mdiChild . RaiseEvent ( new RoutedEventArgs ( GotFocusEvent , mdiChild ) ) ; } else mdiChild . RaiseEvent ( new RoutedEventArgs ( LostFocusEvent , mdiChild ) ) ; }
Dependency property event once the focused value has changed.
Dependency property event once the focused value has changed .
sender
DependencyObject
None
e
DependencyPropertyChangedEventArgs
The  instance containing the event data.
The instance containing the event data .