public CardInfoView() { InitializeComponent(); Caption.Background = ShellView.CaptionBrush; CardNumberLabel.SetTextBox(new CardTextBox()); ExpirationDateLabel.SetTextBox(new DateTextBox()); Loaded += (sender, args) => { ViewModel.PropertyChanged += OnViewModelPropertyChanged; }; Unloaded += (sender, args) => { ViewModel.PropertyChanged -= OnViewModelPropertyChanged; }; }
public NewItem() { InitializeComponent(); FandWComboBox.Items.Add("Food(Kg)"); FandWComboBox.Items.Add("Drink(Liter)"); if (Storage_UI.itemtype == "Equipment") { ItemDateTimePicker.Hide(); ExpirationDateLabel.Hide(); TypeLabel.Hide(); FandWComboBox.Hide(); } else if(Storage_UI.itemtype == "Medicine") { TypeLabel.Hide(); FandWComboBox.Hide(); } }