コード例 #1
0
        private static CanvasDocument CreateSampleItems()
        {
            var items = new CanvasItemCollection();

            items.Add(new Link
            {
                Left   = 0,
                Top    = 40,
                Width  = 200,
                Height = 100,
            });



            items.Add(new Label
            {
                Left   = 400,
                Top    = 40,
                Width  = 250,
                Height = 50,
                Text   = "Hello boys!\nThis is far from perfect, but it works :D"
            });

            //items.Add(new CanvasRectangle
            //{
            //    Left = 200,
            //    Top = 40,
            //    Width = 100,
            //    Height = 100,
            //    FillColor = new Color(0, 0, 255)
            //});

            //items.Add(new Ellipse
            //{
            //    Left = 200,
            //    Top = 200,
            //    Width = 200,
            //    Height = 100,
            //    FillColor = new Color(0, 220, 255)
            //});

            var group = new Group {
                Top = 100, Left = 200, Width = 110, Height = 200
            };

            group.Children.Add(new Mario {
                Left = 15, Top = 0, Width = 80, Height = 100
            });
            group.Children.Add(new Sonic {
                Left = 15, Top = 100, Width = 80, Height = 100
            });

            items.Add(group);


            return(new CanvasDocument(items));
        }
コード例 #2
0
        public DesignSurface()
        {
            DefaultStyleKey = typeof(DesignSurface);

            DesignAidsProvider = new DesignAidsProvider(this);
            SelectionHandler   = new SelectionHandler(this);

            PopupsDictionary = new Dictionary <IAdorner, Popup>();

            Children = new CanvasItemCollection();
            KeyDown += OnKeyDown;
            KeyUp   += OnKeyUp;

            SelectionChanged += OnSelectionChanged;
        }
コード例 #3
0
        public DesignSurface()
        {
            DefaultStyleKey = typeof(DesignSurface);            

            DesignAidsProvider = new DesignAidsProvider(this);
            SelectionHandler = new SelectionHandler(this);            

            PopupsDictionary = new Dictionary<IAdorner, Popup>();

            Children = new CanvasItemCollection();
            KeyDown += OnKeyDown;
            KeyUp += OnKeyUp;

            SelectionChanged += OnSelectionChanged;
        }
コード例 #4
0
 public EditingContext()
 {
     SelectedItems = new CanvasItemCollection();
 }
コード例 #5
0
 public CanvasVisualItem()
 {
     this.children = new CanvasItemCollection();
     this.Width = 1;
     this.Height = 1;
 }
コード例 #6
0
ファイル: Panel.cs プロジェクト: stsundermann/cubano
 public Panel()
 {
     children = new CanvasItemCollection (this);
 }
コード例 #7
0
        private static CanvasDocument CreateSampleItems()
        {
            var items = new CanvasItemCollection();
            items.Add(new Link
                      {
                          Left = 0,
                          Top = 40,
                          Width = 200,
                          Height = 100,
                      });

            items.Add(new Label
                      {
                          Left = 400,
                          Top = 40,
                          Width = 250,
                          Height = 50,
                          Text = "Hello boys!\nThis is far from perfect, but it works :D"
                      });

            //items.Add(new CanvasRectangle
            //{
            //    Left = 200,
            //    Top = 40,
            //    Width = 100,
            //    Height = 100,
            //    FillColor = new Color(0, 0, 255)
            //});

            //items.Add(new Ellipse
            //{
            //    Left = 200,
            //    Top = 200,
            //    Width = 200,
            //    Height = 100,
            //    FillColor = new Color(0, 220, 255)
            //});

            var group = new Group { Top = 100, Left = 200, Width = 110, Height = 200 };
            group.Children.Add(new Mario { Left = 15, Top = 0, Width = 80, Height = 100 });
            group.Children.Add(new Sonic { Left = 15, Top = 100, Width = 80, Height = 100 });

            items.Add(group);

            return new CanvasDocument(items);
        }
コード例 #8
0
ファイル: Layer.cs プロジェクト: zcnet4/lua-tilde
		public Layer()
		{
			mVisible = true;
			mLocked = false;
			mItems = new CanvasItemCollection();
		}
コード例 #9
0
 public EditingContext()
 {
     SelectedItems = new CanvasItemCollection();
 }