1,847 questions
2
votes
2
answers
99
views
SwapChainPanel does not receive KeyDown events
I am developing a WinUI 3 app in C#.
I am using a SwapChainPanel and I want to handle keyboard input (for example, the Delete key) using the KeyDown event.
However, the event never fires.
Here is a ...
0
votes
1
answer
78
views
In WinUI3, how do I constrain the initial size of a window so it does not exceed the size of the display?
I have a WinUI3 c++ application that displays information in a Window.
Once the contents of the window has been added, I am using the following code to measure the size of the contents of the window, ...
2
votes
1
answer
88
views
Unable to override SystemAccentColor via XAML (only works when changed in Windows Settings)
I am working with a WinUI 3 app and would like to change the system accent color for my application.
According to Microsoft Learn, the accent color can be overridden in App.xaml like this:
<...
2
votes
0
answers
523
views
Windows AppSDK, Winui 3 and Visual Basic
Microsoft speeches and videos have said explicitly that Winui 3 and Windows App SDK can be used with any .Net language, including Visual Basic. But I can seem to find no way to actually get started ...
2
votes
1
answer
773
views
CommunityToolkit.WinUI.Converters don't work as per documentation
Continuing my saga in WPF to WinUI migration (part 1 can be viewed here). Because I'm already using the Community Toolkit for MVVM I'm using some of the other offerings there as well.
I tried, rather ...
1
vote
1
answer
68
views
How do I reload a WinUI3 project after updating Visual Studio?
The feed 'MUX-Dependencies [https://pkgs.dev.azure.com/shine-oss/microsoft-ui-xaml/_packaging/MUX-Dependencies/nuget/v3/index.json]' lists package 'Microsoft.NET.ILLink.Tasks.8.0.19' but multiple ...
1
vote
1
answer
73
views
Which is the default fallback font used when FontFamily is invalid?
I’m working on an app that is delivered for both platform UWP and WinUI 3. In UWP, when I misspell or provide an invalid FontFamily, it seems to fall back to Segoe UI Variable. However, in WinUI 3, ...
0
votes
1
answer
69
views
How to dynamically change the Itemtemplate of a ListView without a flicker?
I am working on a WinUI3 project. I have a ListView where I want to change the datatemplate during runtime. Whenever I do that I could see a flicker or a visible flash.
Template 1
<DataTemplate ...
14
votes
2
answers
8k
views
Difference between Windows App SDK and WinUI 3
I develop many UWP apps to Windows 10, but to Windows 11 I have so many questions and sometimes the Microsoft Docs it's confusing. I want develop new apps to Windows 11 but I am totally lost!
What is ...
3
votes
1
answer
153
views
How to bind "DataGridComboBoxColumn.ItemsSource" to Enum collections declared in different derived classes displayed by DataGrid rows?
I have an ObservableCollection of Base Objects bound to a datagrid. I am trying to populate a DataGridComboBoxColumn with Enum values from a derived class instantiated in the observable collection.
...
1
vote
1
answer
113
views
Change Parent Window Overlay Transparency with ContentDialog
I want to change the transparency of the overlay displayed on the parent window when the ContentDialog is open. I am using WinUI 3. I have looked into generic.xaml and tried changing a few things, but ...
2
votes
1
answer
528
views
Command binding not being called
I have a close button which is binding to a close command defined in my main viewmodel but for some reason it's not firing:
Button in mainview.xaml:
<Button Grid.Row="0" Style="{...
-1
votes
1
answer
89
views
How to create a style of arc in gradient color with text value in the middle in WPF to be used for button, Label and Textblock
Here is the desired effect:
Is it possible to create such style in WPF so that it can be used for button, label and textblock as static resource?
Thank you
1
vote
1
answer
60
views
How to remove automatic focus change in UWP
I am implementing a user control which has a grid which again contains a grid (lets say sampleGridItem) with button, textblock etc. sampleGridItem is populated with a list in code behind. My goal is ...
12
votes
2
answers
10k
views
How do I deploy a WinUI 3 desktop application in a managed environment? Has anyone done it successfully?
I cannot figure this out. I just want to publish/deploy a hello world simple WinUI 3 app. Before I publish my real app (I tried to publish my full app, but I thought maybe there was something wrong ...
18
votes
4
answers
13k
views
How to get DispatcherQueue in WinUI 3 Desktop using Windows App SDK
In WPF all controls inherit DispatcherObject & its easy to get to the Dispatcher.
How would I get the DispatcherQueue using WinUI 3 Windows App SDK and use it in a ViewModel?
EDIT
My ...
10
votes
1
answer
5k
views
A WinUI 3 question about accessing the UI thread from another thread
A WinUI 3 question about accessing the UI thread from another thread, say, a Timer tick.
In WinForms that was extremely easy with a (someControl).InvokeRequired and .Invoke.
In WPF we had to add ....
1
vote
2
answers
236
views
WinUI 3 Class Library Dependency Injection
I'm using .NET 9, WinUI 3, CommTk.mvvm, Microsoft DI.
I have 3 projects in the solution:
WinUI 3 (the interface)
WinUI 3 class library (user controls to be used in multiple WinUI 3 projects)
C# class ...
4
votes
1
answer
3k
views
Where is the generic.xaml file located?
If you want to use the default styles, colors, etc..., you need to bring them from the generic.xaml file that comes with WindowsAppSDK NuGet packages.
Hence the question, where is located the generic....
1
vote
1
answer
79
views
What is the recommended way to override the default bootstrapper for unpacked Winui3 apps?
I have an unpackaged WinUI3 app which will automatically prompt the user if the required WinAppSDK is missing and to download the latest one with the provided link. My problem is that if my app uses e....
1
vote
2
answers
2k
views
How can i change the pointer of my cursor in winui3?
I want to change my cursor ideally making it invisible but would settle for cross when it enters/exits a specified area.
After some research, I saw Window.Current.CoreWindow.PointerCursor always ...
0
votes
1
answer
365
views
WinUI 3 Frame not Binding
WinUI 3 Desktop App (WindowsApp 1.2.230313.1)
C# MVPVM Code Pattern
I have created a problem with binding my View's Frame with the ViewModel's Frame encapsulating property. What is happening (without ...
2
votes
1
answer
1k
views
How to save a file to downloads using WinUI 3?
How do I save a file generated by my application to the downloads folder when using the WinUI 3 SDK? I know I can use FilePicker to select a file to use in my application but I would like to ...
0
votes
2
answers
2k
views
WinUI 3 ListView - how to select item programmatically in mvvm?
We have an observable collection SelectedPartys if user interacts with the listview we add/remove in code behind.
<ListView
x:Name="LV_Partys"
IsMultiSelectCheckBoxEnabled="...
2
votes
1
answer
1k
views
How can I use the system's clipboard in a winui 3 program
I have buttons for cut, copy and paste. I literally need them to do the exact same thing as their respective keyboard shortcuts would do.
Is there any function that I can stick into an event handler ...