示例#1
0
        public static IDockingWindowMetadata GetDockingWindowMetadata(this object view)
        {
            if (view == null)
            {
                return(null);
            }

            if (view is IDockingWindowMetadata)
            {
                return((IDockingWindowMetadata)view);
            }

            var dependencyObject = view as DependencyObject;

            if (dependencyObject != null)
            {
                return(DockingWindowMetadata.GetInstance(dependencyObject));
            }

            return(null);
        }
示例#2
0
 /// <summary>
 /// Sets the <see cref="DockingWindowMetadata"/> for a given view.
 /// </summary>
 /// <param name="d">The view.</param>
 /// <param name="value">The <see cref="DockingWindowMetadata"/> to apply to the view.</param>
 public static void SetInstance(DependencyObject d, DockingWindowMetadata value)
 {
     d.SetValue(InstanceProperty, value);
 }
示例#3
0
 /// <summary>
 /// Sets the <see cref="DockingWindowMetadata"/> for a given view.
 /// </summary>
 /// <param name="d">The view.</param>
 /// <param name="value">The <see cref="DockingWindowMetadata"/> to apply to the view.</param>
 public static void SetInstance(DependencyObject d, DockingWindowMetadata value)
 {
     d.SetValue(InstanceProperty, value);
 }