Class ImageSource
Forms9Patch ImageSource.
Inherited Members
Xamarin.Forms.Element.OnChildRemoved(Xamarin.Forms.Element, System.Int32)
Namespace: Forms9Patch
Assembly: Forms9Patch.dll
Syntax
public class ImageSource : ImageSource, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IStyleSelectable
Methods
FromMultiResource(String, Assembly)
Cached selection of best fit multi-device / multi-resolution image embedded resource
Declaration
public static ImageSource FromMultiResource(string resourceId, Assembly assembly = null)
Parameters
Type | Name | Description |
---|---|---|
String | resourceId | ResourceID without extension, resolution modifier, or device modifier |
Assembly | assembly | Assembly in which the resource can be found |
Returns
Type | Description |
---|---|
ImageSource | Xamarin.Forms.ImageSource |
FromResource(String, Assembly)
Cached selection of resource (literally - no automated selection of device, resolution, or extension).
Declaration
public static ImageSource FromResource(string resourceId, Assembly assembly = null)
Parameters
Type | Name | Description |
---|---|---|
String | resourceId | Path. |
Assembly | assembly | Assembly. |
Returns
Type | Description |
---|---|
ImageSource | The resource. |
FromResourceAsFile(String, Assembly)
Load an EmbeddedResource as a Xamarin.Forms.FileImageSource
Declaration
public static FileImageSource FromResourceAsFile(string resourceId, Assembly assembly = null)
Parameters
Type | Name | Description |
---|---|---|
String | resourceId | |
Assembly | assembly |
Returns
Type | Description |
---|---|
FileImageSource |
FromSvgText(String)
Use a SVG string as a image source for a Forms9Patch image
Declaration
public static ImageSource FromSvgText(string svgText)
Parameters
Type | Name | Description |
---|---|---|
String | svgText |
Returns
Type | Description |
---|---|
ImageSource |