SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Cross Platform Development with xamarin 
(ANDROID, WINDOWS PHONE , WINDOWS STORE APP) 
Prepared by 
CHEAH ENG SOON 
DEVELOPER 
CHEAH ENG SOON 17/9/2014
Agenda 
•Register and Setup Xamarin 
•Setup Android Library 
•Setup Android Emulator 
•Port Android to Windows Phone App 
•Port Android to Windows Store App 
•References 
CHEAH ENG SOON 17/9/2014
REGISTER & SETUP XAMARIN 
CHEAH ENG SOON 17/9/2014
Register and SETUP XAmarin 
1.Register XamarinAccount 
https://store.xamarin.com/account/register 
2. Download and Setup Xamarin 
http://xamarin.com/download 
CHEAH ENG SOON 17/9/2014
ReGISTERAND SETUP XAMARIN 
3. Login With XamarinAccount 
TOOLS > XamarinAccount 
CHEAH ENG SOON 17/9/2014
SETUP ANDROID LIBRARY 
CHEAH ENG SOON 17/9/2014
SETUP Android Library 
1. Click “Start Android SDK Manager” 
CHEAH ENG SOON 17/9/2014
2. Install All The Library 
[ / ] Select all library and install 
•Keep Calm and Wait the library install complete. 
CHEAH ENG SOON 17/9/2014
KEEP CALM & WAIT INSTALL COMPLETELY 
CHEAH ENG SOON 17/9/2014
SETUP ANDROID EMULATOR 
CHEAH ENG SOON 17/9/2014
SETUP ANDROID EMULATOR 
Click “Open Android Emulator Manager” > “Create…” 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
Setup the Android Emulator as Below 
CHEAH ENG SOON 17/9/2014
Port Android to Windows Phone 
1.Create NEW PROJECT > Select “Windows Desktop” > Select “Class Library” > Name “Youtube” 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
DOWNLOAD 
XamarinWorkshop Demo 
http://1drv.ms/1qVsGar 
CHEAH ENG SOON 17/9/2014
IMPORT ANDROID PROJECT 
CHEAH ENG SOON 17/9/2014
IMPORT ANDROID PROJECT 
2. Delete the “Class1.cs” and create the “YoutubeSearcher.cs” or Import the file “YoutubeSearcher.cs” 
Right click “Youtube(Portable)” > Add > Existing Items 
3. Import the “YouTube.Android” Project 
Right click “Solution ‘Youtube’ “ > “Add Existing Project” 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
4. Right click “YouTube.Android” >Add > Existing Item > Select “ YouTubeSearcher.cs” in “Youtube(Portable)” > Add As Link 
CHEAH ENG SOON 17/9/2014
•You will seen a “YouTubeSearch.cs” . 
It means share the class 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
PORT ANDROID TO WINDOWS PHONE CHEAH ENG SOON 17/9/2014
Port AnDroidTo Windows Phone App 
1.Right Click “Solution ‘YouTube’” > Add > New Project 
2.Select “Windows Phone Apps” > 
Select “Blank App (Windows Phone Silverlight” 
> Name “YouTube.WP8” 
CHEAH ENG SOON 17/9/2014
3. Select “Windows Phone 8.1” 
4. Right Click “YouTube.WP8” > Add > 
“Existing Item” 
5. Select “ YouTubeSearcher.cs” in “Youtube(Portable)” 
> Add As Link 
CHEAH ENG SOON 17/9/2014
6. Select “YouTube.WP8” > Right Click “Add” > Select “New Item” > Select “ Windows Phone Portrait Page” > Name “PlayVideo.xaml” 
7. Go “MainPage.xaml” & “PlayVideo.xaml” 
CHEAH ENG SOON 17/9/2014
MainPage.xaml 
<StackPanelOrientation="Horizontal" Grid.Row="0"> 
<TextBlockText="YouTube:" VerticalAlignment="Center" FontSize="20" Margin="10,20,0,10"></TextBlock> 
<TextBoxTextWrapping="Wrap" x:Name="txtKeyword" Text="" VerticalAlignment="Center" FontSize="20" Width="240" Margin="0,10,0,0"/> 
<Button Content="Search" VerticalAlignment="Center" x:Name="btnSearch" HorizontalAlignment="Stretch" FontSize="20" Margin="0,20,0,10" Height="72" Width="134" Click="btnSearch_Click"/> 
</StackPanel> 
CHEAH ENG SOON 17/9/2014
<phone:LongListSelector 
x:Name="VideoList" Grid.Row="1" Height="640" 
ScrollViewer.VerticalScrollBarVisibility="Auto" 
SelectionChanged="VideoList_SelectionChanged"> 
<phone:LongListSelector.ItemTemplate> 
<DataTemplate> 
<StackPanelOrientation="Horizontal"> 
<Image Width="100" Height="100" Source="{Binding Thumbnail}" /> 
<StackPanelOrientation="Vertical" Margin="5,0"> 
<TextBlockText="{Binding Title}" TextWrapping="Wrap" /> 
<TextBlockText="{Binding PubDate}" Foreground="Gray"/> 
</StackPanel> 
</StackPanel> 
</DataTemplate> 
</phone:LongListSelector.ItemTemplate> 
</phone:LongListSelector> 
CHEAH ENG SOON 17/9/2014
MainPage.CS 
private void btnSearch_Click(object sender, RoutedEventArgse) 
{ 
varsearcher = new YouTubeSearcher(); 
searcher.list= this.VideoList; 
searcher.SearchForWP8(this.txtKeyword.Text); 
} 
CHEAH ENG SOON 17/9/2014
private void VideoList_SelectionChanged(object sender, SelectionChangedEventArgse) 
{ 
if (VideoList.SelectedItem!= null) 
{ 
vartitle = (VideoList.SelectedItemas Entry).Title; 
varlink = (VideoList.SelectedItemas Entry).Link; 
NavigationService.Navigate(new Uri(string.Format("/PlayVideo.xaml?Title={0}&Link={1}", title, link), UriKind.Relative)); 
} 
} 
CHEAH ENG SOON 17/9/2014
PlayVideo.xaml 
<Grid x:Name="LayoutRoot" Background="Transparent"> 
<StackPanelOrientation="Vertical"> 
<StackPanelOrientation="Horizontal"> 
<TextBlockx:Name="txtTitle" FontSize="20" HorizontalAlignment="Center" Margin="20,40,0,20"></TextBlock> 
</StackPanel> 
<phone:WebBrowserx:Name="webview" Grid.Row="1" Width="480" Height="320" Margin="0,0,0,0" HorizontalAlignment="Center"></phone:WebBrowser> 
</StackPanel> 
</Grid> 
CHEAH ENG SOON 17/9/2014
PlayVideo.cs 
protected override void OnNavigatedTo(NavigationEventArgse) 
{ 
base.OnNavigatedTo(e); 
string title, link; 
NavigationContext.QueryString.TryGetValue("Title", out title); 
NavigationContext.QueryString.TryGetValue("Link", out link); 
this.txtTitle.Text= title; 
this.webview.IsScriptEnabled= true; 
this.webview.Navigate(new Uri(link)); 
} 
CHEAH ENG SOON 17/9/2014
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgse) 
{ 
base.OnBackKeyPress(e); 
this.webview.NavigateToString(""); 
} 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
PORT ANDROID TO WINDOWS STORE APP 
CHEAH ENG SOON 17/9/2014
PORT ANDROID TO WINDOWS STORE 
1.Right Click “Solution ‘YouTube’” > Add > New Project 
2.Select “Windows APPS” >Select “BLANK App (WINDOWS)”> Name “YouTube.RT” 
3.RIGHT Click “YouTube.RT” > Add >“Existing Item” 
4.Select “ YouTubeSearcher.cs” in “Youtube(Portable)” > Add As Link 
5.Add “Playvideo.xaml” 
CHEAH ENG SOON 17/9/2014
MainPage.xaml 
<Grid.RowDefinitions> 
<RowDefinitionHeight="Auto" /> 
<RowDefinitionHeight="Auto" /> 
</Grid.RowDefinitions> 
<StackPanelOrientation="Horizontal" Grid.Row="0"> 
<TextBlockText="YouTube Search:" FontSize="20" Margin="10,20,0,0"></TextBlock> 
<TextBoxTextWrapping="Wrap" VerticalAlignment="Center" FontSize="20" x:Name="txtKeyword" Text="" Height="40" Width="364" Margin="10,10,0,10"/> 
<Button Content="Search" x:Name="btnSearch" HorizontalAlignment="Stretch" FontSize="20" Margin="10,0,0,10" VerticalAlignment="Bottom" Height="42" Width="109" Click="btnSearch_Click"/> 
</StackPanel> 
CHEAH ENG SOON 17/9/2014
<ListViewx:Name="VideoList" Grid.Row="1" Height="640" 
ScrollViewer.VerticalScrollBarVisibility="Auto" 
SelectionMode="None" 
IsItemClickEnabled="True" 
ItemClick="VideoList_ItemClick"> 
<ListView.ItemTemplate> 
<DataTemplate> 
<StackPanelOrientation="Horizontal"> 
<Image Width="75" Height="75" Source="{Binding Thumbnail}" /> 
<StackPanelOrientation="Vertical" Margin="5,0"> 
<TextBlockText="{Binding Title}" TextWrapping="Wrap" /> 
<TextBlockText="{Binding Link}" TextWrapping="Wrap" /> 
<TextBlockText="{Binding PubDate}" Foreground="Gray"/> 
</StackPanel> 
</StackPanel> 
</DataTemplate> 
</ListView.ItemTemplate> 
</ListView> 
CHEAH ENG SOON 17/9/2014
MainPage.cs 
List<Entry> SearchResult; 
public MainPage() 
{ 
this.InitializeComponent(); 
this.NavigationCacheMode= Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled; 
} 
CHEAH ENG SOON 17/9/2014
private void btnSearch_Click(object sender, RoutedEventArgse) 
{ 
YouTubeSearchersearcher = new YouTubeSearcher(); 
SearchResult= searcher.Search(this.txtKeyword.Text); 
this.VideoList.ItemsSource= SearchResult; 
} 
private void VideoList_ItemClick(object sender, ItemClickEventArgse) 
{ 
Frame.Navigate(typeof(PlayVideo), e.ClickedItemas Entry); 
} 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
PlayVideo.xaml(BLANK PAGE) 
<StackPanelOrientation="Vertical"> 
<StackPanelOrientation="Horizontal"> 
<Button HorizontalAlignment="Left" Tapped="OnBackButtonTapped"/> 
<TextBlockGrid.Row="0" x:Name="txtTitle" FontSize="20" HorizontalAlignment="Center" Margin="20,40,0,20"></TextBlock> 
</StackPanel> 
<WebViewx:Name="webview" Grid.Row="1" Width="480" Height="320" Margin="0,0,0,0" HorizontalAlignment="Center" ></WebView> 
</StackPanel> 
CHEAH ENG SOON 17/9/2014
protected override void OnNavigatedTo(NavigationEventArgse) 
{ 
varp = (Entry)e.Parameter; 
this.txtTitle.Text= p.Title; 
this.webview.Navigate(new Uri(p.Link)); 
} 
private void OnBackButtonTapped(object sender, TappedRoutedEventArgse) 
{ 
if (Frame.CanGoBack) 
{ 
this.webview.NavigateToString(""); 
Frame.GoBack(); 
} 
} 
CHEAH ENG SOON 17/9/2014
CHEAH ENG SOON 17/9/2014
Full SOURCE CODE 
XamarinWorkshop Demo 
http://1drv.ms/1qVsGar 
CHEAH ENG SOON 17/9/2014
References 
Cross Platform Development With Xamarin 
http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Cross-Platform- Development-With-Xamarin 
Documentation 
http://developer.xamarin.com/guides 
Contact 
cheahengsoon@live.com.my 
cheahengsoon.weebly.com 
CHEAH ENG SOON 17/9/2014

