Reflection IT Blog

Benieuwd naar de laatste ontwikkelingen rondom software ontwikkeling en Reflection IT? Onze slimme koppen delen regelmatig hun kennis en ervaring. Zo weet jij wat er speelt!

wpf tagged Blog posts

XAML inline RowDefinitions and ColumnDefinitions

01-Dec-2021

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.

WinUI XAML with normal Row and Column Definitions

The following screenshot shows you the same Grid but now with inline RowDefinitions and ColumnDefinitions. It saves you a few lines of XAML.

WinUI XAML with inline Row and Column Definitions

XAML CalculatorBehavior

01-Dec-2016

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.

Avalon and ClickOnce demo

23-Sep-2005

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.

Get in touch

Met dit formulier kunt u informatie over een In-Company of Small-Group training aanvragen. U kunt in het bericht aangeven welke training u wilt, voor hoeveel personen, wanneer deze verzorgd moet worden en op welke locatie. Wij nemen vervolgens contact met u op.

U kunt ons ook bereiken via telefoonnummer +31 (0)493-688810 of per mail training@reflectionit.nl.