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
-1
votes
0 answers

How can i use WinUI 3 to call a page's function in another page?

In the page that defines the function, i use the code below: public XamlRoot XamlRoot { get; private set; } public async void ShowDialog(string content) { ContentDialog dialog = new() { XamlRoot = this.XamlRoot, Style =…
yuzh
  • 1
  • 2
-1
votes
1 answer

The name 'WindowHelper' does not exist in the current context

In MainWindow.xaml.cs, I try to use WindowHelper to create a new window var window = WindowHelper.GetWindowForElement(this); But I recieved the following error CS0103: The name 'WindowHelper' does not exist in the current context Should I install a…
Wu Xiuheng
  • 53
  • 5
-1
votes
1 answer

Customize datagrid group header text?

I'm looking for a technique of how to customize text in DataGrid groups. For example, in my app, I’m grouping items by the MD5 hash tag, and it's do this with now problems. Except the format is quite unfriendly as instead of understandable group…
Max Zaikin
  • 65
  • 9
-1
votes
1 answer

How to change window Title bar Color in WinUI 3

Been looking into docs, web and the gallery app. The code provided in the UI Gallery app is not working. Title bar Default Color
-1
votes
1 answer

Application.Exit and cyclic references

Application.Exit wont close the process. The UI remains interactive. Is this because I have cyclic references? How do I find cyclic references without reasoning about the code?
Tom Huntington
  • 2,260
  • 10
  • 20
-1
votes
1 answer

Images not showing in WinUI 3 Button

I can't seem to make my WinUI 3 Button display an image. My project is a packaged C# WinUI 3 desktop application. Here is my XAML code (copied almost directly from the Microsoft docs):
-1
votes
1 answer

WinUI 3: Is there a way to force a canvas to be updated after clearing it in a event

I use this to clear the canvas. mainCanvas().Children().Clear(); The UI will surely change after the event, but I would like to take a screenshot just after the canvas being cleared. I've tried various methods but always get a screenshot of…
ACGMN
  • 9
  • 3
-1
votes
2 answers

Disable item selection on WinUI3 listview

In my WinUI3 app I have a ListView control that illustrates the 'current' item in another part of the app. For visual consistency this is done by binding to the SelectedItem property of the ListView. I would like to stop the user from being able to…
Siyh
  • 1,747
  • 1
  • 17
  • 24
-1
votes
1 answer

How to deploy .net MAUI windows app without using "runFullTrust"?

I have already asked this on the microsoft forum but just wanted to expand a little. We are almost finished migrating our xamarin forms app to .net MAUI. One of the last things that we have to do is setting the correct capabilities in the…
Vibol
  • 615
  • 1
  • 8
  • 25
-1
votes
2 answers

How to navigate back between pages in Frame

I have a window with a page named ShellPage that contains a NavigationView control and a Frame that contains the page content. When initializing the ShellPage, I load the ExploreCountriesPage. The ExploreCountriesPage contains a list with items to…
Sisimośki
  • 143
  • 1
  • 10
-1
votes
2 answers

Get the display language that my application is currently using

I plan to equip the settings page of my Windows App SDK app with a ComboBox that contains all languages my app supports so that the user can pick whatever language is desired. Graphically, it looks as follows: I populate the content of the ComboBox…
ackh
  • 1,648
  • 2
  • 18
  • 36
-1
votes
2 answers

WinUI 3 ListView Linked To Observablecollection contains Canvases

I am developing a WinUI 3 application which contains a ListView linked to an Observablecollection which contains canvases , the listview displays the names of the canvases via a DataTemplate but the names are not displayed
-1
votes
1 answer

How can I use OCX in console without System.Windows.Forms?

I tried many things to use OCX in WinUI3, but there was no way possible, and I tried to find executable code in the console, but there was only one way using System.Windows.Forms. Since System.Windows.Forms is not available in WinUI3, I tried the…
-1
votes
1 answer

How to get the value of a set TimePicker field programmatically

I created a WinUI 3 project. I have a timepicker field and it has the value selectedtime="11:11". I can't figure out how to get its value in code Tried like this MainWindows.xaml
Zend
  • 33
  • 4
-1
votes
1 answer

Is there an API to do screen capture in WinUI 3?

I have been searching for an API to capture screen images in a WinUI 3 app (without the user selecting from a picker, as from GraphicsCaptureItem). My goal is to capture screen images under programmatic control and display them on a Canvas element.…
R. Cohn
  • 29
  • 3