private void OnValueChanged(object sender, EventArgs e) { var task = Windows.Invoke(() => { //Fix the width so all 2d math is integer. this.MinWidth = SpectrumBehaviourConfiguration.GetWidthForBands(BandCount.Value); }); }
public EnhancedSpectrum() { this.InitializeComponent(); if (BandCount != null) { //Fix the width so all 2d math is integer. this.MinWidth = SpectrumBehaviourConfiguration.GetWidthForBands(BandCount.Value); BandCount.ValueChanged += this.OnValueChanged; } }