Inheritance: System.Windows.Controls.UserControl
        public void Initialize(VisualButtonTestControl control)
        {
            // Setup initial conditions.
            shapeButton = control.shapeButton;
            imageButton = control.imageButton;

            // Setup sizes.
            shapeButton.SetSize(119, 119);
            imageButton.SetSize(119, 119);

            // Setup the image button.
            imageButton.Source = GetImage("Button.Default.png");
            imageButton.DisabledSource = GetImage("Button.Disabled.png");
            imageButton.OverSource = GetImage("Button.Over.png");
            imageButton.DownSource = GetImage("Button.Down.png");

            // Wire up events.
            shapeButton.Click += delegate { Output.Write(Colors.Orange,  "!! CLICK: ShapeButton"); };
            imageButton.Click += delegate { Output.Write(Colors.Orange, "!! CLICK: ImageButton"); };

            // Finish up.
            Offsets__Down_Only(control);
        }
 public void Toggle_Padding(VisualButtonTestControl control)
 {
     TogglePadding(shapeButton);
     TogglePadding(imageButton);
 }
 public void Toggle_IsEnabled(VisualButtonTestControl control)
 {
     shapeButton.IsEnabled = !shapeButton.IsEnabled;
     imageButton.IsEnabled = !imageButton.IsEnabled;
 }
 public void Offsets__None(VisualButtonTestControl control)
 {
     ResetOffsets(shapeButton);
     ResetOffsets(imageButton);
 }
 public void Offsets__Down_Only(VisualButtonTestControl control)
 {
     SetOffsets(shapeButton, new Point(0, 0), new Point(1, 1));
     SetOffsets(imageButton, new Point(0, 0), new Point(1, 1));
 }
 public void Offsets__Up_Down(VisualButtonTestControl control)
 {
     SetOffsets(shapeButton, new Point(-1, -1), new Point(1, 1));
     SetOffsets(imageButton, new Point(-1, -1), new Point(1, 1));
 }
 public void ImageButton__Change_Stretch(VisualButtonTestControl control)
 {
     imageButton.Stretch = imageButton.Stretch.NextValue<Stretch>();
     Output.Write("Stretch: " + imageButton.Stretch);
 }
 public void ImageButton__Increase_Size(VisualButtonTestControl control)
 {
     imageButton.Stretch = Stretch.None;
     imageButton.Width = 250;
     imageButton.Height = 250;
     Output.Write("Stretch: " + imageButton.Stretch);
     Output.Write(string.Format("Width: {0} | Height: {1}", imageButton.Width, imageButton.Height));
 }
 public void ShapeButton__Change_ShapePathData(VisualButtonTestControl control)
 {
     shapeButton.ShapePathData = Shapes.TriangleDown;
 }
 public void ShapeButton__Change_Stretch(VisualButtonTestControl control)
 {
     shapeButton.Stretch = shapeButton.Stretch.NextValue<Stretch>();
     Debug.WriteLine("Stretch: " + shapeButton.Stretch);
 }
 public void ShapeButton__Change_DefaultBrush(VisualButtonTestControl control)
 {
     shapeButton.DefaultBrush = new SolidColorBrush(Colors.Red);
 }
 public void Set_Color__Black(VisualButtonTestControl control)
 {
     control.shapeButton.SetBrushColors(Colors.Black);
 }
 public void Set_Color__Red(VisualButtonTestControl control)
 {
     control.shapeButton.SetBrushColors(Colors.Red);
 }