3,102 questions
0
votes
0
answers
38
views
How to resolve error MSB4036 during UWP packaging?
I encountered this error while packaging my C# UWP project. I've tried some methods, but none of them worked. Could you please help me resolve this issue?
enter image description here
Compile error ...
-1
votes
2
answers
75
views
How to initialize control from OnLaunched in C++/WinRT UWP app?
In Visual Studio I compiled the blank C++/WinRT UWP app which displays a button that says "Click me" and "Clicked" after it is clicked. As an experiment to learn how to initialize ...
0
votes
1
answer
40
views
UWP performance issue in remote desktop when using ListView. But this issue does not happen when using ScrollViewer
On remote desktop, the following code causes the list items to appear grey for a few seconds while scrolling.
<ListView Margin="10" ItemsSource="{Binding Items}" ></...
0
votes
0
answers
44
views
Host a Unity scene inside a control of UWP XAML app and communicate using C# between UWP and Unity
I am trying to implement an application where a Unity scene will be hosted in a UWP XAML project (In a SwapchainPanel) and there should be communication between UWP and Unity. Basically using a XAML ...
3
votes
1
answer
617
views
Visual Studio 2022 XAML Designer for UWP App Not Working
While attempting to follow the instructions on Microsoft's Learn Page linked here:
https://learn.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-uwp?view=vs-2022
I'm unable to get the ...
0
votes
2
answers
99
views
How to obtain x:Load notification
The page on x:Load says that when the deferred element is loaded, “If you have registered to receive property change notifications on the property containing the deferred element(s), the notification ...
2
votes
1
answer
287
views
How to specify a nested class for x:DataType in a DataTemplate?
When I try to use x:DataType in a DataTemplate to specify the nested class, I get an error.
I have a nested class structure in C#, as shown below:
namespace sample
{
public class MainData
{
...
0
votes
0
answers
46
views
[UWP]: Combo box collapses when trying to select option first time only
I am using a ComboBox that has 2 options in its dropdown. When user opens the UWP app, the default option is first option in combo box. When user tries to click on combo box to selected option 2, the ...
1
vote
1
answer
60
views
How to remove automatic focus change in UWP
I am implementing a user control which has a grid which again contains a grid (lets say sampleGridItem) with button, textblock etc. sampleGridItem is populated with a list in code behind. My goal is ...
0
votes
0
answers
86
views
Position child control relative to parent
I have a responsive layout with a parent control and child controls, something like:
I need one of the children (Child1 in the image) to not be part of the layout, but to be positioned relative to ...
1
vote
0
answers
66
views
TypeUniverse Cannot Resolve Assembly Exception (in UWP app with transitive references)
I have a UWP app, App1, and two .NET Standard libraries, ClassLibrary1 and ClassLibrary2.
ClassLibrary1 includes ISampleInterface and SampleClass. ClassLibrary2 references ClassLibrary1 and includes ...
0
votes
0
answers
39
views
uwp app hangs when device goes to battery saver mode
when the app is running and battery level goes down below 20%, battery saver turns on and app becomes unresponsive for some time . This also happens when we manualy turn on batery saver mode.
I turned ...
0
votes
1
answer
30
views
Put a grid next to a Frame in UWP
I'm coding an UWP app. I want to put a Grid right next to a frame.
Here is MainPage.XAML:
<Page
x:Class="Project_NewSpartan.MainPage"
xmlns="http://schemas.microsoft.com/...
0
votes
1
answer
81
views
Unable to install Google.FlatBuffers Nuget package for the UWP application
I got the below error while installing FlatBuffers package for the UWP app
NU1202: Package Google.FlatBuffers 24.3.25 is not compatible with uap10.0.17763 (UAP,Version=v10.0.17763) / win10-x86. ...
1
vote
1
answer
65
views
How to use keyboard navigation on items in a ListView nested in a MenuFlyout?
I have a Button that opens a MenuFlyout when pressed. The MenuFlyout has several custom MenuFlyoutItems: One with a nested StackPanel, one that has a bound Command, and one ListView of actionable ...
0
votes
1
answer
71
views
UWP DataTransferManager class DataRequest.Data.Property.Title is not reflecting in Outlook
I wanted to share some data as mail from my UWP application, but I am unable to change the title (subject of the email), as I am able set title from code but not showing in outlook subject, outlook is ...
0
votes
1
answer
147
views
Adding Icon to MenuFlyoutItem in XAML
I'm trying to add an icon to MenuFlyoutItem. I have the following project structure:
Project
-Resources
--Images
---image.png
-Views
--View.xaml
The XAML is as follows:
<MenuFlyoutItem
Command=&...
-3
votes
1
answer
85
views
Set ToggleSwitch On an Off
I have 3 toggle switches named onlineToggle, offlineToggle, and maxToggle.
XAML:
<ToggleSwitch
x:Name="onlineToggleSwitch"
VerticalAlignment="Center"
FlowDirection="...
0
votes
1
answer
358
views
Fill DataGrid with only the Data from DataTable WinUI3 MVVM
The DataTable is populated with the data from a database.
var query = $"SELECT * FROM {databaseTable.Name}";
OracleCommand oracleCommand = new OracleCommand(query, _connection);
...
0
votes
1
answer
171
views
How to determine the current page a frame is displaying in UWP
I'm quite new to UWP development, and so far I followed the tutorial below to make the a program that navigates through pages using a NavigationView to select and a Frame to load the pages. But I ...
0
votes
0
answers
20
views
Why won't Windows.UI.Xaml.Controls.Frame "forget" the last parameter?
I'm struggling with a UWP application which I did not originally create, but I don't have access to any of the original developers to help me, and I am not an expert in UWP development.
The ...
0
votes
1
answer
98
views
Modify the attributes of an SVG file and set it as a source for an image element in uwp using c#
string svgFilePath = "ms-appx:///Assets/Chart.svg";
XNamespace svgNamespace = "http://www.w3.org/2000/svg";
StorageFile svgFile = await StorageFile.GetFileFromApplicationUriAsync(...
1
vote
1
answer
93
views
How to create a ListBox item control and bind a complex type to
I have the following custom control,
public sealed class MediaFileItemControl : Control
{
public static readonly DependencyProperty MediaFileProperty =
DependencyProperty.Register(nameof(...
0
votes
1
answer
127
views
UWP: Display full size of image
I'm facing an issue in my UWP app where I'm attempting to display an image within a ContentDialog. However, the image gets cropped within the dialog, and I want it to be displayed without any clipping....
0
votes
1
answer
50
views
Setting Font to the DefaultCharacterFormat using uri for the RichEditBox in UWP is raising Exception
public MainPage()
{
this.InitializeComponent();
RichEditBox rbox = new RichEditBox();
Canva.Children.Add(rbox);
rbox.Document.SetText(0, "asdfasfasdfasdfasdfoiuytredfxbnuytrxgd &...