Beispiel #1
0
 private void InitializeTitles()
 {
     Titles = new ObservableCollection <UIElement>();
     foreach (var title in _titlesMarkup.Titles)
     {
         var tvm = new SpecializationCardViewModel(title.Item, _updateViews)
         {
             Project = Project
         };
         var tc = new SpecializationCard {
             DataContext = tvm
         };
         Grid.SetRow(tc, title.Row);
         Grid.SetColumn(tc, TitleRowsCount + title.Column);
         Grid.SetRowSpan(tc, title.RowSpan);
         Grid.SetColumnSpan(tc, title.ColumnSpan);
         Titles.Add(tc);
     }
     foreach (var title in _titlesMarkup.Subtitles)
     {
         var tvm = new GroupCardViewModel(title.Item, _updateViews)
         {
             Project = Project
         };
         var tc = new GroupCard {
             DataContext = tvm
         };
         Grid.SetRow(tc, title.Row);
         Grid.SetColumn(tc, TitleRowsCount + title.Column);
         Grid.SetRowSpan(tc, title.RowSpan);
         Grid.SetColumnSpan(tc, title.ColumnSpan);
         Titles.Add(tc);
     }
 }
Beispiel #2
0
 private void InitializeTitles()
 {
     Titles = new ObservableCollection<UIElement>();
     foreach (var title in _titlesMarkup.Titles)
     {
         var tvm = new SpecializationCardViewModel(title.Item) { Project = Project };
         var tc = new SpecializationCard { DataContext = tvm };
         Grid.SetRow(tc, title.Row);
         Grid.SetColumn(tc, TitleRowsCount + title.Column);
         Grid.SetRowSpan(tc, title.RowSpan);
         Grid.SetColumnSpan(tc, title.ColumnSpan);
         Titles.Add(tc);
     }
     foreach (var title in _titlesMarkup.Subtitles)
     {
         var tvm = new GroupCardViewModel(title.Item) { Project = Project };
         var tc = new GroupCard { DataContext = tvm };
         Grid.SetRow(tc, title.Row);
         Grid.SetColumn(tc, TitleRowsCount + title.Column);
         Grid.SetRowSpan(tc, title.RowSpan);
         Grid.SetColumnSpan(tc, title.ColumnSpan);
         Titles.Add(tc);
     }
 }