In the XAML of WinUI3 apps you can use the inline syntax for creating Rows and Columns inside a Grid. This is a feature which Avalonia had for a long time. It is more compact and works fine as long as you don't need a Max or Min Width/Height.
The following screenshot shows you a Grid with 2 Rows and Columns. Both in equal size. Using 4 Rectangle elements I created the Microsoft logo inside this Grid.
The following screenshot shows you the same Grid but now with inline RowDefinitions and ColumnDefinitions. It saves you a few lines of XAML.
I have been using Adobe software recently and I noticed you could do simple calculations in textboxes. I used it to export Tile Images in different scale sizes. If the 100% scale of an Image is 150 pixels wide you can enter '150 * 1.5'. It will calculate the width of 225 pixels for the 150% scale size. I loved this feature so I tried to implement it also for my own Xaml apps.
The solution is quite simple. I have created a Behavior called CalculatorBehavior. You just use Blend for Visual Studio to drop it on a TextBox control and you are done.
I have build my first Windows Presentation Foundation (WPF) application. It is a remake of my WinForms Minesweeper game. Go to the ClickOnce publisher page and install Avalon Minesweeper.
Make sure you have the Microsoft Pre-Release Software WinFX Runtime Components - September Community Technology Preview (CTP) installed on your computer.
To run this sample you must add 'https://www.mydotnetplayground.nl/WpfMinesweeper' to your Trusted Sites in Internet Explorer.
UPDATE 1-1-2006: Moved to my own provider and updated to the December CTP.