C# Class Caliburn.Micro.TelerikWindowManager

A service that manages windows. Implementation for RadWindow
Inheritance: IWindowManager
Show file Open project: vcaraulean/Caliburn.Micro.Telerik Class Usage Examples

Public Methods

Method Description
Alert ( DialogParameters dialogParameters ) : void
Alert ( string title, string message ) : void
Confirm ( DialogParameters dialogParameters ) : void
Confirm ( string title, string message, System onOK, System onCancel = null ) : void
Prompt ( DialogParameters dialogParameters ) : void
Prompt ( string title, string message, string defaultPromptResultValue, Action onOK ) : void
Show ( object rootModel, object context = null, object>.IDictionary settings = null ) : void

Shows a normal, non-modal dialog for the specified model. By default RadWindow dialog is shown at the center of the screen

ShowDialog ( object rootModel, object context = null, object>.IDictionary settings = null ) : bool?
ShowDialog ( object rootModel, object context = null, object>.IDictionary settings = null ) : void

Shows a modal dialog for the specified model. By default RadWindow dialog is shown at the center of the screen

ShowNotification ( object rootModel, int durationInMilliseconds, object context = null, object>.IDictionary settings = null ) : void

Shows a toast notification for the specified model.

ShowPopup ( object rootModel, object context = null, object>.IDictionary settings = null ) : void

Shows a popup at the current mouse position.

ShowWindow ( object rootModel, object context = null, object>.IDictionary settings = null ) : void

Protected Methods

Method Description
CreatePopup ( object rootModel, object>.IDictionary settings ) : System.Windows.Controls.Primitives.Popup

Creates a popup for hosting a popup window.

CreateRadWindow ( object rootModel, bool isDialog, object context, object>.IDictionary settings ) : RadWindow

Creates a window.

EnsureRadWindow ( object model, object view, bool isDialog ) : RadWindow

Makes sure the view is a window is is wrapped by one.

GetActiveWindow ( ) : Window

Infers the owner of the window.

Private Methods

Method Description
AdjustWindowAndContentSize ( RadWindow window, FrameworkElement view ) : void

Initializes Window size with values extracted by the view. Note: The real size of the content will be smaller than provided values. The form has the header (title) and border so they will take place.

ApplyRadWindowSettings ( object target, object>.IEnumerable settings ) : bool
ApplySettings ( object target, object>.IEnumerable settings ) : bool
EnsureWindow ( object model, object view ) : RadWindow
PrepareRadWindow ( object rootModel, object context, object>.IDictionary settings ) : RadWindow

Method Details

Alert() public static method

public static Alert ( DialogParameters dialogParameters ) : void
dialogParameters DialogParameters
return void

Alert() public static method

public static Alert ( string title, string message ) : void
title string
message string
return void

Confirm() public static method

public static Confirm ( DialogParameters dialogParameters ) : void
dialogParameters DialogParameters
return void

Confirm() public static method

public static Confirm ( string title, string message, System onOK, System onCancel = null ) : void
title string
message string
onOK System
onCancel System
return void

CreatePopup() protected method

Creates a popup for hosting a popup window.
protected CreatePopup ( object rootModel, object>.IDictionary settings ) : System.Windows.Controls.Primitives.Popup
rootModel object The model.
settings object>.IDictionary The optional popup settings.
return System.Windows.Controls.Primitives.Popup

CreateRadWindow() protected method

Creates a window.
protected CreateRadWindow ( object rootModel, bool isDialog, object context, object>.IDictionary settings ) : RadWindow
rootModel object The view model.
isDialog bool Whethor or not the window is being shown as a dialog.
context object The view context.
settings object>.IDictionary The optional popup settings.
return RadWindow

EnsureRadWindow() protected method

Makes sure the view is a window is is wrapped by one.
protected EnsureRadWindow ( object model, object view, bool isDialog ) : RadWindow
model object The view model.
view object The view.
isDialog bool Whethor or not the window is being shown as a dialog.
return RadWindow

GetActiveWindow() protected method

Infers the owner of the window.
protected GetActiveWindow ( ) : Window
return System.Windows.Window

Prompt() public static method

public static Prompt ( DialogParameters dialogParameters ) : void
dialogParameters DialogParameters
return void

Prompt() public static method

public static Prompt ( string title, string message, string defaultPromptResultValue, Action onOK ) : void
title string
message string
defaultPromptResultValue string
onOK Action
return void

Show() public method

Shows a normal, non-modal dialog for the specified model. By default RadWindow dialog is shown at the center of the screen
public Show ( object rootModel, object context = null, object>.IDictionary settings = null ) : void
rootModel object The root model.
context object The context.
settings object>.IDictionary The optional RadWindow settings.
return void

ShowDialog() public method

public ShowDialog ( object rootModel, object context = null, object>.IDictionary settings = null ) : bool?
rootModel object
context object
settings object>.IDictionary
return bool?

ShowDialog() public method

Shows a modal dialog for the specified model. By default RadWindow dialog is shown at the center of the screen
public ShowDialog ( object rootModel, object context = null, object>.IDictionary settings = null ) : void
rootModel object The root model.
context object The context.
settings object>.IDictionary The optional RadWindow settings.
return void

ShowNotification() public method

Shows a toast notification for the specified model.
public ShowNotification ( object rootModel, int durationInMilliseconds, object context = null, object>.IDictionary settings = null ) : void
rootModel object The root model.
durationInMilliseconds int How long the notification should appear for.
context object The context.
settings object>.IDictionary The optional RadWindow Settings
return void

ShowPopup() public method

Shows a popup at the current mouse position.
public ShowPopup ( object rootModel, object context = null, object>.IDictionary settings = null ) : void
rootModel object The root model.
context object The view context.
settings object>.IDictionary The optional popup settings.
return void

ShowWindow() public method

public ShowWindow ( object rootModel, object context = null, object>.IDictionary settings = null ) : void
rootModel object
context object
settings object>.IDictionary
return void