Exemplo n.º 1
0
        private void btnClick(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            if (btn == null)
            {
                throw new ArgumentException();
            }
            else
            {
                switch (btn.Name)
                {
                case "stackpanelBtn":
                    StackPanelWindow stackpanel = new StackPanelWindow();
                    stackpanel.Show();
                    break;

                case "dockBtn":
                    DockWindow dockwindow = new DockWindow();
                    dockwindow.Show();
                    break;

                case "gridBtn":
                    GridWindow gridWindow = new GridWindow();
                    gridWindow.Show();
                    break;

                case "gridsplitterBtn":
                    GridSplitterWindow gridsplitterWindow = new GridSplitterWindow();
                    gridsplitterWindow.Show();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void BtnDock_Click(object sender, RoutedEventArgs e)
        {
            DockWindow dockWindow = new DockWindow();

            dockWindow.Show();
        }