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