private void CreateBoardViews() { positionOffsets.Clear(); modelView.Clear(); this.TitleContainer.Children.Clear(); this.BoardContainer.Children.Clear(); int i = 0; boardMaster.Boards.ForEach(x => { EventBoard boardView = new EventBoard(); boardView.MaxWidth = boardView.Width = App.Current.MainWindow.ActualWidth - boardInbetween; boardView.Height = this.ActualHeight; boardView.MaxHeight = 3 * 340; boardView.BoardModel = x; BoardTitleControl boardTitle = new BoardTitleControl(); boardTitle.MaxWidth = boardTitle.Width = App.Current.MainWindow.ActualWidth - boardInbetween; boardTitle.Board = x; positionOffsets.Add(x, (boardView.Width * i++)); modelView.Add(x, boardView); this.TitleContainer.Children.Add(boardTitle); this.BoardContainer.Children.Add(boardView); }); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.EventBoardControl = ((Teudu.InfoDisplay.EventBoard)(target)); return; case 2: this.Board = ((System.Windows.Controls.WrapPanel)(target)); return; } this._contentLoaded = true; }