C# 클래스 Catel.Services.UIVisualizerService

Service to show modal or non-modal popup windows. All windows will have to be registered manually or are be resolved via the Catel.MVVM.IViewLocator.
상속: Catel.Services.ViewModelServiceBase, IUIVisualizerService
파일 보기 프로젝트 열기: Catel/Catel

보호된 프로퍼티들

프로퍼티 타입 설명
RegisteredWindows Type>.Dictionary

공개 메소드들

메소드 설명
IsRegistered ( string name ) : bool

Determines whether the specified name is registered.

Register ( string name, Type windowType, bool throwExceptionIfExists = true ) : void

Registers the specified view model and the window type. This way, Catel knowns what window to show when a specific view model window is requested.

Show ( IViewModel viewModel, EventHandler completedProc = null ) : bool?

Shows a window that is registered with the specified view model in a non-modal state.

Show ( string name, object data, EventHandler completedProc = null ) : bool?

Shows a window that is registered with the specified view model in a non-modal state.

ShowAsync ( IViewModel viewModel, EventHandler completedProc = null ) : Task

Shows a window that is registered with the specified view model in a non-modal state.

ShowAsync ( string name, object data, EventHandler completedProc = null ) : Task

Shows a window that is registered with the specified view model in a non-modal state.

ShowDialog ( IViewModel viewModel, EventHandler completedProc = null ) : bool?

Shows a window that is registered with the specified view model in a modal state.

ShowDialog ( string name, object data, EventHandler completedProc = null ) : bool?

Shows a window that is registered with the specified view model in a modal state.

ShowDialogAsync ( IViewModel viewModel, EventHandler completedProc = null ) : Task

Shows a window that is registered with the specified view model in a modal state.

ShowDialogAsync ( string name, object data, EventHandler completedProc = null ) : Task

Shows a window that is registered with the specified view model in a modal state.

UIVisualizerService ( IViewLocator viewLocator ) : System

Initializes a new instance of the UIVisualizerService class.

UIVisualizerService ( IViewLocator viewLocator, ITypeFactory typeFactory, ILanguageService languageService ) : System

Initializes a new instance of the UIVisualizerService class.

Unregister ( string name ) : bool

This unregisters the specified view model.

보호된 메소드들

메소드 설명
CreateWindow ( Type windowType, object data, EventHandler completedProc, bool isModal ) : FrameworkElement

This creates the window of the specified type.

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

This creates the window from a key.

EnsureViewIsRegistered ( string name ) : void

Ensures that the specified view is registered.

GetActiveWindow ( ) : FrameworkElement

Gets the active window to use as parent window of new windows. The default implementation returns the active window of the application.

HandleCloseSubscription ( object window, object data, EventHandler completedProc, bool isModal ) : void

Handles the close subscription. The default implementation uses the DynamicEventListener.

RegisterViewForViewModelIfRequired ( Type viewModelType ) : void

Registers the view for the specified view model if required.

ShowWindow ( FrameworkElement window, bool showModal ) : bool?

Shows the window.

ShowWindowAsync ( FrameworkElement window, bool showModal ) : Task

Shows the window.

비공개 메소드들

메소드 설명
CloseModal ( ) : System.Threading.Tasks.Task

DisplayUsingNavigation ( IViewModel viewModel, EventHandler completedProc, StackLayout contentLayout ) : System.Threading.Tasks.Task

OnBackButtonPressed ( object sender, EventArgs e ) : void

OnCancelButtonClicked ( IViewModel viewModel, EventHandler completedProc ) : void

OnOkButtonClicked ( IViewModel viewModel, EventHandler completedProc ) : void

TryDisplayAsPopup ( IViewModel viewModel, EventHandler completedProc, StackLayout contentLayout ) : Task

메소드 상세

CreateWindow() 보호된 메소드

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.
리턴 System.Windows.FrameworkElement

CreateWindow() 보호된 메소드

This creates the window from a key.
protected CreateWindow ( string name, object data, EventHandler completedProc, bool isModal ) : FrameworkElement
name string The name that the window is registered with.
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.
리턴 System.Windows.FrameworkElement

EnsureViewIsRegistered() 보호된 메소드

Ensures that the specified view is registered.
protected EnsureViewIsRegistered ( string name ) : void
name string The name.
리턴 void

GetActiveWindow() 보호된 메소드

Gets the active window to use as parent window of new windows. The default implementation returns the active window of the application.
protected GetActiveWindow ( ) : FrameworkElement
리턴 System.Windows.FrameworkElement

HandleCloseSubscription() 보호된 메소드

Handles the close subscription. The default implementation uses the DynamicEventListener.
protected HandleCloseSubscription ( object window, object data, EventHandler completedProc, bool isModal ) : void
window object 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.
리턴 void

IsRegistered() 공개 메소드

