Discover the GradientStopCollection Count property, which provides the total number of items, enhancing your data management and UI design efficiency....DocumentBuilder ( doc ); Shape shape = builder . InsertShape (...ShapeType . Rectangle , 80 , 80 ); shape . Fill . TwoColorGradient (...