Weitere ähnliche Inhalte

Andere mochten auch

What the Watchdogs Are Watching
What the Watchdogs Are WatchingWhat the Watchdogs Are Watching
What the Watchdogs Are WatchingTate Tryon CPAs
 
Power point baru
Power point baruPower point baru
Power point baruainiazza
 
Trakya universitesi-anlatimi
Trakya universitesi-anlatimiTrakya universitesi-anlatimi
Trakya universitesi-anlatimizeynep_zyn85
 
พรบ.คอมพิวเตอร์
พรบ.คอมพิวเตอร์พรบ.คอมพิวเตอร์
พรบ.คอมพิวเตอร์Angkana Potha
 
Sommerkampanje for Nærbutikken
Sommerkampanje for NærbutikkenSommerkampanje for Nærbutikken
Sommerkampanje for Nærbutikkenlisembj
 
best physical theraphist in Houston
best physical theraphist in Houstonbest physical theraphist in Houston
best physical theraphist in Houstonnicholson557
 
Adafruit raspberry-pi-lesson-9-controlling-a-dc-motor
Adafruit raspberry-pi-lesson-9-controlling-a-dc-motorAdafruit raspberry-pi-lesson-9-controlling-a-dc-motor
Adafruit raspberry-pi-lesson-9-controlling-a-dc-motorStefan Oprea
 
