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
4
votes
1 answer

WinUI 3 How to set Minimum Size of a Window

So in UWP, we can use ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(500, 500)); but ApplicationView.GetForCurrentView(); returns null in WinUI 3. Is there a way to set the minimum size for a window
4
votes
0 answers

Touch keyboard not appearing in WinUI 3 app

I have a touch application that was originally written using the UWP framework and I've not ported it to WinUI3. Everything has gone well so far but when I use a TextBox and click on it the touch Windows keyboard doesn't appear. After lots of…
Guy Lowe
  • 2,115
  • 1
  • 27
  • 37
4
votes
1 answer

WinUI Desktop app publish in app center: Problem occurred while extracting your app

I am trying to upload a WinUI desktop package in appcenter, but i am facing a below issue when uploading the packages. In addition, I have tried some other app create options, all the way leads to the same error. Can you please tell how to publish…
4
votes
2 answers

WinUI3/Desktop/C++: Can't compile winrt::resume_foreground(Microsoft::System::DispatcherQueue const& dispatcher)

I want to use: co_await winrt::resume_foreground(window.DispatcherQueue()); (Type of "window" is: "winrt::Microsoft::UI::Xaml::Window") But I cannot compile it because winrt::resume_foreground(Microsoft::System::DispatcherQueue const& dispatcher) is…
Markus
  • 51
  • 6
4
votes
1 answer

Why doesn't the .NET Generic Host stop when used with WinUI3?

I'm writing a WinUI3 (Project Reunion 0.5) application with .NET 5 and would like to use the .NET Generic Host. I'm using the default host with a custom IHostedService: public App() { _host = Host.CreateDefaultBuilder() …
David Brown
  • 35,411
  • 11
  • 83
  • 132
4
votes
3 answers

How to Maximize, Minimize, Restore WinUI window from code

I'm creating a demo app using WinUI 3 prerelease 0.5 (project reunion). I would like to maximize, minimize, and restore the window state from c# managed code. Are there any examples available?
Randall B
  • 81
  • 1
  • 6
4
votes
2 answers

How to bind two different class properties in DataTemplate

I am trying to bind two properties from different classes in DataTemplate.
Kanniyappan P
  • 281
  • 1
  • 6
3
votes
1 answer

Winui 3 open a new window in secondary monitor

I have a Winui 3 application. I need to open a new window in secondary monitor once user clicked on a button. I found below post which works for UWP. Open new window on secondary monitor in UWP However this code is not working in Winui 3. private…
Chamal
  • 1,439
  • 10
  • 15
3
votes
1 answer

Error NETSDK1152 on WinUI3 App: Found multiple publish output files with the same relative path: Microsoft.Web.WebView2.Core.dll

Installed Visual Studio 2022 (on a clean/fresh Windows 11 installation), installed Template Studio for WinUI (v5.3). Created a Project using Template Studio with these Settings: - Project type: Navigation pane - Design pattern: MVVM…
3
votes
1 answer

How to add style for Title of ContentPage in .Net MAUI?

I'm working with .NET MAUI to create a desktop app. Here, I have a ContentPage with the title My title.
Hoàng Trần
  • 549
  • 6
  • 14
3
votes
2 answers

URI start of MAUI Windows app creates a new instance. I need to have only one instance of app

I am able to start my Windows MAUI app using an URI, and I can get the URI itself. But, it appears that a NEW instance of the app is being created. This is not ideal for me -- if my app is already running, I want to use that instance. I have done…
bobwki
  • 794
  • 6
  • 22
3
votes
1 answer

WinUI 3 Can't properly change the background colour of the titlebar

My aim is to make the background colour of the title bar and the content inside the app to be the same colour, but that is not working. I wanted to make everything of this colour #FF2B2B2B, the problem is while the content of the app is of the…
uhlw32n2
  • 33
  • 3
3
votes
2 answers

How to get the Window hosting a UIElement instance

I'm trying to get the Window instance which is hosting a UIElement instance in WinUI 3. There's a helper method in the Window class in .NET (see this thread) but i cannot find something similar for C++/WinRT. I tried VisualTreeHelper as some…
ridilculous
  • 624
  • 3
  • 16
3
votes
1 answer

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 .Dispatcher. and in UWP we had to specify a specific…
3
votes
1 answer

WinUI3 and Drag and Drop

I am trying to get Drag and Drop working with WinUI3. In WPF I used to add added both AllowDrop and Drop to a UI element and I was able to receive the filename of a dropped file. However in WinUI3 the method Drop is not beeing executed. What am I…
Phil
  • 135
  • 9
1 2
3
76 77