Table of Contents

Class ClosingWindowBehavior

Namespace
HeBianGu.Base.WpfBase
Assembly
HeBianGu.Base.WpfBase.dll

A behavior for Window that can handle the closing event.

[TypeConstraint(typeof(Window))]
public class ClosingWindowBehavior : Behavior<Window>, IAnimatable, IAttachedObject
Inheritance
ClosingWindowBehavior
Implements
Inherited Members
Extension Methods

Fields

ClosingCheckFuncProperty

ClosingCheckFunc dp

public static readonly DependencyProperty ClosingCheckFuncProperty

Field Value

DependencyProperty

Properties

ClosingCheckFunc

Get or set a function that returns a boolean value indicating whether the Window can be closed or not.

public Func<bool> ClosingCheckFunc { get; set; }

Property Value

Func<bool>

Remarks

If the result of function is true, the window can be closed, otherwise, cannot.

Methods

OnAttached()

When attached

protected override void OnAttached()

OnDetaching()

When detaching

protected override void OnDetaching()