Walking Festival Kingston upon Thames 2016 Programme
Walking Festival Kingston upon Thames 2016 ProgrammeWalking Festival Kingston upon Thames 2016 Programme
Walking Festival Kingston upon Thames 2016 ProgrammeKingstonVA
 
MAD Global activities
MAD Global activitiesMAD Global activities
MAD Global activitiesPedro Aguirre
 

Andere mochten auch (16)

What the Watchdogs Are Watching
What the Watchdogs Are WatchingWhat the Watchdogs Are Watching
What the Watchdogs Are Watching
 
Power point baru
Power point baruPower point baru
Power point baru
 
Trakya universitesi-anlatimi
Trakya universitesi-anlatimiTrakya universitesi-anlatimi
Trakya universitesi-anlatimi
 
BF+H Store Brands '12
BF+H Store Brands '12BF+H Store Brands '12
BF+H Store Brands '12
 
พรบ.คอมพิวเตอร์
พรบ.คอมพิวเตอร์พรบ.คอมพิวเตอร์
พรบ.คอมพิวเตอร์
 
Scoop módulo 4 aiskel andrade
Scoop módulo 4 aiskel andradeScoop módulo 4 aiskel andrade
Scoop módulo 4 aiskel andrade
 
Teerut Petsungwan_Resume
Teerut Petsungwan_ResumeTeerut Petsungwan_Resume
Teerut Petsungwan_Resume
 
