public void ActiveDetailPanel(DetailPanelType type) { UserControl panel = null; switch (type) { case DetailPanelType.UiItem: panel = UiItemDetailPanel; break; case DetailPanelType.Scene: break; case DetailPanelType.StoryBlock: panel = StoryBlockDetailPanel; break; case DetailPanelType.StoryClip: break; } if (panel != null) { Content = panel; } }
public void HidePanel(DetailPanelType panelType) { IDetailPanel panel = panels[panelType]; if (showingPanels.Contains(panel)) { panel.OnHide(); showingPanels.Remove(panel); panelGroup.Children.Remove(panel as UIElement); } }
public void ShowPanel(DetailPanelType panelType, params object[] args) { IDetailPanel panel = panels[panelType]; if (!showingPanels.Contains(panel)) { showingPanels.Add(panel); panelGroup.Children.Add(panel as UIElement); } panel.OnShow(args); }