Size: 661
Comment:
|
Size: 1218
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 41: | Line 41: |
{{{!#xml | {{{#!xml |
Line 44: | Line 44: |
<UriImageSource Uri="https://developer.xamarin.com/demo/IMG_3256.JPG" /> | <UriImageSource Uri="https://developer.xamarin.com/demo/IMG_3256.JPG" Aspect="[AspectFit|Fill|AspectFill]" /> |
Line 48: | Line 48: |
=== Program ResourceBitmapCode === Page 289 Concepts: 1. Shows how to include a bitmap from an embedded resource (i.e. file) {{{#!csharp public class ResourceBitmapCodePage : ContentPage { public ResourceBitmapCodePage() { Content = new Image { Source = ImageSource.FromResource( "ResourceBitmapCode.Images.ModernUserInterface256.jpg"), VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Center }; } } }}} |
Chapter 13 Notes
Title: Bitmaps
Summary
So much ado about Bitmaps.
Programming Concepts Summary
Concept |
Page |
Image |
P. 283 |
Programs
Program WebBitmapCode
Page 284.
Concepts:
- Shows how to include a bitmap from the web
Classes:
Image
ImageSource
Program WebBitmapXaml
Page 286.
Concepts:
- Shows how to include a bitmap from the web using Xaml
Xaml:
<Image> <Image.Source> <UriImageSource Uri="https://developer.xamarin.com/demo/IMG_3256.JPG" Aspect="[AspectFit|Fill|AspectFill]" /> </Image.Source> </Image>
Program ResourceBitmapCode
Page 289
Concepts:
- Shows how to include a bitmap from an embedded resource (i.e. file)
1 public class ResourceBitmapCodePage : ContentPage
2 {
3 public ResourceBitmapCodePage()
4 {
5 Content = new Image
6 {
7 Source = ImageSource.FromResource(
8 "ResourceBitmapCode.Images.ModernUserInterface256.jpg"),
9 VerticalOptions = LayoutOptions.Center,
10 HorizontalOptions = LayoutOptions.Center
11 };
12 }
13 }