| c# Programming Glossary: uielementSet focus on textbox in WPF from view model (C#) & wPF http://stackoverflow.com/questions/1356045/set-focus-on-textbox-in-wpf-from-view-model-c-wpf  very simple attached property which can be set on any UIElement. And it can be bound to ViewModel's property IsFocused for example... d DependencyPropertyChangedEventArgs e var uie UIElement d if bool e.NewValue uie.Focus Don't care about false values... 
 How to drag a UserControl inside a Canvas http://stackoverflow.com/questions/1495408/how-to-drag-a-usercontrol-inside-a-canvas  null  Point currentPosition e.GetPosition this.Parent as UIElement var transform draggableControl.RenderTransform as TranslateTransform.. 
 Invalid cross-thread access issue http://stackoverflow.com/questions/1924408/invalid-cross-thread-access-issue  use the same dispatcher you would use to access any other UIElement System.Windows.Deployment.Current.Dispatcher.BeginInvoke ..... 
 MVVM- How can I select text in a textbox? http://stackoverflow.com/questions/2596757/mvvm-how-can-i-select-text-in-a-textbox  public static void SetTextBoxController UIElement element ITextBoxController value  element.SetValue TextBoxControllerProperty..  public static ITextBoxController GetTextBoxController UIElement element  return ITextBoxController element.GetValue TextBoxControllerProperty.. 
 WPF User Control Parent http://stackoverflow.com/questions/302839/wpf-user-control-parent  UserControl control if uxPanel.Children.Count 0 foreach UIElement ctrl in uxPanel.Children  if ctrl.GetType control.GetType  this.SetControl.. 
 How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5? http://stackoverflow.com/questions/48935/how-can-i-register-a-global-hot-key-to-say-ctrlshiftletter-using-wpf-and-ne  from anywhere by Ctrl Shift S . You find the global UIElement of your choice for example the top level window which is the.. 
 Bind TextBox on Enter-key press http://stackoverflow.com/questions/563195/bind-textbox-on-enter-key-press  DependencyObject dp DependencyPropertyChangedEventArgs e  UIElement element dp as UIElement if element null   return  if e.OldValue.. e  UIElement element dp as UIElement if element null   return  if e.OldValue null   element.PreviewKeyDown.. source as DependencyObject if property null   return  UIElement elt source as UIElement if elt null   return  BindingExpression.. 
 Is it possible to bind a Canvas's Children property in XAML? http://stackoverflow.com/questions/889825/is-it-possible-to-bind-a-canvass-children-property-in-xaml  Items_CollectionChanged foreach UIElement element in dvm.Document.Items designerCanvas.Children.Add element.. NotifyCollectionChangedEventArgs e ObservableCollection UIElement collection sender as ObservableCollection UIElement foreach.. UIElement collection sender as ObservableCollection UIElement foreach UIElement element in collection if designerCanvas.Children.Contains.. 
 How can I convert WriteableBitmap to BitmapImage? http://stackoverflow.com/questions/3986638/how-can-i-convert-writeablebitmap-to-bitmapimage  new Uri arka_projects_as_logo.png UriKind.Relative Image uiElement new Image Source bitmapImage ScaleTransform t new ScaleTransform.. 0.2 WriteableBitmap writeableBitmap new WriteableBitmap uiElement t I want to insert the result of this conversions writeableBitmap.. 
 Is it appropriate to extend Control to provide consistently safe Invoke/BeginInvoke functionality? http://stackoverflow.com/questions/714666/is-it-appropriate-to-extend-control-to-provide-consistently-safe-invoke-begininv  method on the control's owning thread. summary param name uiElement The control that is being updated. param param name updater.. updated. param param name updater The method that updates uiElement. param param name forceSynchronous True to force synchronous.. param public static void SafeInvoke this Control uiElement Action updater bool forceSynchronous if uiElement null  throw.. 
 |