Ejemplo n.º 1
0
        /// <summary>
        /// Invoked when the ChoiceSpecify dependency property has changed.
        /// </summary>
        /// <param name="sender">The object that contains the dependency property.</param>
        /// <param name="e">The event data.</param>
        private static void OnChoiceSpecifyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            MultipleChoiceWindow typedSender = sender as MultipleChoiceWindow;

            if (typedSender != null)
            {
                typedSender.UpdateChoices();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Invoked when the SelectedChoice dependency property has changed.
        /// </summary>
        /// <param name="sender">The object that contains the dependency property.</param>
        /// <param name="e">The event data.</param>
        private static void OnSelectedChoiceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            MultipleChoiceWindow typedSender = sender as MultipleChoiceWindow;

            if (typedSender != null)
            {
                Choice newValue = e.NewValue as Choice;
                typedSender.Choice = (newValue != null) ? newValue.Explanation : string.Empty;
            }
        }