Skip to content

Image.Stretch

property · Image · cAlgo.API

DesktopCLICloud

Gets or sets a value that describes how an Image should be stretched to fill the destination rectangle.

Environment behaviour

CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Definition

public Stretch Stretch {get; set;}
image.Stretch: Stretch

Returns Stretch

Examples

var image = new Image { Width = 200, Height = 50, Stretch = Stretch.Fill };
image.Source = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>");
Chart.AddControl(image);
image = Image()
image.Width = 200
image.Height = 50
image.Stretch = Stretch.Fill
image.Source = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='6' fill='#E74C3C'/></svg>")
api.Chart.AddControl(image)