Class RadFilterViewElement
The main element of the Rad
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadFilterViewElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider, IDataItemSource, IFilterViewCategoriesOwner
Constructors
RadFilterViewElement()
Initializes a new instance of the Rad
Declaration
public RadFilterViewElement()
Properties
AssociatedFilterable
Gets or sets the associated filterable. This is a control or a class that implements the IFilterable interface.
Declaration
public IFilterable AssociatedFilterable { get; set; }
Property Value
AutoGenerateCategories
Gets or sets a value indicating whether to auto generate categories when the DataSource property is set.
Declaration
public bool AutoGenerateCategories { get; set; }
Property Value
System. A value indicating whether to auto generate categories. |
Categories
Gets the categories collection.
Declaration
public RadItemOwnerGenericCollection<BaseFilterViewCategoryElement> Categories { get; }
Property Value
CategoriesFactory
Gets or sets the factory responsible for creating category elements.
Declaration
public FilterViewCategoriesFactory CategoriesFactory { get; set; }
Property Value
ContextMenu
Gets or sets the context menu.
Declaration
public RadContextMenuDropDown ContextMenu { get; set; }
Property Value
DataSource
Gets or sets the data source.
Declaration
public object DataSource { get; set; }
Property Value
System.
|
ElementsPanel
Gets the panel which holds all category elements.
Declaration
public StackLayoutPanel ElementsPanel { get; }
Property Value
Expression
Gets the filter expression.
Declaration
public string Expression { get; }
Property Value
System.
|
FilterDescriptors
Gets the filter descriptors collection.
Declaration
public FilterDescriptorCollection FilterDescriptors { get; }
Property Value
FilteringMode
Gets or sets the filtering mode.
Declaration
public FilteringMode FilteringMode { get; set; }
Property Value
HorizontalScrollBar
Gets the horizontal scrollbar element.
Declaration
public RadScrollBarElement HorizontalScrollBar { get; }
Property Value
LoadCategoriesAsync
Declaration
public bool LoadCategoriesAsync { get; set; }
Property Value
System.
|
VerticalScrollBar
Gets the vertical scrollbar element.
Declaration
public RadScrollBarElement VerticalScrollBar { get; }
Property Value
Methods
ApplyFilterDescriptor(FilterDescriptor)
Applies a Filter
Declaration
public virtual bool ApplyFilterDescriptor(FilterDescriptor filterDescriptor)
Parameters
Filter
|
Returns
System.
|
ArrangeOverride(SizeF)
Arranges the Rad
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System. The size that is available for element. |
Returns
System. The rectangle occupied by the element. Usually |
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
CategoryFilterChanged(IFilterViewCategory)
Called when the filter of a category is changed.
Declaration
public void CategoryFilterChanged(IFilterViewCategory categoryItem)
Parameters
IFilter The category with changed filter. |
Implements
ClearAllFilters()
Clears all applied filters.
Declaration
public virtual void ClearAllFilters()
CreateBindingContext()
Declaration
protected virtual BindingContext CreateBindingContext()
Returns
System.
|
CreateChildElements()
Creates child elements.
Declaration
protected override void CreateChildElements()
Overrides
CreateContextMenu()
Creates context menu.
Declaration
protected virtual RadContextMenuDropDown CreateContextMenu()
Returns
Rad The new Rad |
CreateHorizontalScrollBarElement()
Creates a horizontal scrollbar.
Declaration
protected virtual RadScrollBarElement CreateHorizontalScrollBarElement()
Returns
Rad The new Rad |
CreateListSource()
Creates the list source.
Declaration
protected virtual RadListSource<FilterViewDataItem> CreateListSource()
Returns
CreateStackPanel()
Creates a stack panel, which holds all categories.
Declaration
protected virtual StackLayoutPanel CreateStackPanel()
Returns
Stack The new Stack |
CreateVerticalScrollBarElement()
Creates a vertical scrollbar.
Declaration
protected virtual RadScrollBarElement CreateVerticalScrollBarElement()
Returns
Rad The new Rad |
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
InitializeCategories()
Initialized the categories.
Declaration
public virtual void InitializeCategories()
InitializeCategoriesAsync()
Initializes the categories asynchronously.
Declaration
public void InitializeCategoriesAsync()
InitializeDropDownMenu()
Initializes the items of the default context menu.
Declaration
protected virtual void InitializeDropDownMenu()
InitializeFields()
Initializes the fields.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the space required by the Rad
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System. The size that is available to the Rad |
Returns
System. The minimum size required by the element to be completely visible. Cannot be infinity. |
Overrides
Remarks
In this method call to the Measure method of each child must be made.
OnCategoryCreated(FilterViewCategoryCreatedEventArgs)
Called when a category element is created. This event is suitable to modify properties of the Category element.
Declaration
protected virtual void OnCategoryCreated(FilterViewCategoryCreatedEventArgs args)
Parameters
Filter The event arguments. |
OnCategoryCreating(FilterViewCategoryCreatingEventArgs)
Called when a category is about to be created. This event is suitable to modify the values collection(sort/add/remove/reorder) or modify/replace the Category element.
Declaration
protected virtual void OnCategoryCreating(FilterViewCategoryCreatingEventArgs args)
Parameters
Filter The event arguments. |
OnContextMenuClosed()
Raises the ContextMenuClosed event.
Declaration
protected virtual void OnContextMenuClosed()
OnContextMenuClosing(CancelEventArgs)
Raises the ContextMenuClosing event.
Declaration
protected virtual void OnContextMenuClosing(CancelEventArgs args)
Parameters
System. The event arguments. |
OnContextMenuItemClick(Object, EventArgs)
Called when an item of the context menu is clicked by the user.
Declaration
protected virtual void OnContextMenuItemClick(object sender, EventArgs e)
Parameters
System. The clicked item. |
System. The event arguments. |
OnContextMenuOpened()
Raises the ContextMenuOpened event.
Declaration
protected virtual void OnContextMenuOpened()
OnContextMenuOpening(CancelEventArgs)
Raises the ContextMenuOpening event.
Declaration
protected virtual void OnContextMenuOpening(CancelEventArgs args)
Parameters
System. The event arguments. |
OnFilterChanged(FilterChangedEventArgs)
Called when the filter is changed.
Declaration
protected virtual void OnFilterChanged(FilterChangedEventArgs args)
Parameters
Filter The event arguments. |
OnMouseDown(MouseEventArgs)
Called when a mouse-down event is fired.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System. The event arguments. |
Overrides
OnMouseMove(MouseEventArgs)
Called when a mouse-move event is fired.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System. The event arguments. |
Overrides
OnMouseUp(MouseEventArgs)
Called when a mouse-up event is fired.
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System. The event arguments. |
Overrides
OnMouseWheel(MouseEventArgs)
Raises the MouseWheel event.
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System. The event arguments. |
Overrides
PrepareCategories()
Identifies and creates the categories elements.
Declaration
protected virtual void PrepareCategories()
ProcessCategoryData()
Processes and populates with data the categories.
Declaration
protected virtual void ProcessCategoryData()
ProcessMouseWheelScroll(MouseEventArgs, RadScrollBarElement)
Called when a mouse wheel event is raised.
Declaration
protected virtual void ProcessMouseWheelScroll(MouseEventArgs e, RadScrollBarElement scrollBar)
Parameters
System. The event arguments. |
Rad The scrollbar element. |
RemoveFilterDescriptor(FilterDescriptor)
Clears the filter of the category that matches the PropertyName of the given Filter
Declaration
public virtual void RemoveFilterDescriptor(FilterDescriptor filterDescriptor)
Parameters
Filter
|
SetupCategory(BaseFilterViewCategoryElement, ICollection<Object>)
Fires the Category
Declaration
public void SetupCategory(BaseFilterViewCategoryElement category, ICollection<object> values)
Parameters
Base The category element. |
System. The values of the category. |
ShouldArrangeChild(RadElement)
Gets a value indicating, whether a child will be arranged during the ArrangeOverride.
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
Rad The child. |
Returns
System. Whether the child will be arranged in ArrangeOverride. |
Overrides
ShouldMeasureChild(RadElement)
Gets a value indicating, whether a child will be measured during the MeasureOverride.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
Rad The child. |
Returns
System. Whether the child will be measured in MeasureOverride. |
Overrides
ShowContextMenu(IFilterViewCategory, Point)
Shows a context menu by given category and location.
Declaration
public virtual void ShowContextMenu(IFilterViewCategory category, Point location)
Parameters
IFilter The category. |
System. The location of context menu. |
Implements
UpdateAssociatedFilterable()
Updates the Filter
Declaration
protected virtual void UpdateAssociatedFilterable()
UpdateCategory(IFilterViewCategory)
Declaration
public void UpdateCategory(IFilterViewCategory category)
Parameters
IFilter
|
Implements
UpdateScrollbars()
Updates the scroll bars visibility and value range.
Declaration
public void UpdateScrollbars()
Events
CategoryCreated
An event that occurs when a category is created and populated with items. This event is suitable to modify properties of the Category element.
Declaration
public event FilterViewCategoryCreatedEventHandler CategoryCreated
Event Type
CategoryCreating
An event that occurs when a category is created and is about to be populated with items. This event is suitable to modify the values collection(sort/add/remove/reorder) or modify/replace the Category element.
Declaration
public event FilterViewCategoryCreatingEventHandler CategoryCreating
Event Type
ContextMenuClosed
Occurs when the context menu is closed.
Declaration
public event EventHandler ContextMenuClosed
Event Type
System.
|
ContextMenuClosing
Occurs when the context menu is closing.
Declaration
public event CancelEventHandler ContextMenuClosing
Event Type
System.
|
ContextMenuItemClick
Occurs when an item in the context menu is clicked.
Declaration
public event HandledEventHandler ContextMenuItemClick
Event Type
System.
|
ContextMenuOpened
Occurs when the context menu is opened.
Declaration
public event EventHandler ContextMenuOpened
Event Type
System.
|
ContextMenuOpening
Occurs when the context menu is opening.
Declaration
public event CancelEventHandler ContextMenuOpening
Event Type
System.
|
FilterChanged
An event that occurs when the filter is changed.
Declaration
public event FilterChangedEventHandler FilterChanged
Event Type
Explicit Interface Implementations
IDataItemSource.BindingComplete()
IDataItemSource.BindingContext
Declaration
BindingContext IDataItemSource.BindingContext { get; }
Returns
System.
|
Implements
IDataItemSource.BindingContextChanged
Declaration
event EventHandler IDataItemSource.BindingContextChanged
Returns
System.
|
Implements
IDataItemSource.Initialize()
Initializes IDataItemSource.
Declaration
void IDataItemSource.Initialize()
Implements
IDataItemSource.MetadataChanged(PropertyDescriptor)
Declaration
void IDataItemSource.MetadataChanged(PropertyDescriptor pd)
Parameters
System.
|
Implements
IDataItemSource.NewItem()
Create new row item.
Declaration
IDataItem IDataItemSource.NewItem()