protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } SizeF finalSize = base.MeasureOverride(availableSize); if (this.Data.Owner.ViewElement.Orientation == Orientation.Vertical || this.HasVisibleItems()) { finalSize.Width = availableSize.Width; } else { finalSize.Width += this.ToggleElement.DesiredSize.Width; } if (this.Data.Size.Height > 0) { finalSize.Height = (float)this.Data.Size.Height; } RadListViewElement owner = this.Data.Owner; if (owner != null && !owner.AllowArbitraryItemHeight) { finalSize.Height = (float)owner.GroupItemSize.Height; } this.Data.ActualSize = finalSize.ToSize(); SizeF size = this.GetClientRectangle(finalSize).Size; this.Layout.Measure(new SizeF(size.Width - this.ToggleElement.DesiredSize.Width, size.Height)); return(finalSize); }
protected override System.Drawing.SizeF MeasureOverride(System.Drawing.SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } SizeF desiredSize = base.MeasureOverride(availableSize); desiredSize.Width = GetClientRectangle(availableSize).Width; if (this.Data.Size.Height > 0) { desiredSize.Height = this.Data.Size.Height; } RadListViewElement listViewElement = this.Data.Owner; if (listViewElement != null && !listViewElement.AllowArbitraryItemHeight) { desiredSize.Height = listViewElement.GroupItemSize.Height; } this.Data.ActualSize = desiredSize.ToSize(); SizeF clientSize = GetClientRectangle(desiredSize).Size; SizeF sizef = new SizeF(clientSize.Width - this.toggleElement.DesiredSize.Width, clientSize.Height); this.layoutManagerPart.Measure(sizef); return(desiredSize); }
public ListViewHeaderRowAccessibleObject( DetailListViewColumnContainer row, RadListViewElement owner) { this.row = row; this.owner = owner; }
public ListViewDataItemGroupCollection(RadListViewElement owner) { this.owner = owner; this.autoGroups = new ObservableCollection <ListViewDataItemGroup>(); this.autoGroups.CollectionChanged += new NotifyCollectionChangedEventHandler(this.groups_CollectionChanged); this.customGroups = new ObservableCollection <ListViewDataItemGroup>(); this.customGroups.CollectionChanged += new NotifyCollectionChangedEventHandler(this.groups_CollectionChanged); }
public ListViewDataItemGroupCollection(RadListViewElement owner) { this.owner = owner; autoGroups = new ObservableCollection <ListViewDataItemGroup>(); autoGroups.CollectionChanged += new Telerik.WinControls.Data.NotifyCollectionChangedEventHandler(groups_CollectionChanged); customGroups = new ObservableCollection <ListViewDataItemGroup>(); customGroups.CollectionChanged += new Telerik.WinControls.Data.NotifyCollectionChangedEventHandler(groups_CollectionChanged); }
public DetailListViewElement(RadListViewElement owner) : base(owner) { this.columnScroller.Traverser = new ListViewColumnTraverser(this.owner.Columns); this.columnContainer.DataProvider = this.columnScroller; this.columnScroller.ScrollerUpdated += new EventHandler(columnScroller_ScrollerUpdated); this.columnDragDropService = new DetailListViewDragDropService(this); this.scrollBehavior.ScrollServices.Add(new ScrollService(this.ViewElement, this.columnsScrollBar)); }
public DetailListViewElement(RadListViewElement owner) : base(owner) { this.columnScroller.Traverser = (ITraverser <ListViewDetailColumn>) new ListViewColumnTraverser((IList <ListViewDetailColumn>) this.Owner.Columns); this.columnContainer.DataProvider = (IEnumerable)this.columnScroller; this.columnScroller.ScrollerUpdated += new EventHandler(this.columnScroller_ScrollerUpdated); this.columnDragDropService = new DetailListViewDragDropService(this); this.ScrollBehavior.ScrollServices.Add(new ScrollService((RadElement)this.ViewElement, this.columnsScrollBar)); this.ItemSpacing = -1; this.bestFitHelper = new ListViewBestFitHelper(this); }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } SizeF desiredSize = base.MeasureOverride(LayoutUtils.InfinitySize); desiredSize.Width += this.toggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { desiredSize.Height = this.Data.Size.Height; } if (this.Data.Size.Width > 0) { desiredSize.Width = this.Data.Size.Width; } RadListViewElement listViewElement = this.Data.Owner; if (listViewElement != null && !listViewElement.AllowArbitraryItemHeight) { desiredSize.Height = listViewElement.GroupItemSize.Height; } if (listViewElement != null && !listViewElement.AllowArbitraryItemWidth && !this.Data.Owner.FullRowSelect) { desiredSize.Width = listViewElement.GroupItemSize.Width; } if (listViewElement != null && listViewElement.FullRowSelect) { desiredSize.Width = Math.Max(GetClientRectangle(availableSize).Width, desiredSize.Width); } this.Data.ActualSize = desiredSize.ToSize(); SizeF clientSize = GetClientRectangle(desiredSize).Size; this.toggleElement.Measure(availableSize); SizeF sizef = new SizeF(clientSize.Width - this.toggleElement.DesiredSize.Width, clientSize.Height); this.layoutManagerPart.Measure(sizef); return(desiredSize); }
public BaseListViewElement(RadListViewElement owner) { this.owner = owner; this.ViewElement.FitElementsToSize = this.FullRowSelect; this.Items = owner.Items; this.Scroller.ScrollMode = ItemScrollerScrollModes.Smooth; this.Scroller.ScrollerUpdated += new EventHandler(Scroller_ScrollerUpdated); this.scrollBehavior = new ScrollServiceBehavior(); this.scrollBehavior.ScrollServices.Add(new ScrollService(this.ViewElement, this.Scroller.Scrollbar)); this.beginEditTimer = new Timer(); this.beginEditTimer.Interval = SystemInformation.DoubleClickTime + 10; this.beginEditTimer.Tick += new EventHandler(beginEditTimer_Tick); this.groupSelectionTimer = new Timer(); this.groupSelectionTimer.Interval = SystemInformation.DoubleClickTime + 10; this.groupSelectionTimer.Tick += new EventHandler(groupSelectionTimer_Tick); }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } RectangleF clientRectangle = this.GetClientRectangle(availableSize); SizeF sizeF = base.MeasureOverride(LayoutUtils.InfinitySize); sizeF.Width = this.cellContainer.DesiredSize.Width + this.ToggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { sizeF.Height = (float)this.Data.Size.Height; } RadListViewElement owner = this.Data.Owner; if (owner != null && !owner.AllowArbitraryItemHeight) { sizeF.Height = (float)owner.ItemSize.Height; } if (owner != null && owner.FullRowSelect || (double)sizeF.Width > (double)clientRectangle.Width) { sizeF.Width = clientRectangle.Width; } this.Data.ActualSize = sizeF.ToSize(); this.cellContainer.Measure((SizeF)this.Data.ActualSize); SizeF size = clientRectangle.Size; this.ToggleElement.Measure(size); RadItem editorElement = this.GetEditorElement((IValueEditor)this.Editor); SizeF availableSize1 = new SizeF(size.Width - this.ToggleElement.DesiredSize.Width, size.Height); if (this.IsInEditMode && editorElement != null) { editorElement.Measure(new SizeF(Math.Min(this.Data.Owner.CurrentColumn.Width, availableSize.Width), availableSize1.Height)); sizeF.Height = Math.Max(sizeF.Height, editorElement.DesiredSize.Height); } this.Layout.Measure(availableSize1); return(sizeF); }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } SizeF finalSize = base.MeasureOverride(LayoutUtils.InfinitySize); finalSize.Width += this.ToggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { finalSize.Height = (float)this.Data.Size.Height; } if (this.Data.Size.Width > 0) { finalSize.Width = (float)this.Data.Size.Width; } RadListViewElement owner = this.Data.Owner; if (owner != null && !owner.AllowArbitraryItemHeight) { finalSize.Height = (float)owner.GroupItemSize.Height; } if (owner != null && !owner.AllowArbitraryItemWidth && !this.Data.Owner.FullRowSelect) { finalSize.Width = (float)owner.GroupItemSize.Width; } if (owner != null && owner.FullRowSelect) { finalSize.Width = Math.Max(this.GetClientRectangle(availableSize).Width, finalSize.Width); } this.Data.ActualSize = finalSize.ToSize(); SizeF size = this.GetClientRectangle(finalSize).Size; this.ToggleElement.Measure(availableSize); this.Layout.Measure(new SizeF(size.Width - this.ToggleElement.DesiredSize.Width, size.Height)); return(finalSize); }
public ListViewDataItemCollection(RadListViewElement owner) { this.owner = owner; this.owner.ListSource.CollectionView.CollectionChanged += new Telerik.WinControls.Data.NotifyCollectionChangedEventHandler(this.CollectionView_CollectionChanged); }
public ListViewDataItemCollection(RadListViewElement owner) { this.owner = owner; this.owner.ListSource.CollectionView.CollectionChanged += new NotifyCollectionChangedEventHandler(CollectionView_CollectionChanged); }
public ListViewDragDropService(RadListViewElement owner) { this.owner = owner; }
public void SetOwner(RadListViewElement listElement) { this.Owner = listElement; }
public ListViewSelectedItemCollection(RadListViewElement listView) : base(new List <ListViewDataItem>()) { this.listViewElement = listView; }
public ListViewListSource(RadListViewElement owner) : base(owner) { this.owner = owner; }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } RectangleF clientRect = GetClientRectangle(availableSize); SizeF desiredSize = base.MeasureOverride(LayoutUtils.InfinitySize); desiredSize.Width = cellContainer.DesiredSize.Width + toggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { desiredSize.Height = this.Data.Size.Height; } RadListViewElement listViewElement = this.Data.Owner; if (listViewElement != null && !listViewElement.AllowArbitraryItemHeight) { desiredSize.Height = listViewElement.ItemSize.Height; } if ((listViewElement != null && listViewElement.FullRowSelect) || desiredSize.Width > clientRect.Width) { desiredSize.Width = clientRect.Width; } this.Data.ActualSize = desiredSize.ToSize(); this.cellContainer.Measure(this.Data.ActualSize); SizeF clientSize = clientRect.Size; if (this.dataItem.Owner.ShowCheckBoxes) { this.toggleElement.Visibility = ElementVisibility.Visible; this.toggleElement.Measure(clientSize); } else { this.toggleElement.Visibility = ElementVisibility.Collapsed; } RadItem editorElement = this.GetEditorElement(editor); SizeF sizef = new SizeF(clientSize.Width - this.toggleElement.DesiredSize.Width, clientSize.Height); if (IsInEditMode && editorElement != null) { editorElement.Measure(new SizeF( Math.Min(this.Data.Owner.CurrentColumn.Width, availableSize.Width), sizef.Height)); desiredSize.Height = Math.Max(desiredSize.Height, editorElement.DesiredSize.Height); } this.layoutManagerPart.Measure(sizef); return(desiredSize); }
public ListViewColumnCollection(RadListViewElement owner) { this.owner = owner; this.columnNames = new HybridDictionary(!this.caseSensitive); }
protected virtual SizeF MeasureContentCore(SizeF availableSize, SizeF desiredSize) { float num1 = 0.0f; float num2 = 0.0f; if (this.dataItem.Owner.ShowCheckBoxes && (this.Data.Owner.CheckBoxesPosition == CheckBoxesPosition.Left || this.Data.Owner.CheckBoxesPosition == CheckBoxesPosition.Right)) { num1 = this.ToggleElement.DesiredSize.Width; } if (this.dataItem.Owner.ShowCheckBoxes && (this.Data.Owner.CheckBoxesPosition == CheckBoxesPosition.Bottom || this.Data.Owner.CheckBoxesPosition == CheckBoxesPosition.Top)) { num2 = this.ToggleElement.DesiredSize.Height; } desiredSize.Width += num1; desiredSize.Height += num2; if (this.Data.Size.Height > 0) { desiredSize.Height = (float)this.Data.Size.Height; } if (this.Data.Size.Width > 0) { desiredSize.Width = (float)this.Data.Size.Width; } RadListViewElement owner = this.Data.Owner; if (owner != null) { if (!owner.AllowArbitraryItemHeight && !owner.AllowArbitraryItemWidth) { desiredSize = (SizeF)owner.ItemSize; } else if (owner.AllowArbitraryItemHeight && !owner.AllowArbitraryItemWidth) { desiredSize = base.MeasureOverride(new SizeF((float)owner.ItemSize.Width - num1, availableSize.Height)); desiredSize.Width = (float)owner.ItemSize.Width; desiredSize.Height += num2; if (this.Data.Size.Height > 0) { desiredSize.Height = (float)this.Data.Size.Height; } } else if (!owner.AllowArbitraryItemHeight && owner.AllowArbitraryItemWidth) { desiredSize = base.MeasureOverride(new SizeF(availableSize.Width, (float)owner.ItemSize.Height - num2)); desiredSize.Height = (float)owner.ItemSize.Height; desiredSize.Width += num1; if (this.Data.Size.Width > 0) { desiredSize.Width = (float)this.Data.Size.Width; } } } this.Data.ActualSize = desiredSize.ToSize(); SizeF size = this.GetClientRectangle(desiredSize).Size; RadItem editorElement = this.GetEditorElement((IValueEditor)this.Editor); this.Layout.Measure(new SizeF(size.Width - this.ToggleElement.DesiredSize.Width, size.Height)); if (this.IsInEditMode && editorElement != null) { editorElement.Measure(this.Layout.RightPart.DesiredSize); } return(desiredSize); }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } if (this.dataItem.Owner.ShowCheckBoxes) { this.toggleElement.Visibility = ElementVisibility.Visible; } else { this.toggleElement.Visibility = ElementVisibility.Collapsed; } SizeF desiredSize = base.MeasureOverride(availableSize); desiredSize.Width += this.toggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { desiredSize.Height = this.Data.Size.Height; } if (this.Data.Size.Width > 0) { desiredSize.Width = this.Data.Size.Width; } RadListViewElement listViewElement = this.Data.Owner; if (listViewElement != null) { if (!listViewElement.AllowArbitraryItemHeight && !listViewElement.AllowArbitraryItemWidth) { desiredSize = listViewElement.ItemSize; } else if (listViewElement.AllowArbitraryItemHeight && !listViewElement.AllowArbitraryItemWidth) { desiredSize = base.MeasureOverride(new SizeF(listViewElement.ItemSize.Width, availableSize.Height)); desiredSize.Width = listViewElement.ItemSize.Width; if (this.Data.Size.Height > 0) { desiredSize.Height = this.Data.Size.Height; } } else if (!listViewElement.AllowArbitraryItemHeight && listViewElement.AllowArbitraryItemWidth) { desiredSize = base.MeasureOverride(new SizeF(availableSize.Width, listViewElement.ItemSize.Height)); desiredSize.Height = listViewElement.ItemSize.Height; desiredSize.Width += this.toggleElement.DesiredSize.Width; if (this.Data.Size.Width > 0) { desiredSize.Width = this.Data.Size.Width; } } } this.Data.ActualSize = desiredSize.ToSize(); SizeF clientSize = GetClientRectangle(desiredSize).Size; RadItem editorElement = this.GetEditorElement(editor); SizeF sizef = new SizeF(clientSize.Width - this.toggleElement.DesiredSize.Width, clientSize.Height); this.layoutManagerPart.Measure(sizef); if (IsInEditMode && editorElement != null) { editorElement.Measure(this.layoutManagerPart.RightPart.DesiredSize); } return(desiredSize); }
public ListViewTraverser(RadListViewElement owner) { this.owner = owner; this.Position = null; }
public ListViewCheckedItemCollection(RadListViewElement listView) : base((IList <ListViewDataItem>) new List <ListViewDataItem>()) { this.listView = listView; }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } if (this.dataItem.Owner.ShowCheckBoxes) { this.toggleElement.Visibility = ElementVisibility.Visible; } else { this.toggleElement.Visibility = ElementVisibility.Collapsed; } float indent = 0; if (this.Data.Owner.ShowGroups && (this.Data.Owner.EnableCustomGrouping || this.Data.Owner.EnableGrouping) && this.Data.Owner.Groups.Count > 0) { indent = this.Data.Owner.GroupIndent; } SizeF desiredSize = base.MeasureOverride(LayoutUtils.InfinitySize); desiredSize.Width += this.toggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { desiredSize.Height = this.Data.Size.Height; } if (this.Data.Size.Width > 0) { desiredSize.Width = this.Data.Size.Width; } RadListViewElement listViewElement = this.Data.Owner; if (listViewElement != null && !listViewElement.AllowArbitraryItemHeight) { desiredSize.Height = listViewElement.ItemSize.Height; } if (listViewElement != null && !listViewElement.AllowArbitraryItemWidth && !listViewElement.FullRowSelect) { desiredSize.Width = listViewElement.ItemSize.Width; } if (listViewElement != null && listViewElement.FullRowSelect) { desiredSize.Width = Math.Max(GetClientRectangle(availableSize).Width, desiredSize.Width + indent); } SizeF clientSize = GetClientRectangle(desiredSize).Size; RadItem editorElement = this.GetEditorElement(editor); SizeF sizef = new SizeF(clientSize.Width - this.toggleElement.DesiredSize.Width, clientSize.Height); if (IsInEditMode && editorElement != null) { float editorWidth = Math.Min(clientSize.Width - this.toggleElement.DesiredSize.Width - indent, availableSize.Width - indent); editorElement.Measure(new SizeF(editorWidth, float.PositiveInfinity)); desiredSize.Height = Math.Max(desiredSize.Height, editorElement.DesiredSize.Height); sizef.Height = desiredSize.Height; } this.layoutManagerPart.Measure(sizef); this.Data.ActualSize = desiredSize.ToSize(); return(desiredSize); }
public GClass0(RadListViewElement radListViewElement_1) { this.radListViewElement_0 = radListViewElement_1; }
public SimpleListViewElement(RadListViewElement owner) : base(owner) { }
public IconListViewElement(RadListViewElement owner) : base(owner) { }
protected override SizeF MeasureOverride(SizeF availableSize) { if (this.Data == null) { return(SizeF.Empty); } float num = 0.0f; if (this.Data.Owner.ShowGroups && (this.Data.Owner.EnableCustomGrouping || this.Data.Owner.EnableGrouping) && this.Data.Owner.Groups.Count > 0) { num = (float)this.Data.Owner.GroupIndent; } SizeF finalSize = base.MeasureOverride(LayoutUtils.InfinitySize); finalSize.Width += this.ToggleElement.DesiredSize.Width; if (this.Data.Size.Height > 0) { finalSize.Height = (float)this.Data.Size.Height; } if (this.Data.Size.Width > 0) { finalSize.Width = (float)this.Data.Size.Width; } RadListViewElement owner = this.Data.Owner; if (owner != null && !owner.AllowArbitraryItemWidth) { finalSize.Width = (float)owner.ItemSize.Width; } if (owner != null && !owner.AllowArbitraryItemHeight) { finalSize.Height = (float)owner.ItemSize.Height; } if (owner != null && owner.FullRowSelect) { finalSize.Width = Math.Max(float.IsInfinity(availableSize.Width) ? 0.0f : this.GetClientRectangle(availableSize).Width, finalSize.Width + num); } if (owner != null && owner.AllowArbitraryItemHeight && !owner.AllowArbitraryItemWidth) { SizeF sizeF = base.MeasureOverride(new SizeF(finalSize.Width, float.PositiveInfinity)); if (this.dataItem.Owner.ShowCheckBoxes && (this.dataItem.Owner.CheckBoxesPosition == CheckBoxesPosition.Top || this.dataItem.Owner.CheckBoxesPosition == CheckBoxesPosition.Bottom)) { sizeF.Height += this.ToggleElement.DesiredSize.Height; } finalSize.Height = sizeF.Height; } if (owner != null && owner.AllowArbitraryItemWidth && !owner.AllowArbitraryItemHeight) { SizeF sizeF = base.MeasureOverride(new SizeF(float.PositiveInfinity, finalSize.Height)); if (this.dataItem.Owner.ShowCheckBoxes && (this.dataItem.Owner.CheckBoxesPosition == CheckBoxesPosition.Left || this.dataItem.Owner.CheckBoxesPosition == CheckBoxesPosition.Right)) { sizeF.Width += this.ToggleElement.DesiredSize.Width; } finalSize.Width = sizeF.Width; } SizeF size = this.GetClientRectangle(finalSize).Size; RadItem editorElement = this.GetEditorElement((IValueEditor)this.Editor); SizeF availableSize1 = new SizeF(size.Width - this.ToggleElement.DesiredSize.Width, size.Height); if (this.IsInEditMode && editorElement != null) { float width = Math.Min(size.Width - this.ToggleElement.DesiredSize.Width - num, availableSize.Width - num); editorElement.Measure(new SizeF(width, float.PositiveInfinity)); finalSize.Height = Math.Max(finalSize.Height, editorElement.DesiredSize.Height); availableSize1.Height = finalSize.Height; } this.Layout.Measure(availableSize1); this.Data.ActualSize = finalSize.ToSize(); return(finalSize); }
public ColumnResizingBehavior(RadListViewElement owner) { this.owner = owner; }
public ListViewGroupFactory(RadListViewElement owner) { this.owner = owner; }