Exemple #1
0
        void InitializeControls()
        {
            var canvas = new Canvas(this)
            {
                BackgroundColor     = Color.CornflowerBlue,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment   = VerticalAlignment.Stretch
            };

            Desktop.Content = canvas;

            blockViewControl = new BlockViewControl(this)
            {
                //Width = Desktop.Width,
                //Height = Desktop.Height,
                HorizontalAlignment = HorizontalAlignment.Left,
                VerticalAlignment   = VerticalAlignment.Top,
                Width       = Desktop.Width * 0.5f,
                Height      = Desktop.Height * 0.5f,
                Focusable   = true,
                DataContext = (DataContext as Workspace).Scene
            };
            canvas.Children.Add(blockViewControl);

            blockEditWindow = new BlockEditWindow(this)
            {
                HorizontalAlignment = HorizontalAlignment.Right,
                VerticalAlignment   = VerticalAlignment.Top
            };
            blockEditWindow.Show();
        }
Exemple #2
0
        void InitializeControls()
        {
            var canvas = new Canvas(this)
            {
                BackgroundColor = Color.CornflowerBlue,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch
            };
            Desktop.Content = canvas;

            blockViewControl = new BlockViewControl(this)
            {
                //Width = Desktop.Width,
                //Height = Desktop.Height,
                HorizontalAlignment = HorizontalAlignment.Left,
                VerticalAlignment = VerticalAlignment.Top,
                Width = Desktop.Width * 0.5f,
                Height = Desktop.Height * 0.5f,
                Focusable = true,
                DataContext = (DataContext as Workspace).Scene
            };
            canvas.Children.Add(blockViewControl);

            blockEditWindow = new BlockEditWindow(this)
            {
                HorizontalAlignment = HorizontalAlignment.Right,
                VerticalAlignment = VerticalAlignment.Top
            };
            blockEditWindow.Show();
        }