Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2016-10-03 17:44:27
Size: 421
Editor: scot
Comment:
Revision 3 as of 2016-10-05 14:19:21
Size: 1218
Editor: scot
Comment:
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:

  1. Shows how to include a bitmap from the web

Classes:

  1. Image

  2. ImageSource

Program WebBitmapXaml

Page 286.

Concepts:

  1. 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:

  1. 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 }

ManagingAndProgrammingMobileApplications/Xamarin/Chapter 13 (last edited 2016-10-05 21:21:42 by scot)