예제 #1
0
 public void UpdateView()
 {
     if (this.template == null)
     {
         return;
     }
     this.panel.DisposeChildren();
     foreach (GridViewColumn column in (IEnumerable <GridViewColumn>) this.Columns)
     {
         ColumnChooserItemElementCreatingEventArgs e = new ColumnChooserItemElementCreatingEventArgs(new ColumnChooserItem(column, (IRadServiceProvider)this.gridViewElement), column, this.GridViewElement);
         this.OnItemElementCreating((object)this, e);
         if (e.ItemElement == null)
         {
             e.ItemElement = new ColumnChooserItem(column, (IRadServiceProvider)this.gridViewElement);
         }
         if (this.PassesFilter(e.ItemElement, this.FilterTextBox.Text))
         {
             this.panel.Children.Add((RadElement)e.ItemElement);
         }
     }
     if (this.panel.Children.Count == 0)
     {
         this.TextAlignment           = ContentAlignment.MiddleCenter;
         this.scrollViewer.Visibility = ElementVisibility.Collapsed;
     }
     else
     {
         this.scrollViewer.Visibility = ElementVisibility.Visible;
     }
 }
예제 #2
0
 protected virtual void OnItemElementCreating(
     object sender,
     ColumnChooserItemElementCreatingEventArgs e)
 {
     if (this.ItemElementCreating == null)
     {
         return;
     }
     this.ItemElementCreating((object)this, e);
 }
예제 #3
0
 private void ColumnChooserControl_ItemElementCreating(
     object sender,
     ColumnChooserItemElementCreatingEventArgs e)
 {
     this.GridRootElement.Template.MasterTemplate.EventDispatcher.RaiseEvent <ColumnChooserItemElementCreatingEventArgs>(EventDispatcher.ColumnChooserItemElementCreating, sender, e);
 }