Blog

posts from 2019

Using C# 8.0 in Core 2.x, .NET Framework and UWP projects

2 Comments
By Fons Sonnemans, 09-jul-2019

With Visual Studio 2019 Preview (currently version 16.2.0 Preview 3.0) you can use C# 8.0 in  .NET Core 3.0 projects. You only have to set the Language version to C# 8.0 (beta) in the Advanced Build Settings. Make sure you do this for 'All configurations' and 'Any CPU', see screenshot below.

Build Settings

This setting will add a LangVersion property to your .csproj file (line 6).

Core 3.0 project file

READ MORE

XAML Markup Extensions

0 Comments
By Fons Sonnemans, 29-apr-2019

The possibility to create your own Markup Extensions where added to UWP in the Windows Falls Creators Update SDK (16299, 1709).  I only used it once. I created an OnDevice Markup Extensions which I added to the Windows Community Toolkit.

Last month Pedro Lamas wrote the blog post Making the case for XAML Markup Extensions. He demonstrates a FontIconExtension which he uses to shorten the XAML of an AppBarButton. I love his solution. His blog post inspired me to write some new Markup Extensions with the same goal, short XAML. 

READ MORE

XAML TwoPaneView

0 Comments
By Fons Sonnemans, 05-feb-2019

I'm in the process of learning the new Windows 10 SDK Preview Build 18323. It includes a new control named TwoPaneView. The TwoPaneView is a Panel control which contains two Panes. The Panes are shown next to each other if there is enough room, otherwise below each other. If that is not possible only one pane is shown. You can use it in situations in which you normally used a RelativePanel in combination with some ViewStates to reposition one panel beside or below another depending off the size (AdaptiveTriggers). This was always a lot of work which is now very easy with the new control.

READ MORE

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.