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)); }
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; }
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; }
public EditingContext() { SelectedItems = new CanvasItemCollection(); }
public CanvasVisualItem() { this.children = new CanvasItemCollection(); this.Width = 1; this.Height = 1; }
public Panel() { children = new CanvasItemCollection (this); }
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); }
public Layer() { mVisible = true; mLocked = false; mItems = new CanvasItemCollection(); }