public MainPageViewModel() { _root = new CustomRectangle(100f, 100f, 45f, 100f, 200f); _renderDictionary.Add(_root.RenderOption, _root); _focus = _root; MoveUpCommand = ReactiveCommand.Create(MoveUp); MoveLeftCommand = ReactiveCommand.Create(MoveLeft); RotateCommand = ReactiveCommand.Create(Rotate); MoveRightCommand = ReactiveCommand.Create(MoveRight); MoveDownCommand = ReactiveCommand.Create(MoveDown); AddChildCommand = ReactiveCommand.Create(AddChild); RemoveChildCommand = ReactiveCommand.Create(RemoveChild); BrowseUpCommand = ReactiveCommand.Create(BrowseUp); }
private void AddChild() { int max = 100; CustomShapeBase child = null; for (int i = 0; i < max; i++) { for (int j = 0; j < max; j++) { child = new CustomRectangle(i, j, 0, 10, 10); _focus.AddChild(child); } } _focus = child; }