ImageButton ClassDW.WPFToolkit Documentation
Enhances the Button to show an disabled image. The bound image will be shown monochrome if the button is disabled.
Inheritance Hierarchy

SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              System.Windows.ControlsContentControl
                System.Windows.Controls.PrimitivesButtonBase
                  System.Windows.ControlsButton
                    DW.WPFToolkit.ControlsImageButton

Namespace: DW.WPFToolkit.Controls
Assembly: DW.WPFToolkit (in DW.WPFToolkit.dll) Version: 5.6.0.0
Syntax

C#
public class ImageButton : Button

The ImageButton type exposes the following members.

Constructors

  NameDescription
Public methodImageButton
Initializes a new instance of the ImageButton class
Top
Fields

  NameDescription
Public fieldStatic memberDisabledImageSourceProperty
Identifies the DisabledImageSource dependency property.
Public fieldStatic memberHorizontalImageAlignmentProperty
Identifies the HorizontalImageAlignment dependency property.
Public fieldStatic memberImageHeightProperty
Identifies the ImageHeight dependency property.
Public fieldStatic memberImageMarginProperty
Identifies the ImageMargin dependency property.
Public fieldStatic memberImagePositionProperty
Identifies the ImagePosition dependency property.
Public fieldStatic memberImageSourceProperty
Identifies the ImageSource dependency property.
Public fieldStatic memberImageStretchProperty
Identifies the ImageStretch dependency property.
Public fieldStatic memberImageWidthProperty
Identifies the ImageWidth dependency property.
Public fieldStatic memberVerticalImageAlignmentProperty
Identifies the VerticalImageAlignment dependency property.
Top
Properties

  NameDescription
Public propertyDisabledImageSource
Gets or sets the image to be used when the button is disabled. This will set internaly by the ImageSource to a monochrome image.
Public propertyHorizontalImageAlignment
Gets or sets the horizontal alignment of the image shown in the button.
Public propertyImageHeight
Gets or sets the height of the image shown in the button.
Public propertyImageMargin
Gets or sets the margin of the image shown in the button.
Public propertyImagePosition
Gets or sets a value that indicates where the image have to be placed in the button.
Public propertyImageSource
Gets or sets the source if the button image.
Public propertyImageStretch
Gets or sets a value that indicated how the image have to be stretched in the button.
Public propertyImageWidth
Gets or sets the width of the image shown in the button.
Public propertyVerticalImageAlignment
Gets or sets the vertical alignment of the image shown in the button.
Top
Examples

XAML
<UniformGrid Rows="1" DockPanel.Dock="Bottom" HorizontalAlignment="Center">

    <Toolkit:ImageButton Content="Back"
                         ImageSource="/MyAssembly;component/Data/Previous.png" />

    <Toolkit:ImageButton Content="Next"
                         ImageSource="/MyAssembly.Demo;component/Data/Next.png" 
                         ImagePosition="Right"
                         ImageMargin="4,0,0,0" />

    <Toolkit:ImageButton Content="Finish"
                         IsEnabled="False"
                         ImageSource="/MyAssembly;component/Data/OK.png" />

    <Toolkit:ImageButton Content="Cancel"
                         ImageSource="/MyAssembly;component/Data/Cancel.png" />

</UniformGrid>
See Also

Reference