コード例 #1
0
 public void HideVisiblePanel()
 {
     if (visiblePanel != null)
     {
         visiblePanel.Visibility = System.Windows.Visibility.Collapsed;
         visiblePanel            = null;
     }
 }
コード例 #2
0
 public void HideVisiblePanel()
 {
     if (visiblePanel != null)
     {
         visiblePanel.Visibility = System.Windows.Visibility.Collapsed;
         visiblePanel = null;
     }
 }
コード例 #3
0
 void ChangeActivePanel(object sender)
 {
     if (visiblePanel != null)
     {
         visiblePanel.Visibility = System.Windows.Visibility.Collapsed;
         buttonPanelMapping[sender].Visibility = System.Windows.Visibility.Visible;
         visiblePanel = buttonPanelMapping[sender];
     }
 }
コード例 #4
0
 void ChangeActivePanel(object sender)
 {
     if (visiblePanel != null)
     {
         visiblePanel.Visibility = System.Windows.Visibility.Collapsed;
         buttonPanelMapping[sender].Visibility = System.Windows.Visibility.Visible;
         visiblePanel = buttonPanelMapping[sender];
     }
 }
コード例 #5
0
 void CreatePanel(List<CommandDetails> list, Button toolBarButton, int columns, int margin)
 {
     ButtonPanel bp = new ButtonPanel(list, columns, margin);
     bp.ButtonClick += (x, y) => { CommandCompleted(this, EventArgs.Empty); visiblePanel = null; };
     mainToolBarPanel.Children.Add(bp);
     Canvas.SetTop(bp, mainToolBarPanel.Height);
     Vector offset = VisualTreeHelper.GetOffset(toolBarButton);
     Canvas.SetLeft(bp, offset.X + 2);
     bp.Visibility = System.Windows.Visibility.Collapsed;
     buttonPanelMapping.Add(toolBarButton, bp);
 }
コード例 #6
0
 private void toolBarButton_Click(object sender, RoutedEventArgs e)
 {
     if (visiblePanel != null)
     {
         visiblePanel.Visibility = System.Windows.Visibility.Collapsed;
     }
     if (buttonPanelMapping[sender].Visibility != System.Windows.Visibility.Visible)
     {
         buttonPanelMapping[sender].Visibility = System.Windows.Visibility.Visible;
         visiblePanel = buttonPanelMapping[sender];
     }
 }
コード例 #7
0
 private void toolBarButton_Click(object sender, RoutedEventArgs e)
 {
     if (visiblePanel != null)
     {
         visiblePanel.Visibility = System.Windows.Visibility.Collapsed;
     }
     if (buttonPanelMapping[sender].Visibility != System.Windows.Visibility.Visible)
     {
         buttonPanelMapping[sender].Visibility = System.Windows.Visibility.Visible;
         visiblePanel = buttonPanelMapping[sender];
     }
 }
コード例 #8
0
        void CreatePanel(List <CommandDetails> list, Button toolBarButton, int columns, int margin)
        {
            ButtonPanel bp = new ButtonPanel(list, columns, margin);

            bp.ButtonClick += (x, y) => { CommandCompleted(this, EventArgs.Empty); visiblePanel = null; };
            mainToolBarPanel.Children.Add(bp);
            Canvas.SetTop(bp, mainToolBarPanel.Height);
            Vector offset = VisualTreeHelper.GetOffset(toolBarButton);

            Canvas.SetLeft(bp, offset.X + 2);
            bp.Visibility = System.Windows.Visibility.Collapsed;
            buttonPanelMapping.Add(toolBarButton, bp);
        }