Using the MvvmCross PictureChooser plug-in with a Windows Phone 8.1 XAML app

As we're getting closer to the release of Windows 10 for both phones and PCs I figured it's time to migrate some of my apps from WP Silverlight to WP XAML. Most of my apps use MvvmCross, which allows me to use MVVM (and binding) with Xamarin.iOS and Xamarin.Android as well as Windows Phone of course.   One of the plugins I often use in my apps is the PictureChooser plugin. This plugin makes it easy to take a picture or choose a picture from the gallery on all platforms with a couple of lines of code in your ViewModel. Here's a sample ViewModel Code: private readonly IMvxPictureChooserTask _pictureChooserTask;

    private const int MaxPicturePixelDimension = 640;
    private const int PictureQuality = 100;

    public FirstViewModel(IMvxPictureChooserTask pictureChooserTask)
    {
        _pictureChooserTask = pictureChooserTask;
    }

    private byte[] _pictureBytes;
    public byte[] PictureBytes
    {
        g... <a href="/post/2015/01/30/Using-the-MvvmCross-PictureChooser-plug-in-with-a-Windows-Phone-81-XAML-app">[More]</a>

A Quick Tip for UI design in Windows Phone 8

If you’ve worked on WP7 apps, you probably came across the MetroGridHelper from Jeff Wilcox. If not, what this little helper does is add a grid of squares that helps you align controls in your app’s pages. If you’re one of those who ignore the commented sections in newly created pages, you might miss that this feature is now included in the default WP8 project. To use it, all you have to do is uncomment the Image tag at the end of the page

<!--Uncomment to see an alignment grid to help ensure your controls are aligned on common boundaries. The image has a top margin of -32px to account for the System Tray. Set this to 0 (or remove the margin altogether) if the System Tray is hidden. Before shipping remove this XAML and the image itself.--><!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->

Using Text To Speech and Speech Recognition in Windows Phone 8

With Windows Phone 8 Microsoft added an API for speech recognition and synthesis (TTS). The combination of these APIs allows you to create conversations with the user, asking them for input with TTS and listening for their replies. To use this feature you need to add the following capabilities to your app (in the WMAppManifest.xml file) IDCAPSPEECHRECOGNITION IDCAPMICROPHONE IDCAP_NETWORKING (like all speech recognition solutions, the actual processing is done on the server side, the phone just streams the audio to the server and gets the text result back. that’s why networking must be enabled  for the app) Recognizing Speech Here’s a very simple piece of code that will show the speech recognition UI to the user:

private SpeechRecognizerUI _recoWithUI;private async void SimpleRecognition(){ //initialize the recognizer _recoWithUI = new SpeechRecognizerUI(); //show the recognizer UI (and prompt the user for speech input) var recoResult = await _r... [More]