示例#1
0
 public Alphabet()
 {
     settings             = new AlphabetSettings();
     alphabetPresentation = new AlphabetPresentation(settings);
     Presentation         = this.alphabetPresentation;
     alphabetPresentation.AlphabetChanged += new EventHandler(alphabetPresentation_AlphabetChanged);
 }
示例#2
0
        private static void OnActiveAlphabetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AlphabetPresentation b       = (AlphabetPresentation)d;
            AlphabetItem         newItem = (AlphabetItem)e.NewValue;
            AlphabetItem         oldItem = (AlphabetItem)e.OldValue;

            if (newItem != null)
            {
                newItem.IsSelected = true;
            }

            if (oldItem != null)
            {
                oldItem.IsSelected = false;
            }
        }