SimpleMVVM, Part 4: Implementing the page frame

You might have noticed that we forgot the “Main Menu” button in the page frame. Let’s add a button to the data template of the page frame: <DataTemplate DataType=”{x:Type VM:PageFrameVM}”> <Border Style=”{StaticResource ContentBorder}”> <StackPanel> <ContentPresenter Content=”{Binding CurrentPage}” /> <Button Content=”Main Menu” /> </StackPanel> </Border> </DataTemplate> If you run the program, you’ll see this: The button…


SimpleMVVM, Part 3: The basic view model system

In this part we will build the basic view model system, so we can display pages and start with a simple unit test. The idea of a view model layer is to move the logic from the view layer (the XAML files) to a new layer to make it testable (and potentially reusable – even…


SimpleMVVM, Part 2: The product edit and customer edit pages

In this part we’ll build the XAMLs for the two edit windows. They are fairly similar so we can create them in one go. Remember, this is what the edit customer page should look like: We’ll build the page with a UniformGrid with two columns – the ListBox left and the TextBoxes right. We do…


SimpleMVVM, Part 1: The main window

We’ll start with the XAMLs for this project. Although this is actually a straight forward task, there are a couple of issues that one should keep an eye on. As a reminder – this is what we want: You could now start with a window and put the buttons in there. But it’s a better…


Simple MVVM: An example

The following posts build an example WPF application with a MVVM architecture which primary focus lies on simplicity. It does not use any other frameworks or libraries. It is built with plain WPF. It will show that a MVVM application can be simple and fairly easy to understand, and that frameworks like PRISM aren’t needed…


‘Painted Seamless Textures Vol. 2: Walls & Roofs’ released on Unity Asset Store

A new texture set has been approved by the Asset Store Team and is online available in the store. The set contains 86 painted seamless tileable textures. Every texture comes in a resolution of 2048×2048 and is designed to cover an area of 5×5 units instead of the most commonly used 1×1 unit texture. It…


‘Painted Seamless Textures Vol. 1: Grounds’ released on Unity Asset Store

A new texture set has been approved by the Asset Store Team and is online available in the store. The set contains 92 painted seamless tileable textures. Every texture comes in a resolution of 2048×2048 and is designed to cover an area of 5×5 units instead of the most commonly used 1×1 unit texture. It…


Terrain Generator For Unity – Step 6

In this step we will create the ground textures, also called “splat maps”. Unity stores the information about ground textures in a three-dimensional float array. The first two dimensions are the coordinates (x, y), the third dimension is the index of the texture that is to be used at that position. The index refers to the…


Terrain Generator For Unity – Step 5

In this step we will tweak the height map a bit to make it look more realistic. First of all we will add a water layer. We will also post process the height map so that areas close to water are made more flat (like beaches or riversides) and mountain areas are made higher to…


Terrain Generator For Unity – Step 4

In this step we will make the terrain generator more customizable. Instead of changing values in the source code we would like to change values in the editor. Fortunately Unity makes it easy to add fields to the inspector of the script, simply by making fields public. 1 We actually have four variables that are…