protected static void OnMenuBoxMaxHeightChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropMenuButton me = d as DropMenuButton;

            if (me != null)
            {
                me.InitializeChildPanel(true);
            }
        }
        protected static void OnImageSourceChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropMenuButton me = d as DropMenuButton;

            if (me != null && me.BaseButton != null)
            {
                me.BaseButton.ImageSource = (ImageSource)e.NewValue;
            }
        }
        protected static void OnContentPositionChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropMenuButton me = d as DropMenuButton;

            if (me != null)
            {
                me.InitializeChildPanel(false);
            }
        }
        protected static void OnTextChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DropMenuButton me = d as DropMenuButton;

            if (me != null && me.BaseButton != null)
            {
                me.BaseButton.Text = (string)e.NewValue;
            }
        }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ESRI.SilverlightViewer;component/Widgets/TaskbarWidget.xaml", System.UriKind.Relative));
     this.StackTitleBar    = ((System.Windows.Controls.StackPanel)(this.FindName("StackTitleBar")));
     this.LogoImage        = ((System.Windows.Controls.Image)(this.FindName("LogoImage")));
     this.TextTitle        = ((System.Windows.Controls.TextBlock)(this.FindName("TextTitle")));
     this.TitleUnderline   = ((System.Windows.Shapes.Path)(this.FindName("TitleUnderline")));
     this.TextSubTitle     = ((System.Windows.Controls.TextBlock)(this.FindName("TextSubTitle")));
     this.StackToolbar     = ((System.Windows.Controls.StackPanel)(this.FindName("StackToolbar")));
     this.WidgetMenuButton = ((ESRI.SilverlightViewer.Controls.DropMenuButton)(this.FindName("WidgetMenuButton")));
     this.DockWidgetsStack = ((ESRI.SilverlightViewer.Controls.PagedStackPanel)(this.FindName("DockWidgetsStack")));
 }