##Mobilize.NET SL Bridge
Mapping can be found on GitHub
-
Open WeatherForecastSample and show it running inside the 8.1 Emulator
-
Right-click the solution and select "Convert to UWP". Make note that it is using the Coding4Fun toolkit.
-
Open the output and let them know there is a MigrationLog and UpgradeReport in the UWP folder that they can refer back to.
-
Switch to x64 and local machine
-
Run the app and it will show that there are 4 errors on the "Show" method.
-
Comment out the last show line and add the following:
private void ApplicationBarMenuItem_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { var aboutprompt = new WindowsPhoneUWP.UpgradeHelpers.AboutPrompt(); var aboutPromptItem = new WindowsPhoneUWP.UpgradeHelpers.AboutPromptItem() { AuthorName = "Michael Crump", Role = "PMM", EmailAddress = "[email protected]", WebSiteUrl = "http://microsoft.com/" }; aboutprompt.Show(aboutPromptItem); }
-
Build again and it will show another error.
Switch to the MainPage.xaml and remove the reference to the Coding4Fun toolkit
As well as this line :
<Controls:MemoryCounter></Controls:MemoryCounter>
- The app should now run and make sure you click on the About button.
##Desktop App Converter
Manual Packaging Scenario. - You may have an application that doesn't have an installer (such as InstallShield). You may copy your app on a USB key and distribute it that way. Or you may even use xcopy.exe to distribute your app.
-
Run the Visual Studio project and hit a breakpoint on a UWP Feature.
-
Copy the bin/Debug folder over to C:\Win32App
-
Copy AppxManifest to bin/Debug folder
-
Copy Assets Folder that has Images
-
Examine the Mapping file
-
Examine the Certs folder
-
Run the following from VS Command Prompt as Admin
Makeappx Pack /F C:\Win32App\MyHealth.Client.Mapping.txt /P C:\Win32App\myapp.appx
Certutil -AddStore Root C:\Win32App\Certs\DesktopBridgeIgnite.cer
signtool.exe sign -f C:\Win32App\Certs\DesktopBridgeIgnite.pfx -fd SHA256 -v C:\Win32App\myapp.appx
-
Install the app
##Hosted Web Apps
- Open Visual Studio and create a Hosted Web App - > Under JavaScript -> Windows
###Demo 1
https://seksenov.github.io/ContosoTravel/
Add it to content URI's and allow it
Hit Func and F12 (or CTRL F12)
Enter "Enjoy your trip" in the search box and replace the text to "Have fun in".
###Demo 2
Open Visual Studio and create a Hosted Web App - > Under JavaScript -> Windows
-
Point the URL to http://codepen.io/mbcrump/pen/kXqyNx?editors=101
-
Switch to the content URIs
http://*.codepen.io/
Set access to ALL
-
Add this code to the app:
function cameraCapture() { var FileToSave; var cam = new Windows.Media.Capture.CameraCaptureUI(); var folder = Windows.Storage.KnownFolders.picturesLibrary;
cam.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.photo).then(function(file) { if (file) {
FileToSave = file; folder.createFileAsync("photo.jpg", Windows.Storage.CreationCollisionOption.replaceExisting) .then(function(file) { FileToSave.copyAndReplaceAsync(file); }); } else { }
}, function(err) { displayError(err); });
}
-
Run the app
The JS code was able to display an interactive Toast on Windows directly calling the native APIs and by hooking into the activation event it will be able to capture the response as well.
##Windows Bridge for iOS
-
Download WinObjC from GitHub
-
Download Calculator code
Read the blog post here : https://blogs.windows.com/buildingapps/2016/02/18/using-the-ios-bridge-to-bring-storyboards-and-auto-layout-to-windows-10/
-
Open cmd prompt and navigate to
cd C:\Presentations\Bringing your code to Windows\4.iOS Bridge\Calculator\Calculator
-
Run
"C:\Presentations\Bringing your code to Windows\4.iOS Bridge\winobjc\bin\vsimporter.exe"