Created
March 24, 2017 07:16
-
-
Save ytabuchi/9fb52b4618458fdbcf54f21092bedaf1 to your computer and use it in GitHub Desktop.
Loading SVG iamges
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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