Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Microsoft_Press_eBook_Xamarin_Preview_2_PDF

Microsoft_Press_eBook_Xamarin_Preview_2_PDF

Published by saravanandeven, 2017-09-06 08:28:29

Description: Microsoft_Press_eBook_Xamarin_Preview_2_PDF

Search

Read the Text Version

Chapter 16 Data binding 438 However, this program still needs a code-behind file to manage applying the italic and boldface at-tributes to the block of text. These methods are identical to those in the early CheckBoxDemo pro-gram:public partial class NewCheckBoxDemoPage : ContentPage{ public NewCheckBoxDemoPage() { // Ensure link to Toolkit library. new Xamarin.FormsBook.Toolkit.NewCheckBox(); InitializeComponent(); } void OnItalicCheckBoxChanged(object sender, bool isChecked) { if (isChecked) { label.FontAttributes |= FontAttributes.Italic; } else { label.FontAttributes &= ~FontAttributes.Italic; } } void OnBoldCheckBoxChanged(object sender, bool isChecked) { if (isChecked) { label.FontAttributes |= FontAttributes.Bold; } else { label.FontAttributes &= ~FontAttributes.Bold; } }} Xamarin.Forms does not support a “multi-binding” that might allow multiple binding sources to becombined to change a single binding target. Bindings can do a lot, but without some additional codesupport, they can’t do everything. There’s still a role for code.

Free ebooksFrom technical overviews to drilldowns on special topics, getfree ebooks from Microsoft Press at:www.microsoftvirtualacademy.com/ebooksDownload your free ebooks in PDF, EPUB, and/or Mobi forKindle formats.Look for other great resources at Microsoft Virtual Academy,where you can learn new skills and help advance your careerwith free Microsoft training delivered by experts. Microsoft Press

Now that you’ve read the book...Tell us what you think!Was it useful?Did it teach you what you wanted to learn?Was there room for improvement?Let us know at http://aka.ms/tellpressYour feedback goes directly to the staff at Microsoft Press,and we read every one of your responses. Thanks in advance!


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook