Spatacoli

Spatacoli Blog

  1. Build 2014 an outsider’s summary

    I was unable to go to BUILD this year, and that made me pretty sad. This year’s theme was “Cloud First; Mobile First.” – but wait, how can both be first? Well, that’s the question they wanted you to ask so instead let’s ask, “What about desktop?” You see //build (yes I’m going to type it every way I can) was about 2 things this year: Azure (now called Microsoft Azure) and Windows Phone 8.1. Sure there was a little talk about Windows 8.1 Update, but really that was a sideshow (along with the teaser that they are bringing the Start Menu back).

    Cloud First Mobile First and desktop never. Think about it. A few months ago when //build/ was announced there was talk about Windows 9 making an appearance. However, there wasn’t a single word about it at this conference.

    Cloud First Mobile First, does that mean that we will have another /build conference this year and the topic will be Desktop Second? Also, it seems strange to have a /b conference and not have a build to give out to people. In fact, although the new UI for Azure was sent into the wild, the build for Windows Phone 8.1 will come in, “the first part of April.” Emphasis is mine.

     WP_20140408_10_31_30_Pro_9 

    Cloud First Mobile First except for Americans. The nice new Nokia Lumia 930 was introduced, but if you read between the lines they say ,”we will continue to push the Nokia Lumia Icon for American audiences.” That means that the 930 won’t be coming to the States anytime soon. Also on the cloud front, the big advances in datacenters are taking place in Europe and Asia with heavy emphasis on data redundancy being at least 500 miles away, but in the same geographical region. A nod towards not having your data in America at all for fear that the NSA is reading all those trillions of records.

    Maybe I’m just biased because I’m a desktop developer now. There was some great new advances for web development. The new edit in browser and the changes appear in Visual Studio is one of the most amazing things I’ve seen in a long long time. In the end though, I’m glad I wasn’t able to pay the $2095 to attend the conference. Maybe there’ll be another one in September that is dedicated to the desktop.

  2. Office for iPad is now available

    Today at a press briefing in San Francisco, Microsoft CEO Satya Nadella announced that Office for iPad is now available. The press briefing was entitled “The Intersection of Cloud and Mobile” and there was plenty of information on Microsoft’s new core:

    1) The world will not be defined by the form factors that we have today.
    2) Everything we do will be digitized.
    3) Improve the fidelity of the interactions with all of the digitized information.

    Mobile first: Cloud First. These two, mobile and cloud, are one in the same. Microsoft’s cloud for mobile Empower people to be more productive across all devices. Developers are looking for their canvas to innovate. How can they build on other people’s work. Empower IT so employees can do more and the organization can do more. A cloud for everyone on every device.

    Today is a first step. Word, PowerPoint and Excel on iPad. Full Office fidelity and editing capability right on your iPad. This is available today at 11AM PST.

  3. Surface RT and Surface 2 USB to Ethernet Connection

    My company has a very secure WiFi connection. Part of that security comes at a cost though. We can’t do remote debugging of the NOOK for Windows 8 app over WiFi. As many of you know the Surface RT and Surface 2 don’t have an Ethernet port. Under Windows 8 there was a single USB to Ethernet device that you could use, and it worked well. Microsoft asked people hosting that ARM based driver to remove it, and Windows 8.1 appears to be purposely blocking that connection.

    I received notice today that Microsoft supports USB to Ethernet connectors on Windows 8.1 for the Surface RT and Surface 2 in box. I have tried this with the official Surface connector that Microsoft sells as well as the Linksys USB 300M that we were using before and they both work. The trick is that you have to manually install the drivers. Here are the steps:

    1. Plug the USB to Ethernet connector in and wait for installation to fail.
    2. Open Device Manager and find the device that has failed.
    3. Right click on it and choose “Update Driver” from the context menu.
    4. Select “Let me pick from a list of device drivers on my computer”
    5. Select Network Adapters from the type of device list.
    6. For the Microsoft USB to Ethernet adapter select Realtek from the left hand side and choose the only option on the right.
      For the Linksys USB 300M or compatible device select ASIX from the left and ASIX 88772C from the right hand list.
    7. Accept the compatibility warning and then you should have network connection!

    I’d like to thank Andy Rathbone (a fellow MVP) and Paul Thurrott for helping out with this information and instructions.

  4. HttpRequestException in mscorlib.dll

    If you run into this exception in a Windows 8 App:

    "A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in mscorlib.dll"

    you should probably check to make sure that Internet (Client) is enabled in the App Manafest:

    appmanafest_2

  5. EventToCommand is now built into Windows 8.1!

    In MVVM code is separated to make it easier to test. You write a View Model and bind it to the View. Sometimes the View has elements that trigger events that you want to listen for in the View Model. This is where EventToCommand comes in handy. However, up till now this has been a bit of a trick to do in Windows 8 because it isn't built in. You have to use a third party extension or write all the wiring up yourself.

    Until now. Windows 8.1 is coming to the rescue. Blend for Visual Studio 2013 includes behaviors such as EventTriggerBehavior to satisfy your InvokeCommandAction needs. I'm ashamed to say though that I'm not one to hit the old "Edit in Blend" link in Visual Studio. I prefer to do all the hard work by hand. Well here's how you can do it by hand.

    The first step is to add a reference to the Windows SDK item BehaviorsXamlSDKManaged in the project. I had to unload the project and edit the csproj file directly to get this in since it didn't show on the "Add Reference…" dialog.

     <ItemGroup>
    <!-- A reference to the entire .Net Framework and Windows SDK are automatically included --> 
    <SDKReference Include="BehaviorsXamlSDKManaged, Version=12.0" /> 
    </ItemGroup> 
    

    Next we need to add some new XML namespaces to our XAML page:

    xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
    xmlns:Core="using:Microsoft.Xaml.Interactions.Core"

    Here I'm using the same names that Blend gives them. I'm sure you can rename them to make them clearer. Particularly Core.

    Then you set the hooks in the XAML code. In this example I have a Button that I'm listening for the "PointerExited" event and sending in the item as a command parameter:

    <Interactivity:Interaction.Behaviors>
      <Core:EventTriggerBehavior EventName="PointerExited">
        <Core:InvokeCommandAction Command="{Binding OnPointerExited}" CommandParameter="{Binding}" />
      </Core:EventTriggerBehavior>
    </Interactivity:Interaction.Behaviors>

    Finally you hook this into your ViewModel using the same DelegateCommand infrastructure you would use for any other command.

    I know this is a brief overview, and if you'd like a full example please look me up on Twitter (@spatacoli) and ask for a full demo.