How to make a Page able to gets the properties or methods of current MainWindow in WinUI3
I am developing a WinUI 3 app that includes TabView. Now I want to create a new window when a tab is dragged out of the current window. But I cannot create another new window because App.m-window
is set to the first created MainWindow
. The code looks like this:
WinUI 3 Template Studio change pages always reload?
I used the WinUI 3 Template in VS2022, and I created two pages according to the navigation setup, placing them in the left navigation bar for selection
WinUI 3 Application is not working as expected
I am trying to develop a WinUI 3 application in C#. Following is the GitHub repository link for the application code:
WinUi3 – Setting a toggleSwitch on/off dynamically when the window loads
I have a ToggleSwitch defined in my XAML.
<ToggleSwitch x:Name="enable_toggle_button" Header="Turn on/off" OffContent="Disabled" OnContent="Enabled" IsOn="False" Toggled="ToggleSwitch_Toggled"/>
WinUI 3 touchpad doesn’t fire PointerWheelChanged
I’m trying to implement custom zoom on image in WinUI 3 using ScrollView
. Its standard zoom is working with pinching on touchpad but not on mouse wheel. So I decided to use PointerWheelChanged
to handle zoom using wheel but for this to work I needed to set VerticalScrollMode="Disabled"
. Now zoom on mouse wheel works fine but two finger scrolling with touchpad doesn’t work at all. It doesn’t fire PointerWheelChanged
and scrolling with it doesn’t work, because vertical scroll is disabled.
WinUI3 bind Grid size to Window Size in ContentControl
I’m trying to use WinUI3 with MVVM.
For that case, I’m using a Content Control to bind the view model.
But the Content Control seems to break automatic resize of the inner Grid.
So I’m trying to bind the grid to the window size, but this does not work properly, when the window size changes.
WinUI3: how to set disabled button background
So I’m adding buttons via code to the grid, when some button is clicked i want to disable it and set background color to green or other, background should be set only to that one clicked button. But no matter what disabled button have transparent background.
Displaying children item of Listview
I had a demo for list view to display menu having parent and child. I simply added items into list view, but the result is only parent item is showing. How can I get to show my list view including both parent and children items?
My debug result is having 2 child items in parent. But can’t display. Is it binding problem?
Displaying children item of Listview. (Winui3 c#)
I had a demo for list view to display menu having parent and child. I simply added items into list view but the result is only parent item is showing. How can I get to show my list view including both parent and children items?
Error CS1061 ‘…Page…’ does not contain a definition for ‘InitializeComponent’
Get Compilation error