protected override void OnOwnerChanged(EventArgs e) { this.pad = this.Owner as MemoryPad; if (this.pad == null) return; base.OnOwnerChanged(e); }
protected override void OnOwnerChanged(EventArgs e) { this.pad = this.Owner as MemoryPad; if (this.pad == null) return; comboBox = this.ComboBox as ComboBox; if (this.comboBox == null) return; comboBox.KeyUp += (s, ea) => { if (ea.Key == Key.Enter) Run(); }; comboBox.IsEditable = true; comboBox.Width = 130; base.OnOwnerChanged(e); }
protected override void OnOwnerChanged(EventArgs e) { this.pad = this.Owner as MemoryPad; if (this.pad == null) return; comboBox = this.ComboBox as ComboBox; if (this.comboBox == null) return; comboBox.SelectionChanged += (s, ea) => { Run(); }; comboBox.Items.Add(1); comboBox.Items.Add(2); comboBox.Items.Add(4); comboBox.Text = "1"; comboBox.Width = 30; comboBox.IsEditable = false; base.OnOwnerChanged(e); }