C# Class WinRTXamlToolkit.Controls.ImageButton

Inheritance: Windows.UI.Xaml.Controls.Button
Show file Open project: xyzzer/WinRTXamlToolkit

Public Properties

Property Type Description
DisabledStateImageSourceProperty Windows.UI.Xaml.DependencyProperty
DisabledStateImageUriSourceProperty Windows.UI.Xaml.DependencyProperty
GenerateMissingImagesProperty Windows.UI.Xaml.DependencyProperty
GeneratedDisabledStateGrayscaleAmountProperty Windows.UI.Xaml.DependencyProperty
GeneratedHoverStateLightenAmountProperty Windows.UI.Xaml.DependencyProperty
GeneratedPressedStateLightenAmountProperty Windows.UI.Xaml.DependencyProperty
HoverStateImageSourceProperty Windows.UI.Xaml.DependencyProperty
HoverStateImageUriSourceProperty Windows.UI.Xaml.DependencyProperty
NormalStateImageSourceProperty Windows.UI.Xaml.DependencyProperty
NormalStateImageUriSourceProperty Windows.UI.Xaml.DependencyProperty
PressedStateImageSourceProperty Windows.UI.Xaml.DependencyProperty
PressedStateImageUriSourceProperty Windows.UI.Xaml.DependencyProperty
RecyclePressedStateImageForHoverProperty Windows.UI.Xaml.DependencyProperty
StretchProperty Windows.UI.Xaml.DependencyProperty

Public Methods

Method Description
ImageButton ( ) : System

Initializes a new instance of the ImageButton class.

Protected Methods

Method Description
OnApplyTemplate ( ) : void

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

OnDisabledStateImageSourceChanged ( ImageSource oldDisabledStateImageSource, ImageSource newDisabledStateImageSource ) : void

Provides derived classes an opportunity to handle changes to the DisabledStateImageSource property.

OnGenerateMissingImagesChanged ( bool oldGenerateMissingImages, bool newGenerateMissingImages ) : void

Provides derived classes an opportunity to handle changes to the GenerateMissingImages property.

OnGeneratedDisabledStateGrayscaleAmountChanged ( double oldGeneratedDisabledStateGrayscaleAmount, double newGeneratedDisabledStateGrayscaleAmount ) : void

Provides derived classes an opportunity to handle changes to the GeneratedDisabledStateGrayscaleAmount property.

OnGeneratedHoverStateLightenAmountChanged ( double oldGeneratedHoverStateLightenAmount, double newGeneratedHoverStateLightenAmount ) : void

Provides derived classes an opportunity to handle changes to the GeneratedHoverStateLightenAmount property.

OnGeneratedPressedStateLightenAmountChanged ( double oldGeneratedPressedStateLightenAmount, double newGeneratedPressedStateLightenAmount ) : void

Provides derived classes an opportunity to handle changes to the GeneratedPressedStateLightenAmount property.

OnHoverStateImageSourceChanged ( ImageSource oldHoverStateImageSource, ImageSource newHoverStateImageSource ) : void

Provides derived classes an opportunity to handle changes to the HoverStateImageSource property.

OnNormalStateImageSourceChanged ( ImageSource oldNormalStateImageSource, ImageSource newNormalStateImageSource ) : void

Provides derived classes an opportunity to handle changes to the NormalStateImageSource property.

OnPressedStateImageSourceChanged ( ImageSource oldPressedStateImageSource, ImageSource newPressedStateImageSource ) : void

Provides derived classes an opportunity to handle changes to the PressedStateImageSource property.

OnRecyclePressedStateImageForHoverChanged ( bool oldRecyclePressedStateImageForHover, bool newRecyclePressedStateImageForHover ) : void

Provides derived classes an opportunity to handle changes to the RecyclePressedStateImageForHover property.

Private Methods

Method Description
GenerateDisabledStateImage ( ) : void
GenerateHoverStateImage ( ) : void
GeneratePressedStateImage ( ) : void
OnDisabledStateImageSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the DisabledStateImageSource property.

OnDisabledStateImageUriSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the DisabledStateImageUriSource property.

OnDisabledStateImageUriSourceChanged ( Uri oldDisabledStateImageUriSource, Uri newDisabledStateImageUriSource ) : void

Provides derived classes an opportunity to handle changes to the DisabledStateImageUriSource property.

OnGenerateMissingImagesChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the GenerateMissingImages property.

OnGeneratedDisabledStateGrayscaleAmountChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the GeneratedDisabledStateGrayscaleAmount property.

OnGeneratedHoverStateLightenAmountChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the GeneratedHoverStateLightenAmount property.

OnGeneratedPressedStateLightenAmountChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the GeneratedPressedStateLightenAmount property.

OnHoverStateImageSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the HoverStateImageSource property.

OnHoverStateImageUriSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the HoverStateImageUriSource property.

OnHoverStateImageUriSourceChanged ( Uri oldHoverStateImageUriSource, Uri newHoverStateImageUriSource ) : void

Provides derived classes an opportunity to handle changes to the HoverStateImageUriSource property.

OnNormalStateImageSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the NormalStateImageSource property.

OnNormalStateImageUriSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the NormalStateImageUriSource property.

OnNormalStateImageUriSourceChanged ( Uri oldNormalStateImageUriSource, Uri newNormalStateImageUriSource ) : void

Provides derived classes an opportunity to handle changes to the NormalStateImageUriSource property.

OnPressedStateImageSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the PressedStateImageSource property.

OnPressedStateImageUriSourceChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the PressedStateImageUriSource property.

OnPressedStateImageUriSourceChanged ( Uri oldPressedStateImageUriSource, Uri newPressedStateImageUriSource ) : void

Provides derived classes an opportunity to handle changes to the PressedStateImageUriSource property.

OnRecyclePressedStateImageForHoverChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the RecyclePressedStateImageForHover property.

UpdateDisabledStateImage ( ) : void
UpdateHoverStateImage ( ) : void
UpdateNormalStateImage ( ) : void
UpdatePressedStateImage ( ) : void
UpdateRecycledHoverStateImages ( ) : void

Method Details

ImageButton() public method

Initializes a new instance of the ImageButton class.
public ImageButton ( ) : System
return System

OnApplyTemplate() protected method

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.
protected OnApplyTemplate ( ) : void
return void

OnDisabledStateImageSourceChanged() protected method

Provides derived classes an opportunity to handle changes to the DisabledStateImageSource property.
protected OnDisabledStateImageSourceChanged ( ImageSource oldDisabledStateImageSource, ImageSource newDisabledStateImageSource ) : void
oldDisabledStateImageSource ImageSource The old DisabledStateImageSource value
newDisabledStateImageSource ImageSource The new DisabledStateImageSource value
return void

OnGenerateMissingImagesChanged() protected method

Provides derived classes an opportunity to handle changes to the GenerateMissingImages property.
protected OnGenerateMissingImagesChanged ( bool oldGenerateMissingImages, bool newGenerateMissingImages ) : void
oldGenerateMissingImages bool The old GenerateMissingImages value
newGenerateMissingImages bool The new GenerateMissingImages value
return void

OnGeneratedDisabledStateGrayscaleAmountChanged() protected method

Provides derived classes an opportunity to handle changes to the GeneratedDisabledStateGrayscaleAmount property.
protected OnGeneratedDisabledStateGrayscaleAmountChanged ( double oldGeneratedDisabledStateGrayscaleAmount, double newGeneratedDisabledStateGrayscaleAmount ) : void
oldGeneratedDisabledStateGrayscaleAmount double The old GeneratedDisabledStateGrayscaleAmount value
newGeneratedDisabledStateGrayscaleAmount double The new GeneratedDisabledStateGrayscaleAmount value
return void

OnGeneratedHoverStateLightenAmountChanged() protected method

Provides derived classes an opportunity to handle changes to the GeneratedHoverStateLightenAmount property.
protected OnGeneratedHoverStateLightenAmountChanged ( double oldGeneratedHoverStateLightenAmount, double newGeneratedHoverStateLightenAmount ) : void
oldGeneratedHoverStateLightenAmount double The old GeneratedHoverStateLightenAmount value
newGeneratedHoverStateLightenAmount double The new GeneratedHoverStateLightenAmount value
return void

OnGeneratedPressedStateLightenAmountChanged() protected method

Provides derived classes an opportunity to handle changes to the GeneratedPressedStateLightenAmount property.
protected OnGeneratedPressedStateLightenAmountChanged ( double oldGeneratedPressedStateLightenAmount, double newGeneratedPressedStateLightenAmount ) : void
oldGeneratedPressedStateLightenAmount double The old GeneratedPressedStateLightenAmount value
newGeneratedPressedStateLightenAmount double The new GeneratedPressedStateLightenAmount value
return void

OnHoverStateImageSourceChanged() protected method

