421
Comment:
|
1218
|
Deletions are marked like this. | Additions are marked like this. |
Line 16: | Line 16: |
=== Program Baskervilles === | === Program WebBitmapCode === |
Line 18: | Line 18: |
Page 41. | Page 284. |
Line 22: | Line 22: |
1. Shows that text wraps inside a label be default. 1. Shows the use of Device.OnPlatform for padding. |
1. Shows how to include a bitmap from the web |
Line 27: | Line 27: |
1. Label is demonstrated. | 1. {{{Image}}} 1. {{{ImageSource}}} === Program WebBitmapXaml === Page 286. Concepts: 1. Shows how to include a bitmap from the web using Xaml Xaml: {{{#!xml <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: 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 }