Set shape's gradient fill

Refer to the following example code to see how to set gradient fill for a shape.