Determines whether the specified name is registered.
The is null or whitespace.
public IsRegistered ( string name ) : bool
name string The name.
리턴 bool

Register() 공개 메소드

Registers the specified view model and the window type. This way, Catel knowns what window to show when a specific view model window is requested.
The is null or whitespace. The is not of the right type.
public Register ( string name, Type windowType, bool throwExceptionIfExists = true ) : void
name string Name of the registered window.
windowType System.Type Type of the window.
throwExceptionIfExists bool /// if set to true, this method will throw an exception when already /// registered. ///
리턴 void

RegisterViewForViewModelIfRequired() 보호된 메소드

Registers the view for the specified view model if required.
protected RegisterViewForViewModelIfRequired ( Type viewModelType ) : void
viewModelType System.Type Type of the view model.
리턴 void

Show() 공개 메소드

Shows a window that is registered with the specified view model in a non-modal state.
The is null. /// The is not registered by the /// method first. ///
public Show ( IViewModel viewModel, EventHandler completedProc = null ) : bool?
viewModel IViewModel The view model.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 bool?

Show() 공개 메소드

Shows a window that is registered with the specified view model in a non-modal state.
The is null or whitespace. /// The is not registered by the /// method first. ///
public Show ( string name, object data, EventHandler completedProc = null ) : bool?
name string The name that the window is registered with.
data object The data to set as data context. If null, the data context will be untouched.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 bool?

ShowAsync() 공개 메소드

Shows a window that is registered with the specified view model in a non-modal state.
The is null. /// The is not registered by the /// method first. ///
public ShowAsync ( IViewModel viewModel, EventHandler completedProc = null ) : Task
viewModel IViewModel The view model.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 Task

ShowAsync() 공개 메소드

Shows a window that is registered with the specified view model in a non-modal state.
The is null or whitespace. /// The is not registered by the /// method first. ///
public ShowAsync ( string name, object data, EventHandler completedProc = null ) : Task
name string The name that the window is registered with.
data object The data to set as data context. If null, the data context will be untouched.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 Task

ShowDialog() 공개 메소드

Shows a window that is registered with the specified view model in a modal state.
The is null. /// The is not registered by the /// method first. ///
public ShowDialog ( IViewModel viewModel, EventHandler completedProc = null ) : bool?
viewModel IViewModel The view model.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 bool?

ShowDialog() 공개 메소드

Shows a window that is registered with the specified view model in a modal state.
The is null or whitespace. /// The is not registered by the /// method first. ///
public ShowDialog ( string name, object data, EventHandler completedProc = null ) : bool?
name string The name that the window is registered with.
data object The data to set as data context. If null, the data context will be untouched.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 bool?

ShowDialogAsync() 공개 메소드

Shows a window that is registered with the specified view model in a modal state.
The is null. /// The is not registered by the /// method first. ///
public ShowDialogAsync ( IViewModel viewModel, EventHandler completedProc = null ) : Task
viewModel IViewModel The view model.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 Task

ShowDialogAsync() 공개 메소드

Shows a window that is registered with the specified view model in a modal state.
The is null or whitespace. /// The is not registered by the /// method first. ///
public ShowDialogAsync ( string name, object data, EventHandler completedProc = null ) : Task
name string The name that the window is registered with.
data object The data to set as data context. If null, the data context will be untouched.
completedProc EventHandler /// The callback procedure that will be invoked as soon as the window is closed. This value can /// be null. ///
리턴 Task

ShowWindow() 보호된 메소드

Shows the window.
protected ShowWindow ( FrameworkElement window, bool showModal ) : bool?
window FrameworkElement The window.
showModal bool If true, the window should be shown as modal.
리턴 bool?

ShowWindowAsync() 보호된 메소드

Shows the window.
protected ShowWindowAsync ( FrameworkElement window, bool showModal ) : Task
window FrameworkElement The window.
showModal bool If true, the window should be shown as modal.
리턴 Task

UIVisualizerService() 공개 메소드

Initializes a new instance of the UIVisualizerService class.
The is null.
public UIVisualizerService ( IViewLocator viewLocator ) : System
viewLocator IViewLocator The view locator.
리턴 System

UIVisualizerService() 공개 메소드

Initializes a new instance of the UIVisualizerService class.
The is null. The is null. The is null.
public UIVisualizerService ( IViewLocator viewLocator, ITypeFactory typeFactory, ILanguageService languageService ) : System
viewLocator IViewLocator
typeFactory ITypeFactory
languageService ILanguageService
리턴 System

Unregister() 공개 메소드

This unregisters the specified view model.
public Unregister ( string name ) : bool
name string Name of the registered window.
리턴 bool

프로퍼티 상세

RegisteredWindows 보호되어 있는 프로퍼티

Dictionary of registered windows.
protected Dictionary RegisteredWindows
리턴 Type>.Dictionary