Virgin Media Profile
Virgin Media ProfileVirgin Media Profile
Virgin Media Profile
 
Get to know me!
Get to know me!Get to know me!
Get to know me!
 
Sommerkampanje for Nærbutikken
Sommerkampanje for NærbutikkenSommerkampanje for Nærbutikken
Sommerkampanje for Nærbutikken
 
best physical theraphist in Houston
best physical theraphist in Houstonbest physical theraphist in Houston
best physical theraphist in Houston
 
Adafruit raspberry-pi-lesson-9-controlling-a-dc-motor
Adafruit raspberry-pi-lesson-9-controlling-a-dc-motorAdafruit raspberry-pi-lesson-9-controlling-a-dc-motor
Adafruit raspberry-pi-lesson-9-controlling-a-dc-motor
 
Walking Festival Kingston upon Thames 2016 Programme
Walking Festival Kingston upon Thames 2016 ProgrammeWalking Festival Kingston upon Thames 2016 Programme
Walking Festival Kingston upon Thames 2016 Programme
 
MAD Global activities
MAD Global activitiesMAD Global activities
MAD Global activities
 
Slide bhs
Slide bhsSlide bhs
Slide bhs
 
Weight Loss Tips
Weight Loss TipsWeight Loss Tips
Weight Loss Tips
 

Ähnlich wie Port Android To Windows App

Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flexdanielwanja
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011Patrick Lauke
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5Tien Tran Le Duy
 
Html5 - short intro
Html5 - short introHtml5 - short intro
Html5 - short introjeiseman
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformRobert Nyman
 
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, CroatiaLeave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, CroatiaRobert Nyman
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Davide Cerbo
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming Enguest9bcef2f
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsRomain Guy
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발영욱 김
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5Kevin DeRudder
 
Sperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copySperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copySalvatore Iaconesi
 
Building windows8 modern app for sp2013
Building windows8 modern app for sp2013Building windows8 modern app for sp2013
Building windows8 modern app for sp2013Vinh Nguyen
 
Infinum Android Talks #16 - App Links by Ana Baotic
Infinum Android Talks #16 - App Links by Ana BaoticInfinum Android Talks #16 - App Links by Ana Baotic
Infinum Android Talks #16 - App Links by Ana BaoticInfinum
 
.Net Dev Summit 2020 - What's new and next for Xamarin developers
.Net Dev Summit 2020 - What's new and next for Xamarin developers.Net Dev Summit 2020 - What's new and next for Xamarin developers
.Net Dev Summit 2020 - What's new and next for Xamarin developersJames Montemagno
 

Ähnlich wie Port Android To Windows App (20)

Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flex
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011Adaptive Layouts - standards>next London 28.05.2011
Adaptive Layouts - standards>next London 28.05.2011
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5
 
Html5 - short intro
Html5 - short introHtml5 - short intro
Html5 - short intro
 
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the PlatformJavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
 
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, CroatiaLeave No One Behind with HTML5 - FFWD.PRO, Croatia
Leave No One Behind with HTML5 - FFWD.PRO, Croatia
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
Hybrid app
Hybrid appHybrid app
Hybrid app
 
HTML5 Essentials
HTML5 EssentialsHTML5 Essentials
HTML5 Essentials
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
Sperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copySperimentazioni lezione6 from_designtoapplication copy
Sperimentazioni lezione6 from_designtoapplication copy
 
Building windows8 modern app for sp2013
Building windows8 modern app for sp2013Building windows8 modern app for sp2013
Building windows8 modern app for sp2013
 
Infinum Android Talks #16 - App Links by Ana Baotic
Infinum Android Talks #16 - App Links by Ana BaoticInfinum Android Talks #16 - App Links by Ana Baotic
Infinum Android Talks #16 - App Links by Ana Baotic
 
The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
.Net Dev Summit 2020 - What's new and next for Xamarin developers
.Net Dev Summit 2020 - What's new and next for Xamarin developers.Net Dev Summit 2020 - What's new and next for Xamarin developers
.Net Dev Summit 2020 - What's new and next for Xamarin developers
 

Mehr von Cheah Eng Soon

