Skip to content

Instantly share code, notes, and snippets.

@mbcrump
Last active September 9, 2016 21:23
Show Gist options
  • Save mbcrump/6f0f844bf7cae766ddebe8759fddaa99 to your computer and use it in GitHub Desktop.
Save mbcrump/6f0f844bf7cae766ddebe8759fddaa99 to your computer and use it in GitHub Desktop.

##Mobilize.NET SL Bridge

  private void ApplicationBarMenuItem_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
  {
     var aboutprompt = new WindowsPhoneUWP.UpgradeHelpers.AboutPrompt();
     var aboutPromptItem = new WindowsPhoneUWP.UpgradeHelpers.AboutPromptItem() { AuthorName = "Microsoft", Role = "PM", EmailAddress = "[email protected]", WebSiteUrl = "http://michaelcrump.net/" };
     aboutprompt.Show(aboutPromptItem);
  }

##Desktop App Converter

cd "C:\Presentations\Bringing your code to Windows\2.Desktop Bridge\Demo\CentennialPackage"

add-appxpackage –register AppxManifest.xml

##Hosted Web Apps

http://flightarcade.com/

http://codepen.io/mbcrump/pen/kXqyNx?editors=101

Switch to the content URIs

http://codepen.io/mbcrump/pen/kXqyNx?editors=101

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);
      });

  }

##Windows Bridge for iOS

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment