Ejemplo n.º 1
0
 private void AddRecordInResultGrid(ViewModelVaccine vaccine, Grid unitGrid, int nUnitGridRowTracker)
 {
     unitGrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
     var border = new Border() { Background = new SolidColorBrush(vaccine.Color) };
     var textBlock = new TextBlock() { Text = vaccine.VaccineName + " " + vaccine.DoseDetail, FontSize= 26, TextWrapping = TextWrapping.Wrap, DataContext = vaccine };
     textBlock.Tap += new EventHandler<System.Windows.Input.GestureEventArgs>(textBlock_Tap);
     border.Child = textBlock;
     unitGrid.Children.Add(border);
     Grid.SetRow(border, nUnitGridRowTracker);
 }
Ejemplo n.º 2
0
        private void AddRecordInResultGrid(ViewModelVaccine vaccine, Grid unitGrid, int nUnitGridRowTracker)
        {
            unitGrid.RowDefinitions.Add(new RowDefinition()
            {
                Height = GridLength.Auto
            });
            var border = new Border()
            {
                Background = new SolidColorBrush(vaccine.Color)
            };
            var textBlock = new TextBlock()
            {
                Text = vaccine.VaccineName + " " + vaccine.DoseDetail, FontSize = 26, TextWrapping = TextWrapping.Wrap, DataContext = vaccine
            };

            textBlock.Tap += new EventHandler <System.Windows.Input.GestureEventArgs>(textBlock_Tap);
            border.Child   = textBlock;
            unitGrid.Children.Add(border);
            Grid.SetRow(border, nUnitGridRowTracker);
        }