Ejemplo n.º 1
0
        private static void VisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OnDemandControl onDemandControl = d as OnDemandControl;

            if (onDemandControl != null)
            {
                onDemandControl.OnVisibilityChanged((Visibility)e.NewValue);
            }
        }
Ejemplo n.º 2
0
        private static void OnDemandTemplatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OnDemandControl newValue = d as OnDemandControl;

            if (newValue != null && (newValue.templateIsApplied || newValue.Visibility == Visibility.Visible))
            {
                newValue.templateIsApplied = true;
                newValue.Template          = (ControlTemplate)e.NewValue;
            }
        }
Ejemplo n.º 3
0
        private static void OnDemandTemplatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OnDemandControl onDemandControl = d as OnDemandControl;

            if (onDemandControl == null || !onDemandControl.templateIsApplied && onDemandControl.Visibility != Visibility.Visible)
            {
                return;
            }
            onDemandControl.templateIsApplied = true;
            onDemandControl.Template          = (ControlTemplate)e.NewValue;
        }
Ejemplo n.º 4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.HyperlinkOnDemand = ((Microsoft.Expression.Framework.Controls.OnDemandControl)(target));
                return;

            case 2:
                this.ButtonsControl = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 5
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.HyperlinkOnDemand = (OnDemandControl)target;
                break;

            case 3:
                this.ButtonsControl = (ItemsControl)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }