Image.Source
property · Image · cAlgo.API
DesktopCLICloud
Gets or sets the source of the image.
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 object Source {get; set;}
image.Source: object
Returns object
Examples
var icon = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='#2ECC71'/></svg>");
var image = new Image { Source = icon, Width = 24, Height = 24 };
Chart.AddControl(image);
Print("Source type: {0}", image.Source.GetType().Name);
icon = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='#2ECC71'/></svg>")
image = Image()
image.Source = icon
image.Width = 24
image.Height = 24
api.Chart.AddControl(image)