Here is a quick custom control (not tested).
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
namespace WpfFlyoutMock3.Control
{
public class ImageButton : Button
{
static ImageButton()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(BitmapImage),
new FrameworkPropertyMetadata(typeof(BitmapImage)));
}
#region Properties
public static readonly DependencyProperty PathDataProperty = DependencyProperty.Register
(
"Image",
typeof(BitmapImage),
typeof(ImageButton),
new PropertyMetadata(null)
);
public BitmapImage Image
{
get { return (BitmapImage)GetValue(PathDataProperty); }
set { SetValue(PathDataProperty, value); }
}
#endregion
}
}