A WPF custom usercontrol as image button.
The XImageButton
custom user control has several DependencyProperty you could change.
Most basic build-in members:
- Name
- ToolTip
- Background
- BorderBrush
- BorderThickness
- Width and Height
- Click
Additional members:
- ImageWidth and ImageHeight
- TextContent
- ForeImages
- NormalImage
- HoverImage
- PressedImage
- DisabledImage
- HoverBrush
One could see an example button in MainWindow.xaml
Showcase image:
(This is an animated png image. If you couldn't see it, change another browser!)
Avoid to set Content
property in XImageButton
. You may break the content inside the control. I haven't have time to fix this issue.