示例#1
0
 internal void Activate(ChildWindow wnd)
 {
     if (_topWindow == wnd) return;
     if (_topWindow != null) _topWindow.SetValue(ZIndexProperty, 0);
     _topWindow = wnd;
     wnd.SetValue(ZIndexProperty, 1);
 }
        /// <summary>
        /// Ensures that the view is a ChildWindow.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <param name="view">The view.</param>
        /// <returns>A child window.</returns>
        protected virtual ChildWindow EnsureWindow(object model, object view)
        {
            var window = view as ChildWindow;

            if (window == null)
            {
                window = new ChildWindow {
                    Content = view
                };
                window.SetValue(View.IsGeneratedProperty, true);
            }

            return(window);
        }
示例#3
0
        static ChildWindow EnsureWindow(object model, object view)
        {
            var window = view as ChildWindow;

            if (window == null)
            {
                window = new ChildWindow {
                    Content = view
                };
                window.SetValue(IsElementGeneratedProperty, true);
            }

            return(window);
        }
 public static void SetDialogResult(ChildWindow childWindow, bool?dialogResult)
 {
     childWindow.SetValue(DialogResultProperty, dialogResult);
 }
示例#5
0
 public static void SetDialogResult(ChildWindow target, bool?value)
 {
     target.SetValue(DialogResultProperty, value);
 }