コード例 #1
0
ファイル: DecoratorTextBox.cs プロジェクト: odnodn/mscui
        /// <summary>
        /// Updates the term items source.
        /// </summary>
        /// <param name="sender">The DecoratorTextBox.</param>
        /// <param name="args">Dependency Property Changed Event Args.</param>
        private static void MatchingTermItemsSource_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            DecoratorTextBox decoratorTextBox = (DecoratorTextBox)sender;

            if (decoratorTextBox.termItemsControl != null)
            {
                decoratorTextBox.termItemsControl.ItemsSource = (IEnumerable)args.NewValue;
            }
        }
コード例 #2
0
ファイル: DecoratorTextBox.cs プロジェクト: odnodn/mscui
        /// <summary>
        /// Updates the term selected member path.
        /// </summary>
        /// <param name="sender">The DecoratorTextBox.</param>
        /// <param name="args">Dependency Property Changed Event Args.</param>
        private static void MatchingTermIsSelectedMemberPath_Changed(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            DecoratorTextBox decoratorTextBox = (DecoratorTextBox)sender;

            if (decoratorTextBox.termItemsControl != null)
            {
                decoratorTextBox.termItemsControl.IsSelectedMemberPath = (string)args.NewValue;
            }
        }
コード例 #3
0
ファイル: DecoratorTextBox.cs プロジェクト: odnodn/mscui
        /// <summary>
        /// Sets the text in the text box.
        /// </summary>
        /// <param name="dependencyObject">The Decorator Text Box.</param>
        /// <param name="eventArgs">Dependency Property Changed Event Args.</param>
        private static void Text_Changed(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
        {
            DecoratorTextBox decoratorTextBox = (DecoratorTextBox)dependencyObject;

            decoratorTextBox.SetText(eventArgs.NewValue.ToString());
        }