Skip to content

Instantly share code, notes, and snippets.

@ytabuchi
Created March 24, 2017 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ytabuchi/9fb52b4618458fdbcf54f21092bedaf1 to your computer and use it in GitHub Desktop.
Save ytabuchi/9fb52b4618458fdbcf54f21092bedaf1 to your computer and use it in GitHub Desktop.
Loading SVG iamges
var appStore = new SvgImage
{
SvgPath = "SvgSample.Resources.AppStore.svg",
SvgAssembly = typeof(App).GetTypeInfo().Assembly,
WidthRequest = 135,
HeightRequest = 40,
HorizontalOptions = LayoutOptions.Center
};
var coolMask = new SvgImage
{
SvgPath = "SvgSample.Resources.CoolMask.svg",
SvgAssembly = typeof(App).GetTypeInfo().Assembly,
WidthRequest = 135,
HeightRequest = 40,
HorizontalOptions = LayoutOptions.Center
};
var tiger = new SvgImage
{
SvgPath = "SvgSample.Resources.Tiger.svg",
SvgAssembly = typeof(App).GetTypeInfo().Assembly,
WidthRequest = 135,
HeightRequest = 40,
HorizontalOptions = LayoutOptions.Center
};
Title = "SVG via CSharp";
Content = new ScrollView
{
Padding = new Thickness(8),
Content = new StackLayout
{
Children =
{
appStore,
coolMask,
tiger
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment