private static void VisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { OnDemandControl onDemandControl = d as OnDemandControl; if (onDemandControl != null) { onDemandControl.OnVisibilityChanged((Visibility)e.NewValue); } }
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; } }
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; }
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; }
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; } }