// Command dependency property change callback
        private static void CommandChanged(DependencyObject d,
                                           DependencyPropertyChangedEventArgs e)
        {
            CommandSlider cs = (CommandSlider)d;

            cs.HookUpCommand((ICommand)e.OldValue, (ICommand)e.NewValue);
        }
Beispiel #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.FontSlider = ((Commands.CommandSlider)(target));
                return;

            case 2:

            #line 52 "..\..\CustomControlWithCommand.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Checked += new System.Windows.RoutedEventHandler(this.OnReadOnlyChecked);

            #line default
            #line hidden

            #line 53 "..\..\CustomControlWithCommand.xaml"
                ((System.Windows.Controls.CheckBox)(target)).Unchecked += new System.Windows.RoutedEventHandler(this.OnReadOnlyUnChecked);

            #line default
            #line hidden
                return;

            case 3:
                this.txtBoxTarget = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:

            #line 60 "..\..\CustomControlWithCommand.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.SliderUpdateExecuted);

            #line default
            #line hidden

            #line 61 "..\..\CustomControlWithCommand.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.SliderUpdateCanExecute);

            #line default
            #line hidden
                return;

            case 5:
                this.txtValue = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }