¡@

Home 

c# Programming Glossary: dependencyobject

Set 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

class FocusExtension public static bool GetIsFocused DependencyObject obj return bool obj.GetValue IsFocusedProperty public static.. IsFocusedProperty public static void SetIsFocused DependencyObject obj bool value obj.SetValue IsFocusedProperty value public static.. private static void OnIsFocusedPropertyChanged DependencyObject d DependencyPropertyChangedEventArgs e var uie UIElement d if..

How to add a Blend Behavior in a Style Setter

http://stackoverflow.com/questions/1647815/how-to-add-a-blend-behavior-in-a-style-setter

actions behaviors . public class DebugAction TriggerAction DependencyObject public string Message get return string GetValue MessageProperty.. public static Behaviors GetBehaviors DependencyObject obj return Behaviors obj.GetValue BehaviorsProperty public.. BehaviorsProperty public static void SetBehaviors DependencyObject obj Behaviors value obj.SetValue BehaviorsProperty value public..

databind the Source property of the WebBrowser in WPF

http://stackoverflow.com/questions/263551/databind-the-source-property-of-the-webbrowser-in-wpf

public static string GetBindableSource DependencyObject obj return string obj.GetValue BindableSourceProperty public.. public static void SetBindableSource DependencyObject obj string value obj.SetValue BindableSourceProperty value.. value public static void BindableSourcePropertyChanged DependencyObject o DependencyPropertyChangedEventArgs e WebBrowser browser o..

How to access a specific item in a Listbox with DataTemplate?

http://stackoverflow.com/questions/5181063/how-to-access-a-specific-item-in-a-listbox-with-datatemplate

helperFunction public T FindDescendant T DependencyObject obj where T DependencyObject Check if this object is the specified.. public T FindDescendant T DependencyObject obj where T DependencyObject Check if this object is the specified type if obj is T return.. check all the children for int i 0 i childrenCount i DependencyObject child VisualTreeHelper.GetChild obj i if child is T return..

Find all controls in WPF Window by type

http://stackoverflow.com/questions/974598/find-all-controls-in-wpf-window-by-type

the trick public static IEnumerable T FindVisualChildren T DependencyObject depObj where T DependencyObject if depObj null for int i 0.. T FindVisualChildren T DependencyObject depObj where T DependencyObject if depObj null for int i 0 i VisualTreeHelper.GetChildrenCount.. for int i 0 i VisualTreeHelper.GetChildrenCount depObj i DependencyObject child VisualTreeHelper.GetChild depObj i if child null child..