コード例 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Element = ((CardTricks.Controls.ElementUserControl)(target));
                return;

            case 2:
                this.UserControlContent = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 3:
                this.layoutsurfaceContent = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.ItemDecorator = ((CardTricks.Controls.DesignerItemDecorator)(target));
                return;

            case 5:
                this.MoveThumb = ((CardTricks.Controls.MoveThumbControlAdv)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #2
0
        private static void ShowDecoratorProperty_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DesignerItemDecorator decorator = (DesignerItemDecorator)d;
            bool showDecorator = (bool)e.NewValue;

            if (showDecorator)
            {
                decorator.ShowAdorner();
            }
            else
            {
                decorator.HideAdorner();
            }
        }