Binding To a Parent Element in UWP and WinUI 3
Posted: January 20, 2022 Filed under: MVVM, UWP, WinUI, XAML | Tags: MVVM, UWP, Windows App SDK, WinUI, XAML 2 CommentsIn a WPF application, it’s easy to bind to a property of a parent element in the visual tree by setting the RelativeSource
property of the binding to a RelativeSource object that specifies the type of ancestor to bind to.
Read »
Handle Protocol Activation and Redirection in Packaged Apps
Posted: May 10, 2019 Filed under: .NET, MSIX, WPF | Tags: .NET, C#, Desktop Bridge, MSIX, UWP, WPF 3 CommentsAn example of how to handle Uniform Resource Identifier (URI) protocol and file extension activation in a packaged WPF application.
Read »
Non-suspending UWP Desktop Apps
Posted: January 30, 2018 Filed under: C#, UWP | Tags: UWP Leave a commentA traditional Windows desktop application such as a .NET or a classic Win32 application is either running or non-running. This is not true for a Universal Windows Platform (UWP) app however. These kind of apps that run across all Windows 10 devices including phones, IoT devices and even Xbox consoles, enter an additional suspended state when being minimized or switched away from. Read »
Creating a minimal UWP app using the WRL
Posted: December 30, 2017 Filed under: UWP | Tags: UWP, Windows Runtime (WinRT), WRL, XAML 1 CommentContinuing from my last post abut how to create a minimal UWP app in C#, this one takes a closer look at what actually happens under the hood when the app interacts with the Windows Runtime (WinRT) and how you can interact with WinRT yourself in a native way without using any language projections.
Read »
A minimal UWP app
Posted: October 29, 2017 Filed under: UWP | Tags: UWP 1 CommentThe introduction of Windows Template Studio makes it easy to set up a well-formed Universal Windows Platform (UWP) app that implements the (Model-View-View Model) MVVM design pattern according to best practices in no time.
This kind of wizard-based experiences may be appealing to some developers, but in this post I will show how you can create a minimal UWP app from scratch without using any wizards nor auto-generated code.
Read »
Implicit Data Templates in UWP
Posted: March 25, 2017 Filed under: C#, UWP, XAML | Tags: C#, UWP, XAML 1 CommentIn WPF the use of implicit data templates without an x:Key
makes it easy to associate a template with a particular type of object. You just set the DataType
property of the DataTemplate
to the corresponding type and the template is then applied automatically to all instances of that particular type.
The Universal Windows Platform (UWP) however has no concept of implicit data templates. Each DataTemplate
that you define in a UWP app must have an x:Key
attribute and it must be set to a string
value.
Read »
Disabling selection of some items in a UWP ListView
Posted: February 28, 2016 Filed under: MVVM, UWP, XAML | Tags: MVVM, UWP, XAML 2 CommentsSetting the SelectionMode property of a ListView control to Multiple (Windows.UI.Xaml.Controls.ListViewSelectionMode.Multiple) in a Universal Windows Platform (UWP) app enables you to select several items by checking an automatically generated CheckBox element for each item that you want to select: