コード例 #1
0
        private void go_Click(object sender, RoutedEventArgs e)
        {
            BoardGui window = new BoardGui();

            window.Show();
            App.Current.MainWindow = window;
            this.Close();
        }
コード例 #2
0
        public WrapPanel toPanel()
        {
            WrapPanel ans = new WrapPanel();

            if (!this.visible)
            {
                ans.Visibility = Visibility.Collapsed;
            }
            ans.Orientation = Orientation.Horizontal;
            ans.DataContext = this;
            Border border = new Border();

            border.BorderThickness = new Thickness(1);
            border.BorderBrush     = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(1, 1, 1));
            Label l = new Label();

            Binding binding = new Binding("columnName");

            BindingOperations.SetBinding(l, Label.ContentProperty, binding);

            l.Width           = 90;
            l.BorderThickness = new Thickness(1);
            l.BorderBrush     = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(1, 1, 1));
            ans.Children.Add(l);



            TextBlock t = new TextBlock();

            t.Width = 100;
            binding = new Binding("title");

            BindingOperations.SetBinding(t, TextBlock.TextProperty, binding);

            t.Margin = new Thickness(10);

            t.TextWrapping = TextWrapping.Wrap;
            border.Child   = t;

            ans.Children.Add(border);

            border = new Border();
            border.BorderThickness = new Thickness(1);
            border.BorderBrush     = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(1, 1, 1));
            t       = new TextBlock();
            t.Width = 300;
            binding = new Binding("description");

            BindingOperations.SetBinding(t, TextBlock.TextProperty, binding);

            t.Margin = new Thickness(10);

            t.TextWrapping = TextWrapping.Wrap;
            border.Child   = t;

            ans.Children.Add(border);


            l       = new Label();
            binding = new Binding("dueDate");

            BindingOperations.SetBinding(l, Label.ContentProperty, binding);
            l.Width           = 80;
            l.BorderThickness = new Thickness(1);
            l.BorderBrush     = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(1, 1, 1));

            ans.Children.Add(l);



            border = new Border();
            border.BorderThickness = new Thickness(1);
            border.BorderBrush     = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(1, 1, 1));
            Button button = new Button();

            button.Content     = "move task";
            button.DataContext = this;

            BoardGui temp = new BoardGui(false);

            button.Click += new RoutedEventHandler(temp.move_Click);
            temp.Close();
            border.Child = button;
            ans.Children.Add(border);


            return(ans);
        }