void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.sbar = ((FileExplorer.WPF.UserControls.StatusbarEx)(target)); return; case 2: this.Icon = ((System.Windows.Controls.ItemsControl)(target)); return; } this._contentLoaded = true; }
public static void OnIsExpandedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { StatusbarEx sbar = sender as StatusbarEx; if (args.NewValue != args.OldValue) { if ((bool)args.NewValue) { sbar.RaiseEvent(new RoutedEventArgs(ExpandedEvent)); } else { sbar.RaiseEvent(new RoutedEventArgs(CollapsedEvent)); } } }