1,847 questions
-1
votes
0
answers
24
views
Casting from list of VirtualKey objects to RegisterHotKey
I'm using DevWinUI's shortcut control but I'm confused on how to get the key and modifiers from it and then casting it to the proper types for RegisterHotKey.
The shortcut control returns public new ...
-1
votes
1
answer
49
views
Set content of button in WinUI 3 to a StackPanel
Hello people of Stack Overflow. Recently, I've been working on a project in WinUi3, and I haven't been able to find a way to set the content of a Button to a StackPanel.
In WPF you could just do:
...
2
votes
1
answer
46
views
How to unify ScrollViewer Scroll across two columns in Touch machines?
In extension to this question
How to unify ScrollViewer Scroll across two columns?
I have implemented this correctly. For mouse scroll events and trackpad scroll events the ...
0
votes
0
answers
67
views
WinUI ItemsRepeater weird behavior
I'm using the header of the listview to filter item inside it.
What I'd want, would be, to have the TextBox Collapsed by default and on PointerReleased on the TextBlock to put it Visible.
When ...
1
vote
1
answer
108
views
Copy part of the drawing in the same DrawingSession
I want to design a continues moving "waterfall" to represent a radio spectrum.
The way to do this in for example HTML5 is to draw 1 horizontal line at the top.
Then copy the entire drawing ...
3
votes
1
answer
77
views
Is it possible to remove the opening and closing animations of a content dialog in WinUI 3?
I am working on a winui3 app where I wanted to remove the opening and closing animations of a Content Dialog. I tried removing the visual transactions but the animations still exists. Am I doing the ...
1
vote
1
answer
75
views
How to highlight part of the text with background color while preserving text wrapping in WinUI 3?
I am working on a WinUI 3 application and need to display a line of text where only a portion of the text has a colored background (like a highlight). The requirement is:
The text should wrap exactly ...
2
votes
1
answer
169
views
determine default browser setting in a WinUI app in Windows11
I followed several hints on how to get the "default browser" in windows, but they all are how to read the registry path from Current.User:
Software\Microsoft\Windows\Shell\Associations\...
2
votes
2
answers
80
views
ComboBox with SelectedValuePath and DisplayMemberPath does not show initial value
I am trying to display items in a WinUI 3 ComboBox using SelectedValuePath and DisplayMemberPath. However, the ComboBox does not show the initial selected value.
<ComboBox
x:Name="...
0
votes
0
answers
45
views
WinUI 3 Unpackaged App: Toast Notification Button Clicks Not Working - Complete Solution
Problem
Toast notification buttons in an unpackaged WinUI 3 app don't trigger the OnNotificationInvoked event handler, despite proper event registration and manifest configuration.
Symptoms
Toast ...
1
vote
1
answer
47
views
How can I hide the dates that are not part of the current month in the CalendarView control in WinUI 3?
I am using the CalendarView control in my WinUI 3 project. I want to hide the out-of-scope dates. I didn’t find any property for this. I can set the OutOfScopeForeground to match the calendar ...
1
vote
2
answers
140
views
WinUI 3 C# Create custom Button
I'm trying to create a custom button for a small icon but the button only show when i'm refreshing it in the xaml code or resizing window. Do you know how to make it show at the initiation of the ...
0
votes
0
answers
105
views
Using DataGrid Class (CommunityToolkit.WinUI.UI.Controls) in a XAML island from a C# Class Library
I have the following setup : I am display WinUI3 elements from a C# Class Library in a Win32 C++ app using XAML islands, the control that I want to use is a CommunityToolkit.WinUI.UI.Controls DataGrid ...
0
votes
0
answers
77
views
Consume a C# component with WinUI 3 controls from a WinRT/Win32 project
I followed this tutorial https://learn.microsoft.com/en-us/windows/apps/develop/platform/csharp-winrt/create-winrt-component-winui-cswinrt and I would like to do the same thing but from a Win32 ...
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
127
views
How to get rid of the box from the first item of GridView In WinUI3?
I have customized GridView "UserDesktopGridView" on a UserControl called "DesktopView", and the GridView's "SelectionMode"="None". However, when the "...
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, ...
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
82
views
Add event to style WinUI like css
I'd want to modify the event onmouverover directly in the style and not on the button. I'd like to do manage events in WinUI xaml like in css is it possible?
Something like :
.joinBtn:hover {
...
1
vote
1
answer
47
views
Capturing a photo with CameraCaptureUI opens post-capture editor popup on some Windows 10 devices
I have a WinUI 3 app where I capture a photo with the following code:
var cameraUI = new CameraCaptureUI(windowId);
var file = await cameraUI.CaptureFileAsync(CameraCaptureUIMode.Photo);
This opens ...
2
votes
1
answer
93
views
Failed to assign to property 'Microsoft.UI.Xaml.Controls.Frame.SourcePageType'
I got an issue following WinUI tutorial.
I followed the tutorial step-by-step with copy-and-paste code completion but, reaching the step "Create a page for a note" (specifically the point &...
1
vote
1
answer
349
views
Blank App, Packaged (WinUI 3 in Desktop) is missing
I believe my setup meets all the requirements on my Windows 11 24H2 machine but I can't find the "Blank App, Packaged (WinUI 3 in Desktop)" template.
I have VS2022, installed .NET desktop ...
2
votes
1
answer
40
views
FlowDirection.RightToLeft does not apply to custom TitleBar or caption buttons
I'm building a WinUI 3 desktop application with a custom TitleBar. I've applied FlowDirection="RightToLeft" to the main grid in my MainWindow.xaml, but the caption buttons (minimize, ...
0
votes
1
answer
71
views
WinUI 3 ListView not displaying items after app is installed from package
I'm developing a WinUI 3 desktop application using the "Empty App, packaged with Windows Application Packaging Project (WinUI 3 in Desktop)" template in Visual Studio on Windows 10 (build ...