コード例 #1
0
        void RemoveListItem(StringListItemControl itm, int id)
        {
            _items.Remove(id);

            theStack.Children.Remove(itm);

            RecalcControlSize();
            UpdateEmptyLabel();
        }
コード例 #2
0
        private void AddListItem(string str)
        {
            var id = ++_lastId;

            _items.Add(id, str);

            // Visuals
            var g = new StringListItemControl(str, id);

            g.RemovedItem += btnDelete_Click;

            theStack.Children.Add(g);

            RecalcControlSize();
            UpdateEmptyLabel();
        }
コード例 #3
0
    void RemoveListItem(StringListItemControl itm, int id) {
      _items.Remove(id);
      
      theStack.Children.Remove( itm );

      RecalcControlSize();
      UpdateEmptyLabel();
    }
コード例 #4
0
    private void AddListItem(string str) {
    
      var id = ++_lastId;

      _items.Add(id, str);

      // Visuals
      var g = new StringListItemControl(str, id);
      g.RemovedItem += btnDelete_Click;

      theStack.Children.Add(g);

      RecalcControlSize();
      UpdateEmptyLabel();
    }
コード例 #5
0
        private void AddListItem(string str)
        {
            var id = ++_lastId;

              _items.Add(id, str);

              // Visuals
              var g = new StringListItemControl(str, id);
              g.RemovedItem += btnDelete_Click;
              /*
              Grid g = new Grid();
              g.Background = Brushes.Gray;
              g.Margin = new Thickness(10,1,0,1);

              TextBlock tb = new TextBlock();
              tb.FontSize = 18;
              tb.Foreground = Brushes.White;
              tb.FontFamily =  new FontFamily("Calibri");
              tb.VerticalAlignment = System.Windows.VerticalAlignment.Center;
              tb.Margin = new Thickness(10,0,43,0);
              tb.Text = str;
              g.Children.Add(tb);

              RoundMetroButton btn = new RoundMetroButton();
              btn.Source = "/ServiceBusMQManager;component/Images/delete-item-white.png";
              btn.Height = 32;
              btn.Margin = new Thickness(0, 2, 4, 2);
              btn.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
              btn.Tag = id;
              btn.Click += btnDelete_Click;
              g.Children.Add(btn);
              */
              theStack.Children.Add(g);

              RecalcControlSize();
              UpdateEmptyLabel();
        }