private void LoadTopPanel() { TopPanel.Loaded += (s, e) => { //var iconSize = 35.0; //(Ui as StockApplicationWindow).TopToolContainer.Children.Add(GetToolbarButton("Krypton/Save", iconSize, () => { MessageBox.Show("Save drawing changes clicked."); }, "Save drawing changes")); TopLeftContainer = new StackPanel() { Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Center }; (Ui as StockApplicationWindow).TopToolContainer.Children.Add(TopLeftContainer); TopRightContainer = new StackPanel() { Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Center }; (Ui as StockApplicationWindow).TopToolContainer.Children.Add(TopRightContainer); TopPanel.UpdateLayout(); TopRightTextPanel = new MultiColorTextPanel() { IsSelectable = true, HorizontalAlignment = HorizontalAlignment.Right, HorizontalContentAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Center, VerticalContentAlignment = VerticalAlignment.Center, SelectedBackground = AppearanceManager.GetCurrentSkinResource("BackgroundBase_05") as Brush, }; TopRightTextPanel.IsSelectable = true; TopRightTextPanel.Clicked += (sender, args) => { MessageBox.Show("Popup current user info dialog!"); }; TopRightContainer.Children.Add(TopRightTextPanel); TopRightContainer.Children.Add(new VerticalSeparator()); if (SessionContext.CurrentSubject != null) { TopRightTextPanel.SetText(SessionContext.CurrentSubject.FirstName + " " + SessionContext.CurrentSubject.LastName, new SolidColorBrush(Colors.YellowGreen)); } }; }