Table of Contents

Class AutoDisabledImageBehavior

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

Behavior which applies a grayscale effect to an image when it's parent Button or MenuItem is disabled. 图片控件 当不可用时设置成灰白

public class AutoDisabledImageBehavior : Behavior<Image>, IAnimatable, IAttachedObject
Inheritance
AutoDisabledImageBehavior
Implements
Inherited Members
Extension Methods

Fields

IsActiveProperty

Attached property to allow this to be associated with an image in a Style setter.

public static readonly DependencyProperty IsActiveProperty

Field Value

DependencyProperty

OwnerTypeProperty

Dependency Property to back the owner type property.

public static readonly DependencyProperty OwnerTypeProperty

Field Value

DependencyProperty

Properties

OwnerType

Owner type to look for (automatically scans for Button or MenuItem)

public Type OwnerType { get; set; }

Property Value

Type

Methods

GetIsActive(Image)

Attached property getter

public static bool GetIsActive(Image theImage)

Parameters

theImage Image

Returns

bool

OnAttached()

Called after the behavior is attached to an AssociatedObject.

protected override void OnAttached()

Remarks

Override this to hook up functionality to the AssociatedObject.

OnDetaching()

Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.

protected override void OnDetaching()

Remarks

Override this to unhook functionality from the AssociatedObject.

SetIsActive(Image, bool)

Attached property setter

public static void SetIsActive(Image theImage, bool value)

Parameters

theImage Image
value bool