API Reference
Class
ImageShapeStyleHelper
Helper class for getting and setting the style of a V.Shape object.
Inheritance
- Object
- ImageShapeStyleHelper
Examples
This is a sample of how to use this class.
// Get the style
var style = ShapeStyleHelper.GetStyle(shape1);
// Modify the style
style["position"] = "absolute";
style["margin-left"] = "0";
// Set the style
ShapeStyleHelper.SetStyle(shape1, style);
Methods
public static Dictionary<String, String> GetStyle(Shape shape) #Returns:
Dictionary<String, String>Retrieves the style attributes of a Shape as a dictionary.
Parameters
- shape DocumentFormat.OpenXml.Vml.Shape
- The VML Shape whose style should be parsed.
Returns
A dictionary containing style names and values.
public static Void SetStyle(Shape shape, Dictionary<String, String> style) #Returns:
VoidApplies the provided style dictionary to the given Shape.
Parameters
- shape DocumentFormat.OpenXml.Vml.Shape
- The VML Shape to update.
- style System.Collections.Generic.Dictionary{System.String,System.String}
- The style dictionary to serialize and assign.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object