Questions tagged [winui-3]

The Windows UI Library (WinUI) is a native user experience (UX) framework for both Windows Desktop and UWP applications. WinUI 3 is the next version of WinUI, a native Windows 10 UI platform completely decoupled from the Windows 10 SDK. This tag should be used with questions concerning using the features and functionality of WinUI 3.x. Add the appropriate tag for the programming language you are using as well (c++-winrt, C# or Rust).

WinUI 3 is the native UI platform component that ships with the Windows App SDK previously known as Project Reunion.

1154 questions
3
votes
0 answers

.NET6 Win UI Microsoft.DesktopBridge.props not found when using dotnet cli

I am creating a .NET6 WinUI application which works and runs fine when built and executed via Visual Studio 2022. If I try to build via the cli (dotnet build) I get an error that Microsoft.DesktopBridge.props is not found. error MSB4019: Das…
xmashallax
  • 1,673
  • 1
  • 17
  • 34
3
votes
1 answer

Can I run xUnit tests against classes in my Win Ui 3 Class Library?

I have created a brand new "Class Library (Win Ui in Desktop)" library via the Add New Project functionality of Visual Studio. For the purposes of this question I have replaced the name of the library with . After creating an "xUnit Test…
GarryP
  • 143
  • 9
3
votes
2 answers

WinUI3 App Throws Exception - What Have I Missed?

I recently upgraded Visual Studio 2019 to install the Project Reunion templates so I can run WinUI3 apps. I followed this guide. I believe I installed all the workloads and components from this list but I may have missed something. I installed the…
Christian Findlay
  • 6,770
  • 5
  • 51
  • 103
3
votes
2 answers

How to resolve error CS0433: The type 'type' exists both in 'Microsoft.UI.Xaml,...' and 'Microsoft.UI...'

I'm making a UWP Windows app in C# using WinUI 3.0 and a few days ago I started getting this kind of error: CS0433 The type 'NavigationView' exists in both 'Microsoft.UI.Xaml, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null,…
user15860111
3
votes
0 answers

How to incorporate Win UI with Prism across the Uno platform?

I fetched the Prism Blank App (Uno Platform) template to set up a basic PrismApplication in the shared project. Probably a very good reason, it is a blank template, therefore even the Win UI Desktop project is missing from the solution. By default…
Tommy
  • 134
  • 1
  • 8
3
votes
1 answer

SelectedItem selection lost when updating ItemsSource to the ItemsControl

I have a custom RibbonGallery control like in Excel, MSWord, and Outlook. Please refer the Excel RibbonGallery image below and Normal selection still exists. And I kept two ItemsSource, one for RibbonGallery View and one for Popup, and arranged…
Kanniyappan P
  • 281
  • 1
  • 6
2
votes
1 answer

How to programmatically add an element in DataTemplate in a DataGrid

I have a WINUI3 project in which I need to add an element, CheckBox inside a CheckBox->DataTemplate->DataGridTemplateColumn.CellTemplate->DataGrid While my DataGrid is defined in Xaml, I need to add the CheckBox inside DataTemplate progmatically…
user14892417
2
votes
0 answers

How to create neon text (text glow effect) effect in WinUI 3?

I would like to understand how you can create such an effect, in which the text in the TextBlock / RichTextBlock elements will glow like neon, or at least just glow. To achieve this effect, I need to stroke the text and also give it a colored…
2
votes
1 answer

How to swich the color theme in WinUI3 manually?

I want to build a combobox to let user choose which theme they want the app to display. I added a combobox on my WinUI projects's settings page The code go like this:
Wu Xiuheng
  • 53
  • 5
2
votes
1 answer

Convert System.Drawing.Icon to Microsoft.UI.Xaml.ImageSource

There exist resolutions to convert System.Drawing.Icon to System.Media.ImageSource(Convert System.Drawing.Icon to System.Media.ImageSource). But when I used WinUI instead of WPF, this resolution seems to be unavailable. I need to convert…
Jack251970
  • 39
  • 2
2
votes
2 answers

WinUi MVVM, handle events from model on UI thread

To start with I'm from a WPF world where I'm used to using MVVM, however my knowledge isn't up to date with regards to the new .net API and WinUI. I'm currently trying to create a new POC using UNO Platform (which is more or less WinUI api) and…
dennis_ler
  • 659
  • 1
  • 9
  • 36
2
votes
1 answer

Is Windows App Runtime backward compatible

I am working on a WinUI3 application for the desktop application in cpp. I am trying to build the application as a single executable(.exe). So I chose framework dependant unpackaged mode. When we chose a framework dependant unpackaged mode of…
Harshith
  • 181
  • 2
  • 9
2
votes
1 answer

Dark System ContextMenu in Window

i am using winui 3 app, when i switch theme to Dark mode, system contextMenu (Right Click on Titlebar) is not updated to Dark, so i need to use [DllImport("uxtheme.dll", EntryPoint = "#135", SetLastError = true, CharSet = CharSet.Unicode)] private…
Chibako
  • 47
  • 4
2
votes
2 answers

Where can I find a list of all standard theme brushes when writing XAML?

Where can I find a visual list of all the standard theme brushes available to me in UWP/WinUI3 XAML? For example, the High Contrast themes documentation includes a visual list of all the colors, augmented with descriptions of their intended use. Is…
citelao
  • 4,898
  • 2
  • 22
  • 36
2
votes
1 answer

I want to display checkboxes only the top level items the treeview using SelectionMode

I set the TreeViewSelectionMode to "Single" and "Multiple". It doesn't display top-level checkboes. Is this option not available? Please check the image. TreeView x:Name="FileTree" SelectionMode="Single" TreeView x:Name="FileTree"…
Robert Lee
  • 23
  • 4