As this post will show, I’ve finally gotten around to it., in this case, has a few caveats (as one might expect).This should show you just how simple the Items Control is: As you can see, there is nothing that shows that we're using a control for repeating the items instead of just manually adding e.g.5 Text Block controls - the Items Control is completely lookless by default.We set the Interval property to one second, subscribe to the Tick event and then we start the timer.In the Tick event, we simply update the label to show the current time.Setup the main dialog When I need quick prototypes, I often don’t use Blend and type the XAML directly into Visual Studio editor.That was the very first part I did to write this XAML: .
I wanted to achieve something like this: Of course, I wanted to create this dialog using the power of WPF.
Here is the process I followed to create this dialog.
This is the “thinking with MVVM” part because I’m explaining the reasoning I had You can download the source code for this example here.
The simplest variant is the Items Control, which is pretty much just a markup-based loop - you need to apply all the styling and templating, but in many cases, that's just what you need.
Let's kick off with a very simple example, where we hand-feed the Items Control with a set of items.