How to add vertical, horizontal or linear gradient to an XPS file is a question answered by Aspose.Page API solution. Learn the functionality for .NET... Fill = doc . CreateLinearGradient...(( XpsGradientBrush ) path . Fill ). GradientStops . AddRange...