Skip to content

My first windows 8 app (MySmug for windows 8)

I've created my first windows 8 app. It's a simple image viewer for a smugmug gallery.

MySmug for windows 8 status quo


The preferred method to authenticate to SmugMug is OAuth V2.0. OAuth in windows 8 can be achieved straight forward with the WebAuthenticationBroker. It will do most of the work for you. The only problem is that you can’t style this control properly. At the moment the authentication site from SmugMug doesn't fit into the WebAuthentication-Broker control. But it seems I’m not alone with this problem.

Albums list

After a successful authentication, a list of albums is shown. Photo & Video Sharing by SmugMug

Image list

After selecting an album from the albums list, all images from this album are shown.

Image detail

After selecting an image, it is shown full screen with some information. In this view it is possible to swipe through all images.


The good

Here I’m showing a list of things which are cool when creating a windows 8 app.

Overall concept

I like the metro concepts. I like the colors, style, tiles, contracts, responsive behavior and so on. In my opinion it is the right direction even if windows 8 is not finished yet.

Cool controls

There are a lot of cool controls like the FlipView or the WebAuthenticationBroker which hide a lot of complexity.

Good templates

There are some good metro style templates like the items page or the item detail page. They im-plement a lot of cool functionality and are quite easy to use.

Visual Studio 2012

I love VS. Just give VS2012 some more colors and don't use upper case in menu text. And I’m missing a stable resharper for VS2012.

The bad

A list of things which suck(At the moment at least) when creating a windows 8 app.

Change from Consumer Preview to Release Preview

I've started development with the consumer preview of windows 8, and this was a mistake. After upgrading to the release preview of windows and to VS2012, my solution didn't work any-more. They've change the whole LayoutAwarePage on which most of my sites were based.

Windows/VS2012 crashes

While developing, i had about 10 crashes where i had to do a hard reboot. Two times i even lost source code.

Missing concepts

I miss some concepts/basic functionality in metro apps.

  • Navigation concept/Application state
  • Settings dialog.
  • Others i can't remember...
  • Unfinished and missing controls

    I tried to use the ScrollViewer in order to zoom images. After a hack with the HorizontalScroll-BarVisibility it worked, but not as smooth as it should. Why is there no control which i can pan/zoom and which is super-smooth and behaves as it should? There are people which say you have to implement this all by yourself, but i don't agree.

    Why is there no settings control/concept? I've used callisto from tim heure, but this is a control which must be part of the core.

    Why is it no possible to change the size/style of a WebAuthenticationBroker?

    Image share contract

    I've implemented an image share contract. Why for gods sake did the mail client and the build in image viewer not implement the opposite of this contract? At the moment it's useless (I can share images only with puzzle-touch^^)

    Next steps

    I'll try to implement a video player in order to show movies, and i'm going to cleanup the existing code. I also hope to get the surface tablet anytime soon... :)

    cheers manuel

    Howto set MinWidth or MinHeight of a WinRT ScrollViewer

    I use the ScrollViewer control in a windows 8 metro app in order to zoom in/out an image. The problem now is, that it is possible to zoom in the image untill you almost can't zoom out again(because the image gets so small). I've tried MinWidth and MinHeigt on the ScrollViewer and on the image, but it didn't work. After some time i found the MinZoomFactor of the ScrollViewer, and this now works. It was just not obvious to me...


    Exception: That assembly does not allow partially trusted callers

    I have .net 3.5 program where i load some assemblies from a network share via reflection. Now i've got the following exception: "That assembly does not allow partially trusted callers''(Detailed message below). The calling assembly(.exe) is local. This .exe loads the assembly from network via reflection. The assembly from the network share then has a reference on a third assembly which is located beneath the .exe. (Hard to explain, image will do better...)

    The reason for this failure is the .net security. It doesn't allow the MyLib.dll to be loaded, because the calling assembly is located on a network share and is signed with a strong name.

    Solution 1, caspol.exe Allow all code to be executed. This might be dangerous, but if you're desperate it could be a solution.

     "C:\Windows\Microsoft.NET\Framework\v2.0.50727\CasPol.exe" -machine -chggroup All_Code FullTrust

    Solution 2, no signing If you remove the signature from MyLib2.dll, everything works.

    Solution 3, set attribute AllowPartiallyTrustedCallers If you set the AllowPartiallyTrustedCallers in the AssemblyInfo.cs of the signed assembly, everything works.

    using System.Security;

    [assembly: AllowPartiallyTrustedCallers()]

    Usefull links

    Continue reading "Exception: That assembly does not allow partially trusted callers"

    MySmug version 1.2 available

    MySmug version 1.2 went again smooth through the submission processs, and now is available at the marketplace. New features are:

    • Save single pictures to the phone
    • Upload pictures from phone to smugmug
    • Change the image orientation based on the phone orientation.
    • Performance optimization(Album data caching)

    Photo & Video Sharing by SmugMug

    View as PDF: This month | Full blog
    View as PDF: This month | Full blog
    View as PDF: This month | Full blog