using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;

namespace BeWo.Controls.Controls
{
	public class DeleteButton : Button
	{
		public DeleteButton()
		{
			var lDisabled = new Style(typeof (Canvas));
			var lTrigger = new Trigger {Property = IsEnabledProperty, Value = false};
			lTrigger.Setters.Add(new Setter {Property = OpacityProperty, Value = 0.2d});
			Resources.Add(typeof (Canvas), lDisabled);

			var lContent = new Canvas {HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch};
			lContent.Children.Add(new Path {Stroke = Brushes.Black, StrokeThickness = 1.5d, StrokeStartLineCap = PenLineCap.Round, StrokeEndLineCap = PenLineCap.Round, Data = Geometry.Parse("M -3,-3 L 3, 3")});

			lContent.Children.Add(new Path {Stroke = Brushes.Black, StrokeThickness = 1.5d, StrokeStartLineCap = PenLineCap.Round, StrokeEndLineCap = PenLineCap.Round, Data = Geometry.Parse("M 3,-3 L -3, 3")});

			Content = lContent;
		}
	}
}