コード例 #1
0
        private void AddControlToValueStack(Control control)
        {
            Grid g = new Grid();

            g.Height     = LISTITEM_HEIGHT;
            g.Background = Brushes.Gray;
            g.Margin     = new Thickness(0, 0, 0, 2);

            control.Margin = new Thickness(0, 0, 40, 0);

            IInputControl inCtl = control as IInputControl;

            inCtl.IsListItem = true;
            g.Children.Add(control);

            var btn = new RemoveItemButton();

            //btn.Width = 35;
            btn.Tag    = g;
            btn.Click += btnRemove_Click;
            btn.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
            g.Children.Add(btn);

            theValueStack.Children.Add(g);

            if (_isNull)
            {
                _isNull = false;
            }

            RecalcSize();
        }
コード例 #2
0
        private void AddControlToValueStack(Control control)
        {
            Grid g = new Grid();
              g.Height = LISTITEM_HEIGHT;
              g.Background = Brushes.Gray;
              g.Margin = new Thickness(0,0,0,2);

              control.Margin = new Thickness(0, 0, 40, 0);

              IInputControl inCtl = control as IInputControl;
              inCtl.IsListItem = true;
              g.Children.Add(control);

              var btn = new RemoveItemButton();
              //btn.Width = 35;
              btn.Tag = g;
              btn.Click += btnRemove_Click;
              btn.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
              g.Children.Add(btn);

              theValueStack.Children.Add(g);

              if( _isNull )
            _isNull = false;

              RecalcSize();
        }