Catel.Services.UIVisualizerService.CreateWindow C# (CSharp) Method

CreateWindow() protected method

This creates the window of the specified type.
protected CreateWindow ( Type windowType, object data, EventHandler completedProc, bool isModal ) : FrameworkElement
windowType System.Type The type of the window.
data object The data that will be set as data context.
completedProc EventHandler The completed callback.
isModal bool True if this is a ShowDialog request.
return System.Windows.FrameworkElement
        protected virtual FrameworkElement CreateWindow(Type windowType, object data, EventHandler<UICompletedEventArgs> completedProc, bool isModal)
        {
            var window = ViewHelper.ConstructViewWithViewModel(windowType, data);

#if NET
            if (isModal)
            {
                var activeWindow = GetActiveWindow();
                if (window != activeWindow)
                {
                    PropertyHelper.TrySetPropertyValue(window, "Owner", activeWindow, false);
                }
            }
#endif

            if ((window != null) && (completedProc != null))
            {
                HandleCloseSubscription(window, data, completedProc, isModal);
            }

            return window;
        }

Same methods

UIVisualizerService::CreateWindow ( string name, object data, EventHandler completedProc, bool isModal ) : FrameworkElement