private static void OnIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { OptionSelector sel = d as OptionSelector; if (sel != null) { sel.OnIndexChanged(); } }
private void TryCycleOption(HeaderedContentControl control) { OptionSelector selector = control.Content as OptionSelector; if (selector != null) { selector.SelectedIndex++; if (selector.SelectedIndex >= selector.Options.Count) { selector.SelectedIndex = 0; } } }