Ejemplo n.º 1
0
        public TitleCardView()
        {
            InitializeComponent();

            DataContextChanged += (s, e) =>
            {
                ViewModel = DataContext as TitleCardViewModel;
            };
        }
Ejemplo n.º 2
0
 private void InitializeTitles()
 {
     Titles = new ObservableCollection <UIElement>();
     foreach (var title in _titlesMarkup.Titles)
     {
         var tvm = new TitleCardViewModel(title.Item);
         var tc  = new TitleCard {
             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);
     }
 }