public FrameworkElement CreateWidgetControl(IDiagram widgetViewModel, ContextMenu contextMenu)
        {
            var buttonHolder = widgetViewModel as TicketExplorerViewModel;

            var ret = new TicketExplorerView { DataContext = buttonHolder, ContextMenu = contextMenu };

            var heightBinding = new Binding("Height") { Source = buttonHolder, Mode = BindingMode.TwoWay };
            var widthBinding = new Binding("Width") { Source = buttonHolder, Mode = BindingMode.TwoWay };
            var xBinding = new Binding("X") { Source = buttonHolder, Mode = BindingMode.TwoWay };
            var yBinding = new Binding("Y") { Source = buttonHolder, Mode = BindingMode.TwoWay };
            var radiusBinding = new Binding("CornerRadius") { Source = buttonHolder, Mode = BindingMode.TwoWay };
            var buttonColorBinding = new Binding("ButtonColor") { Source = buttonHolder, Mode = BindingMode.TwoWay };
            var enabledBinding = new Binding("IsEnabled") { Source = buttonHolder, Mode = BindingMode.OneWay };
            var transformBinding = new Binding("RenderTransform") { Source = buttonHolder, Mode = BindingMode.OneWay };

            ret.SetBinding(InkCanvas.LeftProperty, xBinding);
            ret.SetBinding(InkCanvas.TopProperty, yBinding);
            ret.SetBinding(FrameworkElement.HeightProperty, heightBinding);
            ret.SetBinding(FrameworkElement.WidthProperty, widthBinding);
            //ret.SetBinding(FlexButton.FlexButton.CornerRadiusProperty, radiusBinding);
            //ret.SetBinding(FlexButton.FlexButton.ButtonColorProperty, buttonColorBinding);
            //ret.SetBinding(UIElement.RenderTransformProperty, transformBinding);
            //ret.SetBinding(UIElement.IsEnabledProperty, enabledBinding);

            return ret;
        }
        public FrameworkElement CreateWidgetControl(IDiagram widgetViewModel, ContextMenu contextMenu)
        {
            var buttonHolder = widgetViewModel as TicketExplorerViewModel;

            var ret = new TicketExplorerView {
                DataContext = buttonHolder, ContextMenu = contextMenu
            };

            var heightBinding = new Binding("Height")
            {
                Source = buttonHolder, Mode = BindingMode.TwoWay
            };
            var widthBinding = new Binding("Width")
            {
                Source = buttonHolder, Mode = BindingMode.TwoWay
            };
            var xBinding = new Binding("X")
            {
                Source = buttonHolder, Mode = BindingMode.TwoWay
            };
            var yBinding = new Binding("Y")
            {
                Source = buttonHolder, Mode = BindingMode.TwoWay
            };
            var radiusBinding = new Binding("CornerRadius")
            {
                Source = buttonHolder, Mode = BindingMode.TwoWay
            };
            var buttonColorBinding = new Binding("ButtonColor")
            {
                Source = buttonHolder, Mode = BindingMode.TwoWay
            };
            var enabledBinding = new Binding("IsEnabled")
            {
                Source = buttonHolder, Mode = BindingMode.OneWay
            };
            var transformBinding = new Binding("RenderTransform")
            {
                Source = buttonHolder, Mode = BindingMode.OneWay
            };

            ret.SetBinding(InkCanvas.LeftProperty, xBinding);
            ret.SetBinding(InkCanvas.TopProperty, yBinding);
            ret.SetBinding(FrameworkElement.HeightProperty, heightBinding);
            ret.SetBinding(FrameworkElement.WidthProperty, widthBinding);
            //ret.SetBinding(FlexButton.FlexButton.CornerRadiusProperty, radiusBinding);
            //ret.SetBinding(FlexButton.FlexButton.ButtonColorProperty, buttonColorBinding);
            //ret.SetBinding(UIElement.RenderTransformProperty, transformBinding);
            //ret.SetBinding(UIElement.IsEnabledProperty, enabledBinding);

            return(ret);
        }