presentation - windows app development - ii - mr. chandan gupta
TRANSCRIPT
![Page 1: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/1.jpg)
![Page 2: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/2.jpg)
Agenda Windows 8/Windows Phone
In this module, we
will....
Extension methods
Portable Class Libraries
MVVM Architecture
Data Binding Linked files
A common user experience
#if conditionals
In this module:
![Page 3: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/3.jpg)
![Page 4: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/4.jpg)
![Page 5: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/5.jpg)
Common Structure
![Page 6: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/6.jpg)
Model-View-ViewModel
View
ViewModel
Commands
Data Binding
Model
![Page 7: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/7.jpg)
MVVM Benefits
• Reuse Model and View-Model code
• Test the ViewModel with unit tests
• Maintainability
• Can show design-time data in Expression Blend and the Visual Studio designer
![Page 8: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/8.jpg)
Model – View - ViewModel
public class MyModelItem{
public int Id { get; set; }
[DataMember(Name = "text")]public string Text { get; set; }
[DataMember(Name = "complete")]public bool Complete { get; set; }
}
public class MyModelItem{
public int Id { get; set; }
[DataMember(Name = "text")]public string Text { get; set; }
[DataMember(Name = "complete")]public bool Complete { get; set; }
}
![Page 9: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/9.jpg)
Data Service Calls in the ViewModel
private MobileServiceCollectionView<TodoItem> items;private IMobileServiceTable<TodoItem> todoTable = App.MobileService.GetTable<TodoItem>();
private void RefreshTodoItems(){
items = todoTable.Where(todoItem => todoItem.Complete == false).ToCollectionView();
}
private async void InsertTodoItem(TodoItem todoItem){
await todoTable.InsertAsync(todoItem);items.Add(todoItem);
}
![Page 10: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/10.jpg)
Extract Model and Service Calls
![Page 11: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/11.jpg)
Good MVVM Practice
![Page 12: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/12.jpg)
2
DataBinding(INotifyPropertyChanged)
![Page 13: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/13.jpg)
Data Binding in the ViewModel
// Create INotifyPropertyChanged property called VisibleItemsprivate void MobileServiceCollectionView<TodoItem> RefreshTodoItems(){
items = todoTable.Where(todoItem => todoItem.Complete == false).ToCollectionView();
_visibleItems.Clear();foreach (var item in items){
_visibleItems.Add(item);}NotifyPropertyChanged("VisibleItems");
}
![Page 14: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/14.jpg)
Improved Structure
![Page 15: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/15.jpg)
“Add as Link”
![Page 16: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/16.jpg)
“Add as Link”
![Page 17: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/17.jpg)
Common APIs in Windows 8 and Windows
Phone 8
![Page 18: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/18.jpg)
Common APIs
![Page 19: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/19.jpg)
Hardware Implementation: Accelerometer
![Page 20: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/20.jpg)
Hardware Implementation: Accelerometer
<Canvas x:Name="hostCanvas" Loaded=“canvas_Loaded">
Accelerometer _accel;private void canvas_Loaded(object sender, RoutedEventArgs e){
_accel = Accelerometer.GetDefault();if (_accel != null)
_accel.ReadingChanged += _accel_ReadingChanged;}
![Page 21: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/21.jpg)
Hardware Implementation: Accelerometer
void _accel_ReadingChanged(Accelerometer sender, AccelerometerReadingChangedEventArgs args){
double _accelX = args.Reading.AccelerationX;double _accelY = args.Reading.AccelerationY;// Update the position of the ellipse
}
![Page 22: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/22.jpg)
Threading Difference
![Page 23: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/23.jpg)
Threading
Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>{
double _accelX = args.Reading.AccelerationX;double _accelY = args.Reading.AccelerationY;// Update ellipse location
});
Deployment.Current.Dispatcher.BeginInvoke(() =>{
double _accelX = args.Reading.AccelerationX;double _accelY = args.Reading.AccelerationY;//Update ellipse location
});
![Page 24: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/24.jpg)
#if Complier Conditionals
![Page 25: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/25.jpg)
#if Conditional Blocks
#if NETFX_COREDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {#endif
#if WINDOWS_PHONEDeployment.Current.Dispatcher.BeginInvoke(() => {#endif
![Page 26: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/26.jpg)
#if Conditional Blocks
![Page 27: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/27.jpg)
Threading
#if NETFX_COREDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {#elseDeployment.Current.Dispatcher.BeginInvoke(() => {#endif
double _accelX = args.Reading.AccelerationX;double _accelY = args.Reading.AccelerationY;
![Page 28: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/28.jpg)
Extension Methods
![Page 29: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/29.jpg)
Web Service
![Page 30: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/30.jpg)
HttpWebResponse and HttpWebRequest
var request = (HttpWebRequest)WebRequest.Create(autoCompleteUri);
HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync();
// retrieve data using StreamReader
![Page 31: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/31.jpg)
HttpWebResponse and HttpWebRequest
var request = (HttpWebRequest)WebRequest.Create(autoCompleteUri);request.BeginGetResponse(new AsyncCallback(AutoCompleteCallback), request);}
private void AutoCompleteCallback(IAsyncResult callback){
HttpWebRequest request = (HttpWebRequest)callback.AsyncState;HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(callback);// retrieve data using StreamReader
}
![Page 32: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/32.jpg)
Extension Methods
public static Task<HttpWebResponse> GetResponseAsync(this HttpWebRequest request){
var taskComplete = new TaskCompletionSource<HttpWebResponse>();request.BeginGetResponse(asyncResponse =>{
HttpWebRequest responseRequest = (HttpWebRequest)asyncResponse.AsyncState;
HttpWebResponse someResponse = (HttpWebResponse)responseRequest.EndGetResponse(asyncResponse);
taskComplete.TrySetResult(someResponse);}, request);
return taskComplete.Task;}
![Page 33: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/33.jpg)
HttpWebResponse and HttpWebRequest
#if WINDOWS_PHONEusing MyExtensionClass#endif
var request = (HttpWebRequest)WebRequest.Create(autoCompleteUri);
HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync();
// retrieve data using StreamReader
![Page 34: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/34.jpg)
Translating User
Experience
![Page 35: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/35.jpg)
Web Service
![Page 36: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/36.jpg)
UI Differences and XAML
![Page 37: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/37.jpg)
Different Form Factors Require Different UX
![Page 38: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/38.jpg)
Different Form Factors Require Different UX
![Page 39: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/39.jpg)
User Experience Considerations
One-handed touch most common
Guaranteed hardware, such as camera and accelerometer
Avoid multiple columns of content
Scroll vertically for more content
Very limited room on the app bar
Hardware back button
No semantic zoom
• Windows 8
One or two-handed touch, mouse
No guarantee of any specific hardware, must check at runtime
Rows and columns of content are normal
Scroll horizontally for more content
Significant room on the app bar
On-screen back button
Semantic zoom
Windows Phone 8
Design the UX separately for each platform!
![Page 40: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/40.jpg)
• Avoid reusing XAML across Windows Phone 8 and Windows 8
• Major differences in the platforms make this difficult anyway:–XAML namespaces
–XAML controls
–User experience
–Screen space
–Page layout / orientation
XAML
![Page 41: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/41.jpg)
• Windows.UI.Xaml.Controls contains Windows 8 controls• Microsoft.Phone.Controls and Microsoft.Phone.Shell contain WP8
controls• System.Windows.Controls contains Windows 8 controls and some shared
controls• Some controls are present on both platforms but in different namespaces
• Example: Windows.UI.Xaml.Controls.Canvas (Win8), System.Windows.Controls.Canvas (WP8)
XAML Namespaces and Controls
![Page 42: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/42.jpg)
Different Controls
![Page 43: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/43.jpg)
Different Controls
![Page 44: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/44.jpg)
Different Controls
![Page 45: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/45.jpg)
Different Form Factors Require Different UX
![Page 46: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/46.jpg)
Different Form Factors Require Different UX
![Page 47: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/47.jpg)
Different Form Factors Require Different UX
![Page 48: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/48.jpg)
Translating UX
![Page 49: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/49.jpg)
Translating UX – Details View
![Page 50: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/50.jpg)
Different Form Factors Require Different UX
![Page 51: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/51.jpg)
• Tiles are an entry point for Windows 8 and Windows Phone 8 apps–One primary tile that launches
the app normally–Also, secondary tiles can be
pinned to the Start screen• Create a “Deep link” that takes
the user to a specific page in the app
• Both platforms support live tiles, in which content is periodically updated
Tiles
Tiles on Windows 8 Tiles on Windows Phone 8
![Page 52: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/52.jpg)
var tile = new SecondaryTile(item.UniqueId, // Tile IDitem.ShortTitle, // Tile short nameitem.Title, // Tile display nameitem.UniqueId, // Activation argumentTileOptions.ShowNameOnLogo, // Tile optionsuri // Tile logo URI
);
await tile.RequestCreateAsync();
CycleTileData tileData = new CycleTileData()
{
Title = group.Title,
SmallBackgroundImage = new
Uri(group.GetImageUri(),
UriKind.RelativeOrAbsolute),
CycleImages = list
};
ShellTile.Create(new Uri(navDataSource,
UriKind.Relative), tileData, true);
Both platforms support tiles, but the APIs are completely different
Tiles (cont.)
Windows 8 TilesWindows Phone 8 Tiles
![Page 53: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/53.jpg)
• With webcams and cell phones, capturing photos and videos is prolific–Both Windows 8 and Windows Phone 8
have media capture APIs
Media Capture
Windows Phone 8 camera app
Windows 8 camera app
![Page 54: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/54.jpg)
Media Capture (Windows 8)• Windows uses CameraCaptureUI to capture images and videos
• Windows.Media.Capture namespace
• Enable Webcam and Microphone in the manifest
private async void OnCapturePhoto(object sender, TappedRoutedEventArgs e)
{
var camera = new CameraCaptureUI();
var file = await camera.CaptureFileAsync(CameraCaptureUIMode.Photo);
if (file != null)
{
// Do something with the result...
}
}
![Page 55: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/55.jpg)
Media Capture (Windows Phone 8)Windows Phone uses CameraCaptureTask take photos
Microsoft.Phone.Tasks namespace
Enable ID_CAP_ISV_CAMERA and ID_CAP_MICROPHONE in the manifest
Recording video is more complicated, but possible
private readonly CameraCaptureTask cameraTask;public Init() {
cameraTask = new CameraCaptureTask();cameraTask.Completed += PhotoCaptured;
}public void TakePhoto() {
cameraTask.Show();}private async void PhotoCaptured (object sender, PhotoResult result) {
await Task.Run(() => {// Do something with the result...
});}
![Page 56: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/56.jpg)
App Bar
The app bar is a good place to put frequently used commands
The Windows 8 app bar has few technical limitations
Certification standards may limit it
Phone has limited screen space
The app bar cannot take up too much space
Put additional commands on the menu
A Windows Phone 8 app bar with the menu expanded
A Windows 8 app bar with three buttons
![Page 57: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/57.jpg)
App Bar
Windows Phone 8 App Bar
• One app bar at the bottom of the page
• Only four items allowed
• Put additional items on the menu
• No grouping
• ApplicationBar control inside
PhoneApplicationPage.ApplicationBar
• Set Mode to Default to show the app bar
when the page loads
• Set IsMenuEnabled to enable the menu
Windows 8 App Bar
• Two app bars: one bottom and one top
• Behaves like any container
• No menu
• Can group items in nested containers
• AppBar control inside Page.BottomAppBar or
Page.TopAppBar
• Set IsOpen to true to show the app bar when
the page loads
• Set IsSticky to true to force an app bar to
always remain open
![Page 58: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/58.jpg)
App Bar (Windows 8)
<Page.BottomAppBar IsOpen="True"><AppBar x:Name="bottomAppBar" Opened="AppBar_Opened" Padding="10,0,10,0">
<Grid><StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Button Style="{StaticResource EditAppBarButtonStyle}" Click="Edit_Click"/><Button Style="{StaticResource RemoveAppBarButtonStyle}" Click="Remove_Click"/><Button Style="{StaticResource AddAppBarButtonStyle}" Click="Add_Click"/>
</StackPanel><StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Style="{StaticResource RefreshAppBarButtonStyle}" Click="Refresh_Click"/>
<Button Style="{StaticResource HelpAppBarButtonStyle}" Click="Help_Click"/></StackPanel>
</Grid></AppBar>
</Page.BottomAppBar>
![Page 59: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/59.jpg)
App Bar (Windows Phone 8)
<phone:PhoneApplicationPage.ApplicationBar><shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Default" Opacity="1.0">
<shell:ApplicationBarIconButton x:Name="btnTakePicture"IconUri="/Assets/Icons/camera.png" Click="btnTakePicture_Click" Text="Take Picture"/>
<shell:ApplicationBarIconButton x:Name="btnShareTask" IconUri="/Assets/Icons/share.png"Click="btnShareShareTask_Click" Text="Share Image"/>
<shell:ApplicationBarIconButton x:Name="btnStartCooking"IconUri="/Assets/Icons/alarm.png" Click="btnStartCooking_Click" Text="Start Cooking"/>
<shell:ApplicationBarIconButton x:Name="btnPinToStart" IconUri="/Assets/Icons/like.png"Click="btnPinToStart_Click" Text="Pin To Start"/>
</shell:ApplicationBar></phone:PhoneApplicationPage.ApplicationBar>
![Page 60: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/60.jpg)
Launching Built-In AppsURI scheme Description
http:[URL] Launches the web browser and navigates to URL
mailto:[email address]Launches the email app and creates a new message.Note that the email is not sent until the user taps send.
ms-settings-accounts: Launches the Account Settings app.
ms-settings-airplanemode: Launches the Airplane Mode Settings app.
ms-settings-bluetooth: Launches the Bluetooth Settings app.
ms-settings-cellular: Launches the Cellular Settings app.
ms-settings-emailandaccounts: Launches the email and accounts settings app.
ms-settings-location: Launches the Location Settings app.
ms-settings-lock: Launches the Lock Screen settings app.
ms-settings-wifi: Launches the Wi-Fi Settings app.
![Page 61: Presentation - Windows App Development - II - Mr. Chandan Gupta](https://reader034.vdocuments.us/reader034/viewer/2022051617/55a4ed2a1a28ab88348b45c4/html5/thumbnails/61.jpg)
Thank You..