public void UpdateKeyWidth(KeyWidth newWidth) { ThisKeyWidth = newWidth; foreach (Octave octave in OctavePanel.Children) { octave.UpdateKeyWidth(newWidth); } }
public void UpdateKeyWidth(KeyWidth newWidth) { foreach (WhiteKey wKey in WhiteKeys.Children) { wKey.mKeyWidth = newWidth; } foreach (BlackKey bKey in BlackKeys.Children) { bKey.mKeyWidth = newWidth; } }
private void BtnKeyWidth_Click(object sender, RoutedEventArgs e) { if (currentWidth == KeyWidth.Narrow) { currentWidth = KeyWidth.Normal; } else if (currentWidth == KeyWidth.Normal) { currentWidth = KeyWidth.Touch; } else if (currentWidth == KeyWidth.Touch) { currentWidth = KeyWidth.Narrow; } KB.UpdateKeyWidth(currentWidth); ScrollKeyboard(); }