Click or drag to resize

ExtensionsTryClose Method

Tries to close a view associated with the view model

Namespace:  Cauldron.XAML
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static bool TryClose(
	this IDialogViewModel viewModel
)

Parameters

viewModel
Type: Cauldron.XAML.ViewModelsIDialogViewModel
The viewmodel to that was assigned to the window's data context

Return Value

Type: Boolean
Returns true if successfully closed, otherwise false

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDialogViewModel. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionParameter viewModel is null
See Also