Class AutoDisabledImageBehavior
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
OwnerTypeProperty
Dependency Property to back the owner type property.
public static readonly DependencyProperty OwnerTypeProperty
Field Value
Properties
OwnerType
Owner type to look for (automatically scans for Button or MenuItem)
public Type OwnerType { get; set; }
Property Value
Methods
GetIsActive(Image)
Attached property getter
public static bool GetIsActive(Image theImage)
Parameters
theImage
Image
Returns
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)