Exemplo n.º 1
0
 private void button3_Click(object sender, RoutedEventArgs e)
 {
     Window2 DeleteWindow = new Window2();
     DeleteWindow.Show();
 }
Exemplo n.º 2
0
        private void button11_Click(object sender, RoutedEventArgs e)
        {
            Window2 tableDialog = new Window2();
            tableDialog.ShowDialog();
            if (tableDialog.yesButton)
            {
                gridList.Add(new Grid());
                gridList.Last().MouseLeftButtonDown += new MouseButtonEventHandler(GridFocusEvent);
                gridList.Last().SetValue(DraggableExtender.CanDragProperty, true);
                for (int i = 0; i < tableDialog.rows; i++)
                {
                    RowDefinition row = new RowDefinition();
                    gridList.Last().RowDefinitions.Add(row);
                    for (int j = 0; j < tableDialog.columns; j++)
                    {
                        ColumnDefinition column = new ColumnDefinition();
                        column.Width = GridLength.Auto;
                        gridList.Last().ColumnDefinitions.Add(column);
                        TextBox tb = CreateTableTB();
                        Grid.SetRow(tb, i);
                        Grid.SetColumn(tb, j);
                        gridList.Last().Children.Add(tb);
                    }

                }
                selCanv.Children.Add(gridList.Last());
            }
        }