private void MetroWindow_ContentRendered(object sender, EventArgs e) { GO(); LUOMs = new LUOM(); cbUOM1.ItemsSource = LUOMs; if (t.Mode == "New") { cbInOut.SelectedIndex = 1; cbStatus.SelectedIndex = 0; } }
public MaterialW(Material m = null) { InitializeComponent(); LUOMs = new LUOM(); if (m == null) { m = new Material(); m.Mode = "New"; } this.m = m; this.DataContext = m; cbUOM1.ItemsSource = LUOMs; cbUOM2.ItemsSource = LUOMs; }