Microsoft Defender for Endpoint
Microsoft Defender for EndpointMicrosoft Defender for Endpoint
Microsoft Defender for EndpointCheah Eng Soon
 
Azure Active Directory - Secure and Govern
Azure Active Directory - Secure and GovernAzure Active Directory - Secure and Govern
Azure Active Directory - Secure and GovernCheah Eng Soon
 
MEM for OnPrem Environments
MEM for OnPrem EnvironmentsMEM for OnPrem Environments
MEM for OnPrem EnvironmentsCheah Eng Soon
 
Microsoft Threat Protection Automated Incident Response
Microsoft Threat Protection Automated Incident Response Microsoft Threat Protection Automated Incident Response
Microsoft Threat Protection Automated Incident Response Cheah Eng Soon
 
Azure Penetration Testing
Azure Penetration TestingAzure Penetration Testing
Azure Penetration TestingCheah Eng Soon
 
Azure Penetration Testing
Azure Penetration TestingAzure Penetration Testing
Azure Penetration TestingCheah Eng Soon
 
Penetration Testing Azure for Ethical Hackers
Penetration Testing Azure for Ethical HackersPenetration Testing Azure for Ethical Hackers
Penetration Testing Azure for Ethical HackersCheah Eng Soon
 
Microsoft Threat Protection Automated Incident Response Demo
Microsoft Threat Protection Automated Incident Response DemoMicrosoft Threat Protection Automated Incident Response Demo
Microsoft Threat Protection Automated Incident Response DemoCheah Eng Soon
 
Microsoft Secure Score Demo
Microsoft Secure Score DemoMicrosoft Secure Score Demo
Microsoft Secure Score DemoCheah Eng Soon
 
Microsoft Cloud App Security Demo
Microsoft Cloud App Security DemoMicrosoft Cloud App Security Demo
Microsoft Cloud App Security DemoCheah Eng Soon
 
M365 Attack Simulation Demo
M365 Attack Simulation DemoM365 Attack Simulation Demo
M365 Attack Simulation DemoCheah Eng Soon
 
Azure Active Directory - External Identities Demo
Azure Active Directory - External Identities Demo Azure Active Directory - External Identities Demo
Azure Active Directory - External Identities Demo Cheah Eng Soon
 
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
Azure Weekend 2020 Build Malaysia Bus Uncle ChatbotAzure Weekend 2020 Build Malaysia Bus Uncle Chatbot
Azure Weekend 2020 Build Malaysia Bus Uncle ChatbotCheah Eng Soon
 
Microsoft Azure的20大常见安全漏洞与配置错误
Microsoft Azure的20大常见安全漏洞与配置错误Microsoft Azure的20大常见安全漏洞与配置错误
Microsoft Azure的20大常见安全漏洞与配置错误Cheah Eng Soon
 
20 common security vulnerabilities and misconfiguration in Azure
20 common security vulnerabilities and misconfiguration in Azure20 common security vulnerabilities and misconfiguration in Azure
20 common security vulnerabilities and misconfiguration in AzureCheah Eng Soon
 
Integrate Microsoft Graph with Azure Bot Services
Integrate Microsoft Graph with Azure Bot ServicesIntegrate Microsoft Graph with Azure Bot Services
Integrate Microsoft Graph with Azure Bot ServicesCheah Eng Soon
 
Azure Sentinel with Office 365
Azure Sentinel with Office 365Azure Sentinel with Office 365
Azure Sentinel with Office 365Cheah Eng Soon
 

Mehr von Cheah Eng Soon (20)

Microsoft Defender for Endpoint
Microsoft Defender for EndpointMicrosoft Defender for Endpoint
Microsoft Defender for Endpoint
 
Azure Active Directory - Secure and Govern
Azure Active Directory - Secure and GovernAzure Active Directory - Secure and Govern
Azure Active Directory - Secure and Govern
 
Microsoft Zero Trust
Microsoft Zero TrustMicrosoft Zero Trust
Microsoft Zero Trust
 
MEM for OnPrem Environments
MEM for OnPrem EnvironmentsMEM for OnPrem Environments
MEM for OnPrem Environments
 
Microsoft Threat Protection Automated Incident Response
Microsoft Threat Protection Automated Incident Response Microsoft Threat Protection Automated Incident Response
Microsoft Threat Protection Automated Incident Response
 
Azure Penetration Testing
Azure Penetration TestingAzure Penetration Testing
Azure Penetration Testing
 
Azure Penetration Testing
Azure Penetration TestingAzure Penetration Testing
Azure Penetration Testing
 
Penetration Testing Azure for Ethical Hackers
Penetration Testing Azure for Ethical HackersPenetration Testing Azure for Ethical Hackers
Penetration Testing Azure for Ethical Hackers
 
