Esempio n. 1
0
        public CardDrive()
        {
            InitializeComponent();
            DataContext = new DriverCardViewModel();
            DriverCardViewModel driverCardViewModel = new DriverCardViewModel();

            Count.Content = driverCardViewModel.CountObject();
        }
Esempio n. 2
0
        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            DataContext = new DriverCardViewModel();
            var listLic = new List <DriversAndLicences>();

            foreach (DriversAndLicences lic in list.Items)
            {
                if (lic.Name.Contains(LicName.Text))
                {
                    listLic.Add(lic);
                }
            }

            DataContext   = new DriverCardViewModel(listLic);
            Count.Content = listLic.Count;
        }