Questions tagged [windows-app-sdk]

The Windows App SDK provides a unified set of APIs and tools that can be used by desktop apps on Windows 11 and 10. It includes features like WinUI 3, tools for App Lifecyle management, windows management, and more.

112 questions
0
votes
1 answer

Is it possible to fully customize ProgressBar colors in WinUI 3 using a 'plug and play' approach?

I am working on a theme in WinUI 3, and customizing colors for many different controls. For the Infobar control I managed to customize the colors to my liking by changing the name of the color the brush pointed to (so that it is different from the…
Blondie
  • 9
  • 2
0
votes
1 answer

How to pass parameters to the constructor through Frame.Navigate in C++/WinRT?

I just tried to use box_value, but it seems that the non-parameterized constructor will be always called. After I deleted the default constructor, XamlUserType::ActivateInstance() just crashed with null pointer exception. How to navigate to…
ACGMN
  • 9
  • 3
0
votes
1 answer

How to make event or callback in WinUI3?

I have main XAML page including two frames: Toolbar and Content. Also I have a few different pages for this frames. I'm using CommandBar into Toolbar frame. How to change Frame by AppBarButton click event from Frame (for ex. TaskerToolbar) in Main…
0
votes
0 answers

WinUI 3: Is there any way to make generated Window classes from XAML other than MainWindow also extend winrt::Microsoft::UI::Xaml::Window

Or is there a way to cast them to winrt::Microsoft::UI::Xaml::Window? If not, does that mean I have to do the following things with the help of some custom classes applied to manage extra…
ACGMN
  • 9
  • 3
0
votes
1 answer

WinUI 3/WASDK 1.3 How do I shorten the width of the month on a DatePicker control?

DatePicker I am trying to see what I could use here: https://github.com/microsoft/microsoft-ui-xaml/blob/main/dev/CommonStyles/DatePicker_themeresources.xaml But it just confuses me. Thanks in advance!
0
votes
1 answer

Create a UserControl with a ViewModel

I want to create a UserControl in WinUI 3 called ImageViewer that will show, traverse, add and delete photos. My UserControl contains the following properties: ICollection
0
votes
1 answer

How to implement Incremental loading in WinUI3 using IncrementalLoadingCollection from CommunityToolkit

I have been working on a project based on C# WinUI 3, I have a ListView in my application which loads a list of data from the database using MySQL. since there is more thank 10k data I have to implement incremented loading in my application. I tried…
trickymind
  • 557
  • 5
  • 21
0
votes
0 answers

x:DataType does not seem to accept my custom DataType

So I am currently trying to create a list view for a bunch of sounds. I made a new file and added a "SoundListItem" class, as the datatype in another file. I cannot get XAML to accept it at all. (yes the SoundListMgr.hpp file is included inside the…
0
votes
0 answers

Mvvm & ObservableCollection in C#

Is this redundant? [ObservableProperty] ObservableCollection countries; I feel like the [ObservableProperty] is not needed since ObservableCollection<> can notify the UI already on its own. Or, an alternative would…
0
votes
0 answers

Get a COMException from WinUI3 when create a grid

When I try to create a Grid, it throw System.Runtime.InteropServices.COMException var definition = new RowDefinition {Height = GridLength.Auto}; var grid = new Grid { RowDefinitions = { definition, definition } }; StackTrace…
子斗子
  • 1
  • 2
0
votes
1 answer

WinUI3 WindowsApp State Management

I'm looking to create state management for a Windows App desktop. It seems when going to back and forth from pages, the controls don't maintain their values. Do I have to cache the controls?
0
votes
0 answers

CommunityToolkit.Mvvm Source Generators are not working

I have a Windows App SDK/WinUI 3 Packaged Desktop App project in VS 2022, targeting .Net7. I installed the CommunityToolkit.Mvvm ver.8.1.0 NuGet package. Can someone please tell me why am I getting these warnings? Also, you can see in the 2nd image…
0
votes
0 answers

The destructor of the current Page in Frame was not called after I pressed "X" to close the application

Compiling the following code snippet in Release mode. Running the application, and clicking "X" to close the application, it is found that the destructor of FirstPage has not been called. App.xaml.cpp: #include "pch.h" #include…
JoJo
  • 1
  • 2
0
votes
1 answer

PointerWheelChanged not fired when use touchpad in ListView with WinUI3

I use winUI3 to build my app and use PointerWheelChanged event in ListView to capture mouse wheel but it only works with mouse device but not with touchpad. Thanks
Hoka Biu
  • 27
  • 6
0
votes
0 answers

Publish Windows App Sdk - SelfContained vs WindowsAppSDKSelfContained

While Publishing app developed using 'Windows App Sdk', What is the difference between vs . To reduce the app size, I want to set false. Will it…
bashahul
  • 422
  • 1
  • 4
  • 17