1,847 questions
1
vote
2
answers
415
views
ContentTemplateSelector does not work after view is activated
I read with interest the question posed by Joe Wang last November on this subject. I have a similar and frustrating issue:
The xaml in the Page...
<Page.Resources>
<DataTemplate x:Key=&...
0
votes
1
answer
1k
views
Custom WinUI 3 C++/WinRT Control in C# WinUI project
I am trying to create WinUI C++/WinRT Component containing XAML control and iclude this custom control inside C# WinUI 3 project. Is this somehow possible? I had no luck yet. Could you please provide ...
0
votes
0
answers
531
views
Does WinUI has an equivalent of UWP's .NET Native?
UWP can generate native code using .NET Native, is there an equivalent for WinUI?
-1
votes
1
answer
949
views
Button appears all black in dark theme - Windows 11 (WinUi 3)
I am develop a new app for Windows 11 with WinUi 3 and in my MainPage the button appears all black in dark theme:
Why this happen?
This is a resume of my code:
<Window
<Grid Name="Main&...
0
votes
1
answer
564
views
How to fill TextBox inside ItemsRepeater in WinUI 3?
I'm trying to fill all the width space with a list of TextBox inside a collection. In UWP was so simple as adding <UniformGrid Rows="1"/> to ItemsControl, but using WinUI 3 I need to ...
1
vote
1
answer
689
views
Is it possible to Unit Test WinUI 3 code using NUnit?
I've got a WinUI-3 solution with three projects: class libary for the backend and ViewModels, Unit testing via NUnit and a WinUI-3 app.
Everything was working fine with all tests passing until I ...
0
votes
2
answers
5k
views
Transparent title bar in WinUI 3 app (Windows 11)
I develop some UWP apps to Windows10 and I want put the tile bar transparent in a new app developed in WinUi3.
If I try this
ExtendsContentIntoTitleBar = true;
The minimize, maximize and close buttons ...
2
votes
0
answers
215
views
Error: 'winrt::to_hstring' None of the '13' overloads could convert all the argument types
i have in HeadersControl.idl below:
...
[default_interface]
runtimeclass HeadersControl : Microsoft.UI.Xaml.Controls.UserControl
{
HeadersControl();
Int32 MyProperty;
static Microsoft.UI....
1
vote
1
answer
1k
views
Where can I find the default template for the Expander control?
I need to modify the template of the Expander control (move the chevron icon to the left), but I could not find it.
Per https://learn.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls....
0
votes
1
answer
451
views
Create two sections in the WinUI3 app for Windows 11
I'm developing a new application in WinUi3 for Windows 11 but I'm having some doubts and difficulties (I've developed UWP apps and haven't had this problem, in WinUi3 the behavior seems to be ...
0
votes
1
answer
683
views
With a NavigationView control, how can I navigate from the code behind?
is it possible to navigate from code-behind in a NavigationView?
If I am one one page in the NavigationView's frame, and I want to leave that page and display another valid page, is this possible. My ...
0
votes
0
answers
87
views
Invisible subfolder under AppData
I'm working on a project that involves the rewriting of legacy Windows applications for a modern .NET environment. The structure of these applications requires that there is one "Master" ...
2
votes
2
answers
2k
views
Publish WinUI 3 app in Microsoft Store (Windows 11)
I started developing a WinUI 3 application from scratch to Windows 11 to publish to the Microsoft Store but i can't find any option in Visual Studio to create the package and upload. I developed ...
0
votes
1
answer
532
views
C# WinUI 3 Get CS0053 error Inconsistent accessibility: property type 'INavigation' is less accessible than property 'App.Navigation'
Attempting to implement NavigationView navigation via code-behind using this solution I found:
https://xamlbrewer.wordpress.com/2021/07/06/navigating-in-a-winui-3-desktop-application/
I don't know ...
6
votes
1
answer
2k
views
WinUI3 create installer with external msi
I'm trying to create an installer for an Winui3 app and add to it an external msi file.
So far I've tried Wix toolset and Microsoft Visual Studio Installer Projects but both create an msi file ...
0
votes
1
answer
380
views
C# WinUI3 Desktop: How can I reference or control a button in a ListView's selected item DataTemplate?
I have a ListView:
<ListView x:Name="All_Staging_ListView"
SelectionMode="Single"
SelectionChanged="...
1
vote
2
answers
4k
views
C#| How to implement drag and drop functionality in WinUI 3 / UWP with custom DataPackage
I'm using a Drag and drop service implemented in the Microsoft template studio (explanation here). I think, I understand the way it works, and already read the documentation about the basic Drag and ...
2
votes
4
answers
5k
views
WinUI 3 1.0 : Window Ready Event
I am trying to execute code when the window is ready.
Specifically, I am trying to make the window maximize. The issue is I cannot run this code synchronously after InitializeComponent because it is ...
0
votes
1
answer
383
views
Can't create package for WinUI 3 Packaged app with plain .NET library
I have WinUI 3 Packaged app targeting .NET 6 Windows with some libraries targeting .NET 6. With Debug everything is okay, but when I want create package (Solution Explorer -> Package project -> ...
0
votes
1
answer
424
views
How to convert from float to std::wstring
I want to know the proper way to convert from "Float" to "std::wstring".
Xaml file
<Page
x:Class="TD2_WinUI3.MainPage"
xmlns="http://schemas.microsoft.com/...
0
votes
1
answer
1k
views
C# WIN UI 3: I have combobox with custom-typed observable collection as itemssource. Need help getting selected item
very new to C# WPF/WIN UI. My combobox displays my collection perfectly. But now when I want to do something with what the user selected I can't find the correct syntax in my 'SelectionChanged' event ...
0
votes
1
answer
1k
views
WinUI3: How to style datagrid group header text?
I am using the Windows Community Toolkit DataGrid control in my WinUI3 project.
I would like to make the group header text bold. How can I do this?
Currently the group header looks like this (not bold)...
1
vote
2
answers
330
views
Get bound data from container control with UWP
I am writing this app where I use the NavigationView control, and I would like to not have static menu items in it, so I bind this control's MenuItemsSource property to list of menu item objects ...
-1
votes
1
answer
1k
views
Unhandled exception at 0x7B657FD9 (Microsoft.ui.xaml.dll)
I am trying to create a login system for a uwp(winui3) app.
In the login window the user enters his credentials and on clicking the login button he/she is redirected to mainwindow.
But I get an ...
0
votes
1
answer
1k
views
How to make content dialog background consistent?
I would like the background color of the dialog content and the background color behind the buttons to be the same:
How can I do this?
My xaml:
<Page
x:Class="WinUI3BlankAppVS2022....