namespace IESample
{
class ImageModel
{
public ImageSource Image { get; set; }
public ImageModel()
{
Assembly assembly = typeof(ImageModel).GetTypeInfo().Assembly;
Image = ImageSource.FromResource("IESample.Image.jpeg", assembly);
}
}
} |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IESample.GettingStarted"
xmlns:local="clr-namespace:IESample"
xmlns:imageeditor="clr-
namespace:Syncfusion.SfImageEditor.XForms;assembly=Syncfusion.SfImageEditor.XForms">
<ContentPage.BindingContext>
<local:ImageModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<imageeditor:SfImageEditor Source="{Binding Image}" />
</ContentPage.Content>
</ContentPage> |
<syncfusion:SfImageEditor x:Name="editor" Source="{Binding Image}" Grid.Row="1">
</syncfusion:SfImageEditor> |
Image customImage = new Image() { HeightRequest = 200, WidthRequest = 200 };
Assembly assembly = Assembly.GetAssembly(typeof(GettingStarted));
customImage.Source = ImageSource.FromResource("IESample.ITypogy1.png", assembly);
editor.AddCustomView(customImage, new CustomViewSettings()); |