public ScratchpadPageTemplate() { this.Name = "Scratchpad"; this.Width = 750; this.Height = 600; // containers this.Grid = new XContainer() { Styles = new ObservableCollection <IStyle>(), Shapes = new ObservableCollection <IShape>() }; this.Table = new XContainer() { Styles = new ObservableCollection <IStyle>(), Shapes = new ObservableCollection <IShape>() }; this.Frame = new XContainer() { Styles = new ObservableCollection <IStyle>(), Shapes = new ObservableCollection <IShape>() }; // styles var gridStyle = new XStyle() { Name = "Grid", Fill = new XColor() { A = 0x00, R = 0x00, G = 0x00, B = 0x00 }, Stroke = new XColor() { A = 0xFF, R = 0xD3, G = 0xD3, B = 0xD3 }, Thickness = 1.0 }; this.Grid.Styles.Add(gridStyle); // grid var settings = new GridFactory.GridSettings() { StartX = 0.0, StartY = 0.0, Width = this.Width, Height = this.Height, SizeX = 30.0, SizeY = 30.0 }; GridFactory.Create(this.Grid.Shapes, gridStyle, settings); }
public LogicPageTemplate() { this.Name = "Logic Page"; this.Width = 1260.0; this.Height = 891.0; // containers this.Grid = new XContainer() { Styles = new ObservableCollection <IStyle>(), Shapes = new ObservableCollection <IShape>() }; this.Table = new XContainer() { Styles = new ObservableCollection <IStyle>(), Shapes = new ObservableCollection <IShape>() }; this.Frame = new XContainer() { Styles = new ObservableCollection <IStyle>(), Shapes = new ObservableCollection <IShape>() }; // styles var gridStyle = new XStyle() { Name = "Grid", Fill = new XColor() { A = 0x00, R = 0x00, G = 0x00, B = 0x00 }, Stroke = new XColor() { A = 0xFF, R = 0xD3, G = 0xD3, B = 0xD3 }, Thickness = 1.0 }; this.Grid.Styles.Add(gridStyle); var tableStyle = new XStyle() { Name = "Table", Fill = new XColor() { A = 0x00, R = 0x00, G = 0x00, B = 0x00 }, Stroke = new XColor() { A = 0xFF, R = 0xD3, G = 0xD3, B = 0xD3 }, Thickness = 1.0 }; this.Table.Styles.Add(tableStyle); var frameStyle = new XStyle() { Name = "Frame", Fill = new XColor() { A = 0x00, R = 0x00, G = 0x00, B = 0x00 }, Stroke = new XColor() { A = 0xFF, R = 0xA9, G = 0xA9, B = 0xA9 }, Thickness = 1.0 }; this.Frame.Styles.Add(frameStyle); // grid var settings = new GridFactory.GridSettings() { StartX = 330.0, StartY = 30.0, Width = 600.0, Height = 750.0, SizeX = 30.0, SizeY = 30.0 }; GridFactory.Create(this.Grid.Shapes, gridStyle, settings); // table CreateTable(this.Table.Shapes, tableStyle); // frame CreateFrame(this.Frame.Shapes, frameStyle); }