コード例 #1
0
        private static void OnIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OptionSelector sel = d as OptionSelector;

            if (sel != null)
            {
                sel.OnIndexChanged();
            }
        }
コード例 #2
0
        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;
                }
            }
        }