Example #1
0
 public Alphabet()
 {
     settings             = new AlphabetSettings();
     alphabetPresentation = new AlphabetPresentation(settings);
     Presentation         = this.alphabetPresentation;
     alphabetPresentation.AlphabetChanged += new EventHandler(alphabetPresentation_AlphabetChanged);
 }
        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;
            }
        }