Beispiel #1
0
        public static void SetValue <T>(this DependencyObjectDispatch obj, DependencyProperty property, T value)
        {
            object oldValue = obj.GetValue <T>(property);

            if (null != oldValue && null != value)
            {
                if (oldValue.Equals(value))
                {
                    return;
                }
            }
            obj.Dispatch(() => obj.SetValue(property, value));
        }
Beispiel #2
0
 public void SetValue(DependencyObjectDispatch obj, TResult value)
 {
     obj.SetValue <TResult>(this._dependencyProperty, value);
 }