コード例 #1
0
        static void IsBluePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            MyStackpanel myStackpanel = sender as MyStackpanel;

            if (myStackpanel.IsBlue == true)
            {
                myStackpanel.Background = new SolidColorBrush(Colors.Blue);
            }
            else
            {
                myStackpanel.Background = new SolidColorBrush(Colors.White);
            }
        }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mystackpanel = ((Dependency_Properties.MyStackpanel)(target));
                return;

            case 2:
                this.buttonChange = ((System.Windows.Controls.Button)(target));

            #line 17 "..\..\..\MainWindow.xaml"
                this.buttonChange.Click += new System.Windows.RoutedEventHandler(this.buttonChange_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }