skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class FilteredShapeCollection<T>

Base collection for managing typed subsets of worksheet shapes, enabling filtered access and modification to shapes by type.

Inheritance
System.Object
FilteredShapeCollection<T>
ChartCollection
CommentCollection
ImageCollection
NoteCollection
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll

Syntax

public abstract class FilteredShapeCollection<T> : IEnumerable<T>, IEnumerable where T : FloatingShapeBase
Type Parameters
T

The type of the shape.

Properties

Count

Gets the number of shapes of type T in the collection.

Declaration
public int Count { get; }
Property Value
System.Int32

The item count.

Item[Int32]

Gets the shape at the specified zero-based index within the filtered collection.

Declaration
public T this[int index] { get; }
Parameters
System.Int32 index

Property Value
T

ShapeType

Gets the shape type that this collection filters and manages.

Declaration
public abstract FloatingShapeType ShapeType { get; }
Property Value
FloatingShapeType

Worksheet

Gets the worksheet that owns this shape collection.

Declaration
protected Worksheet Worksheet { get; }
Property Value
Worksheet

The worksheet.

Methods

Add(T)

Adds a shape to the collection and the underlying worksheet.

Declaration
public void Add(T item)
Parameters
T item

The item.

Clear()

Removes all shapes of type T from the collection.

Declaration
public void Clear()

Contains(T)

Determines whether the collection contains the specified shape.

Declaration
public bool Contains(T item)
Parameters
T item

The note.

Returns
System.Boolean

A value indicating whether the collection contains the specified shape.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<T> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<T>

A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

GetZIndex(T)

Gets the layering order (ZIndex) of the specified shape, or -1 if not found.

Declaration
public int GetZIndex(T shape)
Parameters
T shape

Returns
System.Int32

The zero-based ZIndex. If the item is not found in the collection, -1 is returned.

IndexOf(T)

Searches for the specified shape and returns its zero-based index, or -1 if not found.

Declaration
public int IndexOf(T item)
Parameters
T item

The item.

Returns
System.Int32

The index of the item.

OnChanged(ShapeCollectionChangedEventArgs<T>)

Raises the Changed event.

Declaration
protected virtual void OnChanged(ShapeCollectionChangedEventArgs<T> args)
Parameters
ShapeCollectionChangedEventArgs<T> args

The ShapeCollectionChangedEventArgs<T> instance containing the event data.

OnChanging(ShapeCollectionChangingEventArgs<T>)

Raises the Changing event.

Declaration
protected virtual void OnChanging(ShapeCollectionChangingEventArgs<T> args)
Parameters
ShapeCollectionChangingEventArgs<T> args

The ShapeCollectionChangingEventArgs<T> instance containing the event data.

OnItemAdding(T, out ShapeCollectionChangingEventArgs<T>)

Invoked before adding a shape to the collection, enabling cancellation via the event args.

Declaration
protected void OnItemAdding(T shape, out ShapeCollectionChangingEventArgs<T> args)
Parameters
T shape

ShapeCollectionChangingEventArgs<T> args

OnItemRemoving(T, out ShapeCollectionChangingEventArgs<T>)

Invoked before removing a shape from the collection, enabling cancellation via the event args.

Declaration
protected void OnItemRemoving(T shape, out ShapeCollectionChangingEventArgs<T> args)
Parameters
T shape

ShapeCollectionChangingEventArgs<T> args

Remove(T)

Removes the specified shape from the collection and returns whether it was found and removed.

Declaration
public virtual bool Remove(T item)
Parameters
T item

The item.

Returns
System.Boolean

The value indicating whether the specified shape was found.

Events

Changed

Raised after a shape is added, removed, or the collection is cleared.

Declaration
public event EventHandler<ShapeCollectionChangedEventArgs<T>> Changed
Event Type
System.EventHandler<ShapeCollectionChangedEventArgs<T>>

Changing

Raised before a shape is added or removed, allowing the operation to be canceled.

Declaration
public event EventHandler<ShapeCollectionChangingEventArgs<T>> Changing
Event Type
System.EventHandler<ShapeCollectionChangingEventArgs<T>>

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

An System.Collections.IEnumerator object that can be used to iterate through the collection.

Implements
System.Collections.IEnumerable.GetEnumerator()
Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.