public MainWindow()
        {
            ExceptionController = new ExceptionController();
            Dispatcher.UnhandledException += ApplicationOnDispatcherUnhandledException;

            InitializeComponent();

            AppProgressBarController = new AppProgressBarController(ProgressForm, AppProgressBar, AppProgressBarLabel);
            SkinController = new SkinController(CanvasPreview, TeFile, AppProgressBarController, RenderImage, SvCanvas);
            CanvasPreview.MouseMove += CanvasPreviewOnMouseMove;
            CanvasPreview.MouseDown += CanvasPreviewOnPreviewMouseDown;
            CanvasPreview.PreviewMouseUp += CanvasPreviewOnPreviewMouseUp;
            TvSkinProject.SelectedItemChanged += TvSkinProjectOnSelectedItemChanged;
            PgElement.PropertyValueChanged += PgElementOnPropertyValueChanged;
        }
 public SkinElementControl(SkinController skinController, SkinElement skinElement)
 {
     SkinController = skinController;
     SkinElement = skinElement;
     Focusable = true;
     Canvas.SetLeft(this, skinElement.X);
     Canvas.SetTop(this, skinElement.Y);
     Template = (ControlTemplate) Application.Current.TryFindResource("ThumbTemplate");
     PreviewMouseDown += OnPreviewMouseDown;
     PreviewMouseUp += OnPreviewMouseUp;
     PreviewKeyDown += OnPreviewKeyDown;
     PreviewKeyUp += OnPreviewKeyUp;
     DragDelta += OnDragDelta;
     MouseEnter += OnMouseEnter;
     MouseLeave += OnMouseLeave;
     DrawNormal();
 }