Blog Posts for: Xaml

Preventing a UWP ListView item to be reordered

10 April 2017

The UWP ListView allows you to easily reorder items inside a ListView by setting the CanReorderItems and AllowDrop properties to True. Let’s for example take a very simple Page with a list view containing 6 buttons. Note that the CanReorderItems and AllowDrop properties are set to True: <Page x:Class="WorkflowDesigner.MainPage" xmlns="" xmlns:x="" xmlns:local="using:WorkflowDesigner" xmlns:d="" xmlns:mc="" mc:Ignorable="d"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ListView x:Name="ListView1" AllowDrop="True" CanReorderItems="True"> <Button>Button 1</Button> <Button>Button 2</Button> <Button>Button 3</Button> <Button>Button 4</Button> <Button>Button 5</Button> <Button>Button 6</Button> </ListView> </Grid> </Page> When you run the application, you are able to drag any of the items in the list view to a new position inside the list view:

How to disable item selection in the WinRT GridView

05 November 2013

When I sat down to convert One Love to Windows 8.1 I decided to rework the way in which I present the selection of social networks when a user adds a new account. In the free version you can add a single personal profile each for Facebook, Twitter and LinkedIn. If you wanted to add LinkedIn Groups for example you would have to upgrade to the Professional version (which is an in-app purchase).

3 Techniques you can use to make your data templates dynamic

31 October 2013

One of the nice things of the .NET Framework is that there are so many different ways to achieve the same result. I admit that it can sometimes make things a bit confusing, but in general I like the fact there are a lot of different ways to solve the same problem. I ran into this again recently when I wanted to make the data templates I use in a Windows 8 GridView more “dynamic”, i.

3 Ways to add modern icon goodness to your Windows 8.1 app

21 October 2013

So you’re building an app for Windows 8.1 and you are looking for some nice icons. There are quite a number of sources for XAML icons which not only works for Windows 8.1, but also for Windows Phone 8 and other XAML platforms. 1. Segoe UI Symbol font Using the Segoe UI Symbol font is probably the easiest way to get icons that works with Windows 8.1 without too much fuss.

Split Views and ViewModels in Caliburn Micro

25 February 2013

As mentioned in my previous blog post I am developing a Windows Store application using Caliburn Micro (CM) in which I have the views and view models split into different assemblies. CM is largely convention based and therefore expect things is certain places. One of these conventions is the way in which CM locates views and view models. Let’s say that we have an application with a root namespace of MyApplication and our views are located in the namespace MyApplication.

Caliburn Micro: Beware the default Windows Store app templates

21 February 2013

I was recently dumbfounded by an apparent issue with Caliburn Micro in a Windows Store application being unable to locate the view model for a view. The symptoms was that the application navigated correctly to my view, but the data from the view model was not being displayed on the page. What complicated matters a bit more was that my views and view models were located in different assemblies and non-default namespaces, therefore I immediately suspected the problem was located there.

Passing custom parameters to Caliburn Micro actions

18 February 2013

I have been working with Caliburn Micro (CM) for the past month, using it in a new Windows 8 application I am busy developing. CM is largely convention based but it does allow you to override and customize a lot of those conventions as well as provide other points of extensibility. The initial solution I recently had a scenario where I had a ListView displaying the a list of items.