private void SetPickerVisibility(TimePartVisibility visibility) { SetVisibility(_hourInput, _minuteInput, _secondInput, visibility); SetAmPmVisibility(); }
private void SetHandVisibility(TimePartVisibility visibility) { SetVisibility(_hourHand, _minuteHand, _secondHand, visibility); }
private static void SetVisibility(UIElement partHours, UIElement partMinutes, UIElement partSeconds, TimePartVisibility visibility) { if (partHours != null) { partHours.Visibility = visibility.HasFlag(TimePartVisibility.Hour) ? Visibility.Visible : Visibility.Collapsed; } if (partMinutes != null) { partMinutes.Visibility = visibility.HasFlag(TimePartVisibility.Minute) ? Visibility.Visible : Visibility.Collapsed; } if (partSeconds != null) { partSeconds.Visibility = visibility.HasFlag(TimePartVisibility.Second) ? Visibility.Visible : Visibility.Collapsed; } }