Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myDependencyObject = ((WpfApplication2.Helper.MyDependencyObject)(target));
                return;

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

            case 3:
                this.btn_2 = ((System.Windows.Controls.Button)(target));
                return;

            case 4:
                this.btn_3 = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.btn_4 = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.lbl_01 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.lbl_02 = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.sliderDependency = ((System.Windows.Controls.Slider)(target));
                return;

            case 9:
                this.lblProperyText = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public static void OnFunctionedCountChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            MyDependencyObject obj = (MyDependencyObject)sender;

            obj.PropertyText = string.Format("当前数额为{0}", e.NewValue.ToString());
        }