Beispiel #1
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     Dispatcher.BeginInvoke(() =>
     {
         MenuItem Item = sender as MenuItem;
         ProtectedConverter Converter = new ProtectedConverter();
         UserToken User;
         if (Item != null)
         {
             User = Item.CommandParameter as UserToken;
             if (User != null)
                 Item.Header = Converter.Convert(User, null, null, null);
         }
         Users.UpdateLayout();
     });
 }
Beispiel #2
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     Dispatcher.BeginInvoke(() =>
     {
         MenuItem Item = sender as MenuItem;
         ProtectedConverter Converter = new ProtectedConverter();
         UserToken User;
         if (Item != null)
         {
             User = Item.CommandParameter as UserToken;
             if (User != null)
             {
                 Item.Header = Converter.Convert(User, null, null, null);
             }
         }
         Users.UpdateLayout();
     });
 }