Provides derived classes an opportunity to handle changes to the HoverStateImageSource property.
protected OnHoverStateImageSourceChanged ( ImageSource oldHoverStateImageSource, ImageSource newHoverStateImageSource ) : void
oldHoverStateImageSource ImageSource The old HoverStateImageSource value
newHoverStateImageSource ImageSource The new HoverStateImageSource value
return void

OnNormalStateImageSourceChanged() protected method

Provides derived classes an opportunity to handle changes to the NormalStateImageSource property.
protected OnNormalStateImageSourceChanged ( ImageSource oldNormalStateImageSource, ImageSource newNormalStateImageSource ) : void
oldNormalStateImageSource ImageSource The old NormalStateImageSource value
newNormalStateImageSource ImageSource The new NormalStateImageSource value
return void

OnPressedStateImageSourceChanged() protected method

Provides derived classes an opportunity to handle changes to the PressedStateImageSource property.
protected OnPressedStateImageSourceChanged ( ImageSource oldPressedStateImageSource, ImageSource newPressedStateImageSource ) : void
oldPressedStateImageSource ImageSource The old PressedStateImageSource value
newPressedStateImageSource ImageSource The new PressedStateImageSource value
return void

OnRecyclePressedStateImageForHoverChanged() protected method

Provides derived classes an opportunity to handle changes to the RecyclePressedStateImageForHover property.
protected OnRecyclePressedStateImageForHoverChanged ( bool oldRecyclePressedStateImageForHover, bool newRecyclePressedStateImageForHover ) : void
oldRecyclePressedStateImageForHover bool The old RecyclePressedStateImageForHover value
newRecyclePressedStateImageForHover bool The new RecyclePressedStateImageForHover value
return void

Property Details

DisabledStateImageSourceProperty public static property

DisabledStateImageSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml DisabledStateImageSourceProperty
return Windows.UI.Xaml.DependencyProperty

DisabledStateImageUriSourceProperty public static property

DisabledStateImageUriSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml DisabledStateImageUriSourceProperty
return Windows.UI.Xaml.DependencyProperty

GenerateMissingImagesProperty public static property

GenerateMissingImages Dependency Property
public static DependencyProperty,Windows.UI.Xaml GenerateMissingImagesProperty
return Windows.UI.Xaml.DependencyProperty

GeneratedDisabledStateGrayscaleAmountProperty public static property

GeneratedDisabledStateGrayscaleAmount Dependency Property
public static DependencyProperty,Windows.UI.Xaml GeneratedDisabledStateGrayscaleAmountProperty
return Windows.UI.Xaml.DependencyProperty

GeneratedHoverStateLightenAmountProperty public static property

GeneratedHoverStateLightenAmount Dependency Property
public static DependencyProperty,Windows.UI.Xaml GeneratedHoverStateLightenAmountProperty
return Windows.UI.Xaml.DependencyProperty

GeneratedPressedStateLightenAmountProperty public static property

GeneratedPressedStateLightenAmount Dependency Property
public static DependencyProperty,Windows.UI.Xaml GeneratedPressedStateLightenAmountProperty
return Windows.UI.Xaml.DependencyProperty

HoverStateImageSourceProperty public static property

HoverStateImageSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml HoverStateImageSourceProperty
return Windows.UI.Xaml.DependencyProperty

HoverStateImageUriSourceProperty public static property

HoverStateImageUriSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml HoverStateImageUriSourceProperty
return Windows.UI.Xaml.DependencyProperty

NormalStateImageSourceProperty public static property

NormalStateImageSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml NormalStateImageSourceProperty
return Windows.UI.Xaml.DependencyProperty

NormalStateImageUriSourceProperty public static property

NormalStateImageUriSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml NormalStateImageUriSourceProperty
return Windows.UI.Xaml.DependencyProperty

PressedStateImageSourceProperty public static property

PressedStateImageSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml PressedStateImageSourceProperty
return Windows.UI.Xaml.DependencyProperty

PressedStateImageUriSourceProperty public static property

PressedStateImageUriSource Dependency Property
public static DependencyProperty,Windows.UI.Xaml PressedStateImageUriSourceProperty
return Windows.UI.Xaml.DependencyProperty

RecyclePressedStateImageForHoverProperty public static property

RecyclePressedStateImageForHover Dependency Property
public static DependencyProperty,Windows.UI.Xaml RecyclePressedStateImageForHoverProperty
return Windows.UI.Xaml.DependencyProperty

StretchProperty public static property

Stretch Dependency Property
public static DependencyProperty,Windows.UI.Xaml StretchProperty
return Windows.UI.Xaml.DependencyProperty