Microsoft press ebook_programming_windows_phone_7_pdf


Published on

Книжка по программированию на Windows7.для мобильных устройств
Англ язык.


Там же Sample codes

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Microsoft press ebook_programming_windows_phone_7_pdf

  1. 1. PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2010 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2010939982 ISBN: 978-0-7356-4335-2 Printed and bound in the United States of America. Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Tell us what you think of this book at Microsoft and the trademarks listed at US.aspx are trademarks of the Microsoft group of companies. All other marks are the property of their respective owners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Developmental and Project Editor: Devon Musgrave Editorial Production: Ashley Schneider, S4Carlisle Publishing Services Technical Reviewer: Per Blomqvist; Technical Review Services provided by Content Master, a member of CM Group, Ltd. Cover: Tom Draper Design Body Part No. X17-12906
  2. 2. .
  3. 3. an application at that utilizes the webcam and ARToolkit to emulate the accelerometer sensor and feed that data into the Windows Phone 7 emulator through a TCP/HTTP Server, and although neither of us have tried it out, it sounds quite intriguing.
  4. 4. × × × ×
  5. 5. × 480)
  6. 6. Title="SilverlightHelloPhone" Title="Silverlight Hello Phone"
  7. 7. namespace SilverlightHelloPhone { public partial class App : Application { public App() { …
  8. 8. InitializeComponent(); … } … } } <Application x:Class="SilverlightHelloPhone.App" xmlns="" xmlns:x="" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"> … </Application>
  9. 9. using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using Microsoft.Phone.Controls; namespace SilverlightHelloPhone { public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); }
  10. 10. } } <phone:PhoneApplicationPage x:Class="SilverlightHelloPhone.MainPage" xmlns="" xmlns:x="" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="" xmlns:mc="" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="Portrait" Orientation="Portrait" shell:SystemTray.IsVisible="True"> <!--LayoutRoot is the root grid where all page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/> <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> </StackPanel> <!--ContentPanel - place additional content here-->
  11. 11. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> </Grid> </Grid> </phone:PhoneApplicationPage>
  12. 12. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <TextBlock Text="Hello, Windows Phone 7!" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Grid> <TextBlock … Text="MY APPLICATION" … /> <TextBlock … Text="SILVERLIGHT HELLO PHONE" … /> <TextBlock … Text="page title" … /> <TextBlock … Text="main page" … />
  13. 13. Foreground="Red" FontSize="36"
  14. 14. × × FontSize="36" ×
  15. 15. FontSize="{StaticResource PhoneFontSizeNormal}"