Microsoft Threat Protection Automated Incident Response Demo
Microsoft Threat Protection Automated Incident Response DemoMicrosoft Threat Protection Automated Incident Response Demo
Microsoft Threat Protection Automated Incident Response Demo
 
Microsoft Secure Score Demo
Microsoft Secure Score DemoMicrosoft Secure Score Demo
Microsoft Secure Score Demo
 
Microsoft Cloud App Security Demo
Microsoft Cloud App Security DemoMicrosoft Cloud App Security Demo
Microsoft Cloud App Security Demo
 
M365 Attack Simulation Demo
M365 Attack Simulation DemoM365 Attack Simulation Demo
M365 Attack Simulation Demo
 
Cloud Security Demo
Cloud Security DemoCloud Security Demo
Cloud Security Demo
 
Azure Active Directory - External Identities Demo
Azure Active Directory - External Identities Demo Azure Active Directory - External Identities Demo
Azure Active Directory - External Identities Demo
 
Azure WAF
Azure WAFAzure WAF
Azure WAF
 
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
Azure Weekend 2020 Build Malaysia Bus Uncle ChatbotAzure Weekend 2020 Build Malaysia Bus Uncle Chatbot
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
 
Microsoft Azure的20大常见安全漏洞与配置错误
Microsoft Azure的20大常见安全漏洞与配置错误Microsoft Azure的20大常见安全漏洞与配置错误
Microsoft Azure的20大常见安全漏洞与配置错误
 
20 common security vulnerabilities and misconfiguration in Azure
20 common security vulnerabilities and misconfiguration in Azure20 common security vulnerabilities and misconfiguration in Azure
20 common security vulnerabilities and misconfiguration in Azure
 
Integrate Microsoft Graph with Azure Bot Services
Integrate Microsoft Graph with Azure Bot ServicesIntegrate Microsoft Graph with Azure Bot Services
Integrate Microsoft Graph with Azure Bot Services
 
Azure Sentinel with Office 365
Azure Sentinel with Office 365Azure Sentinel with Office 365
Azure Sentinel with Office 365
 

Kürzlich hochgeladen

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Kürzlich hochgeladen (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Port Android To Windows App

  • 1. Cross Platform Development with xamarin (ANDROID, WINDOWS PHONE , WINDOWS STORE APP) Prepared by CHEAH ENG SOON DEVELOPER CHEAH ENG SOON 17/9/2014
  • 2. Agenda •Register and Setup Xamarin •Setup Android Library •Setup Android Emulator •Port Android to Windows Phone App •Port Android to Windows Store App •References CHEAH ENG SOON 17/9/2014
  • 3. REGISTER & SETUP XAMARIN CHEAH ENG SOON 17/9/2014
  • 4. Register and SETUP XAmarin 1.Register XamarinAccount https://store.xamarin.com/account/register 2. Download and Setup Xamarin http://xamarin.com/download CHEAH ENG SOON 17/9/2014
  • 5. ReGISTERAND SETUP XAMARIN 3. Login With XamarinAccount TOOLS > XamarinAccount CHEAH ENG SOON 17/9/2014
  • 6. SETUP ANDROID LIBRARY CHEAH ENG SOON 17/9/2014
  • 7. SETUP Android Library 1. Click “Start Android SDK Manager” CHEAH ENG SOON 17/9/2014
  • 8. 2. Install All The Library [ / ] Select all library and install •Keep Calm and Wait the library install complete. CHEAH ENG SOON 17/9/2014
  • 9. KEEP CALM & WAIT INSTALL COMPLETELY CHEAH ENG SOON 17/9/2014
  • 10. SETUP ANDROID EMULATOR CHEAH ENG SOON 17/9/2014
  • 11. SETUP ANDROID EMULATOR Click “Open Android Emulator Manager” > “Create…” CHEAH ENG SOON 17/9/2014
  • 12. CHEAH ENG SOON 17/9/2014
  • 13. Setup the Android Emulator as Below CHEAH ENG SOON 17/9/2014
  • 14. Port Android to Windows Phone 1.Create NEW PROJECT > Select “Windows Desktop” > Select “Class Library” > Name “Youtube” CHEAH ENG SOON 17/9/2014
  • 15. CHEAH ENG SOON 17/9/2014
  • 16. DOWNLOAD XamarinWorkshop Demo http://1drv.ms/1qVsGar CHEAH ENG SOON 17/9/2014
  • 17. IMPORT ANDROID PROJECT CHEAH ENG SOON 17/9/2014
  • 18. IMPORT ANDROID PROJECT 2. Delete the “Class1.cs” and create the “YoutubeSearcher.cs” or Import the file “YoutubeSearcher.cs” Right click “Youtube(Portable)” > Add > Existing Items 3. Import the “YouTube.Android” Project Right click “Solution ‘Youtube’ “ > “Add Existing Project” CHEAH ENG SOON 17/9/2014
  • 19. CHEAH ENG SOON 17/9/2014
  • 20. 4. Right click “YouTube.Android” >Add > Existing Item > Select “ YouTubeSearcher.cs” in “Youtube(Portable)” > Add As Link CHEAH ENG SOON 17/9/2014
  • 21. •You will seen a “YouTubeSearch.cs” . It means share the class CHEAH ENG SOON 17/9/2014
  • 22. CHEAH ENG SOON 17/9/2014
  • 23. PORT ANDROID TO WINDOWS PHONE CHEAH ENG SOON 17/9/2014
  • 24. Port AnDroidTo Windows Phone App 1.Right Click “Solution ‘YouTube’” > Add > New Project 2.Select “Windows Phone Apps” > Select “Blank App (Windows Phone Silverlight” > Name “YouTube.WP8” CHEAH ENG SOON 17/9/2014
  • 25. 3. Select “Windows Phone 8.1” 4. Right Click “YouTube.WP8” > Add > “Existing Item” 5. Select “ YouTubeSearcher.cs” in “Youtube(Portable)” > Add As Link CHEAH ENG SOON 17/9/2014
  • 26. 6. Select “YouTube.WP8” > Right Click “Add” > Select “New Item” > Select “ Windows Phone Portrait Page” > Name “PlayVideo.xaml” 7. Go “MainPage.xaml” & “PlayVideo.xaml” CHEAH ENG SOON 17/9/2014
  • 27. MainPage.xaml <StackPanelOrientation="Horizontal" Grid.Row="0"> <TextBlockText="YouTube:" VerticalAlignment="Center" FontSize="20" Margin="10,20,0,10"></TextBlock> <TextBoxTextWrapping="Wrap" x:Name="txtKeyword" Text="" VerticalAlignment="Center" FontSize="20" Width="240" Margin="0,10,0,0"/> <Button Content="Search" VerticalAlignment="Center" x:Name="btnSearch" HorizontalAlignment="Stretch" FontSize="20" Margin="0,20,0,10" Height="72" Width="134" Click="btnSearch_Click"/> </StackPanel> CHEAH ENG SOON 17/9/2014
  • 28. <phone:LongListSelector x:Name="VideoList" Grid.Row="1" Height="640" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="VideoList_SelectionChanged"> <phone:LongListSelector.ItemTemplate> <DataTemplate> <StackPanelOrientation="Horizontal"> <Image Width="100" Height="100" Source="{Binding Thumbnail}" /> <StackPanelOrientation="Vertical" Margin="5,0"> <TextBlockText="{Binding Title}" TextWrapping="Wrap" /> <TextBlockText="{Binding PubDate}" Foreground="Gray"/> </StackPanel> </StackPanel> </DataTemplate> </phone:LongListSelector.ItemTemplate> </phone:LongListSelector> CHEAH ENG SOON 17/9/2014
  • 29. MainPage.CS private void btnSearch_Click(object sender, RoutedEventArgse) { varsearcher = new YouTubeSearcher(); searcher.list= this.VideoList; searcher.SearchForWP8(this.txtKeyword.Text); } CHEAH ENG SOON 17/9/2014
  • 30. private void VideoList_SelectionChanged(object sender, SelectionChangedEventArgse) { if (VideoList.SelectedItem!= null) { vartitle = (VideoList.SelectedItemas Entry).Title; varlink = (VideoList.SelectedItemas Entry).Link; NavigationService.Navigate(new Uri(string.Format("/PlayVideo.xaml?Title={0}&Link={1}", title, link), UriKind.Relative)); } } CHEAH ENG SOON 17/9/2014
  • 31. PlayVideo.xaml <Grid x:Name="LayoutRoot" Background="Transparent"> <StackPanelOrientation="Vertical"> <StackPanelOrientation="Horizontal"> <TextBlockx:Name="txtTitle" FontSize="20" HorizontalAlignment="Center" Margin="20,40,0,20"></TextBlock> </StackPanel> <phone:WebBrowserx:Name="webview" Grid.Row="1" Width="480" Height="320" Margin="0,0,0,0" HorizontalAlignment="Center"></phone:WebBrowser> </StackPanel> </Grid> CHEAH ENG SOON 17/9/2014
  • 32. PlayVideo.cs protected override void OnNavigatedTo(NavigationEventArgse) { base.OnNavigatedTo(e); string title, link; NavigationContext.QueryString.TryGetValue("Title", out title); NavigationContext.QueryString.TryGetValue("Link", out link); this.txtTitle.Text= title; this.webview.IsScriptEnabled= true; this.webview.Navigate(new Uri(link)); } CHEAH ENG SOON 17/9/2014
  • 33. protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgse) { base.OnBackKeyPress(e); this.webview.NavigateToString(""); } CHEAH ENG SOON 17/9/2014
  • 34. CHEAH ENG SOON 17/9/2014
  • 35. PORT ANDROID TO WINDOWS STORE APP CHEAH ENG SOON 17/9/2014
  • 36. PORT ANDROID TO WINDOWS STORE 1.Right Click “Solution ‘YouTube’” > Add > New Project 2.Select “Windows APPS” >Select “BLANK App (WINDOWS)”> Name “YouTube.RT” 3.RIGHT Click “YouTube.RT” > Add >“Existing Item” 4.Select “ YouTubeSearcher.cs” in “Youtube(Portable)” > Add As Link 5.Add “Playvideo.xaml” CHEAH ENG SOON 17/9/2014
  • 37. MainPage.xaml <Grid.RowDefinitions> <RowDefinitionHeight="Auto" /> <RowDefinitionHeight="Auto" /> </Grid.RowDefinitions> <StackPanelOrientation="Horizontal" Grid.Row="0"> <TextBlockText="YouTube Search:" FontSize="20" Margin="10,20,0,0"></TextBlock> <TextBoxTextWrapping="Wrap" VerticalAlignment="Center" FontSize="20" x:Name="txtKeyword" Text="" Height="40" Width="364" Margin="10,10,0,10"/> <Button Content="Search" x:Name="btnSearch" HorizontalAlignment="Stretch" FontSize="20" Margin="10,0,0,10" VerticalAlignment="Bottom" Height="42" Width="109" Click="btnSearch_Click"/> </StackPanel> CHEAH ENG SOON 17/9/2014
  • 38. <ListViewx:Name="VideoList" Grid.Row="1" Height="640" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionMode="None" IsItemClickEnabled="True" ItemClick="VideoList_ItemClick"> <ListView.ItemTemplate> <DataTemplate> <StackPanelOrientation="Horizontal"> <Image Width="75" Height="75" Source="{Binding Thumbnail}" /> <StackPanelOrientation="Vertical" Margin="5,0"> <TextBlockText="{Binding Title}" TextWrapping="Wrap" /> <TextBlockText="{Binding Link}" TextWrapping="Wrap" /> <TextBlockText="{Binding PubDate}" Foreground="Gray"/> </StackPanel> </StackPanel> </DataTemplate> </ListView.ItemTemplate> </ListView> CHEAH ENG SOON 17/9/2014
  • 39. MainPage.cs List<Entry> SearchResult; public MainPage() { this.InitializeComponent(); this.NavigationCacheMode= Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled; } CHEAH ENG SOON 17/9/2014
  • 40. private void btnSearch_Click(object sender, RoutedEventArgse) { YouTubeSearchersearcher = new YouTubeSearcher(); SearchResult= searcher.Search(this.txtKeyword.Text); this.VideoList.ItemsSource= SearchResult; } private void VideoList_ItemClick(object sender, ItemClickEventArgse) { Frame.Navigate(typeof(PlayVideo), e.ClickedItemas Entry); } CHEAH ENG SOON 17/9/2014
  • 41. CHEAH ENG SOON 17/9/2014
  • 42. PlayVideo.xaml(BLANK PAGE) <StackPanelOrientation="Vertical"> <StackPanelOrientation="Horizontal"> <Button HorizontalAlignment="Left" Tapped="OnBackButtonTapped"/> <TextBlockGrid.Row="0" x:Name="txtTitle" FontSize="20" HorizontalAlignment="Center" Margin="20,40,0,20"></TextBlock> </StackPanel> <WebViewx:Name="webview" Grid.Row="1" Width="480" Height="320" Margin="0,0,0,0" HorizontalAlignment="Center" ></WebView> </StackPanel> CHEAH ENG SOON 17/9/2014
  • 43. protected override void OnNavigatedTo(NavigationEventArgse) { varp = (Entry)e.Parameter; this.txtTitle.Text= p.Title; this.webview.Navigate(new Uri(p.Link)); } private void OnBackButtonTapped(object sender, TappedRoutedEventArgse) { if (Frame.CanGoBack) { this.webview.NavigateToString(""); Frame.GoBack(); } } CHEAH ENG SOON 17/9/2014
  • 44. CHEAH ENG SOON 17/9/2014
  • 45. Full SOURCE CODE XamarinWorkshop Demo http://1drv.ms/1qVsGar CHEAH ENG SOON 17/9/2014
  • 46. References Cross Platform Development With Xamarin http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Cross-Platform- Development-With-Xamarin Documentation http://developer.xamarin.com/guides Contact cheahengsoon@live.com.my cheahengsoon.weebly.com CHEAH ENG SOON 17/9/2014