Content
Accessing the Windows.Services.Store store in a C# Forms application.
I have been unable for days to get this line recognized in a C# Forms application. I've searched the web and looked at sample code. private Windows.Services.Store.StoreContext _context = null; I get: Error CS0234 The type or namespace name…
filter & save to xml function doesnt work viewmodel
Hello Morning: First i read xml file to fill the datagrid edit, save the xml file, then export the datagrid to excel file using OpenXML, then read the excel file to fille the datagrid. When i jsut read the xml file, i can filter the datagrid and edit…
Intent Filter / DeepLink .Net MAUI
I want to implement an application that will be viewable in my application using Intent Filter. I added in the MainActivity.cs file Filter Intent [IntentFilter(new[] { Intent.ActionView }, Categories = new[] { Intent.ActionView, Intent.CategoryDefault,…


Change InkDrawingAttributes Opacity for Pen brush
I using a color picker to draw with a pen, but using this code I can't change de opacity of the pen color: InkDrawingAttributes inkDrawingAttributes = InkCanvas.InkPresenter.CopyDefaultDrawingAttributes(); inkDrawingAttributes.Color =…


Why is the combo box cursor/caret moves to the beginning when down arrow is hit?
In my app I have a combo box <ComboBox ItemsSource="{Binding ComboItems}" SelectedItem="{Binding SelectedCBItem}" StaysOpenOnEdit="True" Text="{Binding SelectedCBItem,…


WPF Mousemove is a noticeable lag
I am making a UserControl called VolumeScrollBar to control the volume a video player I am working on. Now the problem I am having is when I slide my SwitchPath it moves noticeable slower than my mouse. How can I fix this ? note: everything is working…


Shell Navigation and using a Dictionary to pass values.
I am trying to learn how to pass complex data types to a page using a Dictionary. As you can see in the example code below that Name was hardcoded, but I was wondering what is the best practice if I wanted to dynamically set the Name property in the view…


how to write a 3layers winform applications in c#?
hi every body i am noob in c# and programming and i really care to code right and learn c# programming very correctly. so at first I want to write a 3 layers win form applications that read and write data into a table in sql server. for this project I…


UWP CreateOutputReport failed to create report ID
The following code has an error, System. Exception: "The data is invalid. The specified report type is not present. What is the reason? Error statement: var outputReport = hiddevice.CreateOutputReport(0); The handle was opened, but the output…
Displaying Deserialized JSON Data In Razor Page
Hello Everyone, I am using Visual Studio 2022 (x64) Community Version Entity Framework Core 6 C# Razor Pages (Not MVC) I am pulling data from the Google YouTube API, and want to display it on a .cshtml page. Here is a sample of the data: { …


How to marshal an array of fixed size structs from unmanaged to managed memory
.Net 7 Having an IntPtr (nint) pointing to an array of fixed size and blittable structs in unmanaged memory. Marshal.Copy does not seem to have any method like: Copy(myPointer, myStrcuctArray, 0, myStructArray.Length) (It accepts an array of int,…
How to use C# Linq to find average value of a double list.
Hello: I have the following data: List<double[]> asks = new(); var ask1 = new[] { 4.0, 4.0 }; var ask2 = new[] { 5.0, 5.0 }; asks.Add(ask1); asks.Add(ask2); List<double[]> bids = new(); var bid1 = new[] { 3.0, 3.0 }; var bid2 = new[] { 2.0,…


Performance issues - Sql Server 2022 Standard Edition
Hi, I've been using SQL Server 2014 express to store data and interact with my C# applications on Windows 10 for different years. I wanted to do some test with Sql Server 2022 before upgrading to that version so I've installed the Evaluation Edition (all…


How to clear text box records before or after downloading a file in ASP.NET web application
using (FileStream fs = File.Create(dataDir + xmlFileToConvertTo)) { Byte[] info = new UTF8Encoding(true).GetBytes(xmlData); fs.Write(info, 0, info.Length); …


Model is always null on Razor page
hello All, I have the following code on my cshtml page: @if (Model!=null && Model.EmergencyInfos!=null && Model.EmergencyInfos.ToList().Count>0) { var count = Model.EmergencyInfos.Count; @for…


using FileSystem.OpenAppPackageFileAsyn to open and play mp3 files stored on Google Drive
Hi I am using VS 2022 and C# to develop a MAUI App which needs to be deployed for IOS/Android and Windows. I would like to play audio files that are stored on Google Drive using audioPlayer. Can I use FileSystem.OpenAppPackageFileAsyn to open the file,…


401 Unauthorized when Granting access via Azure AD App-Only
I followed this article but I modified the sample code a bit to use GetContextAsync instead of GetAzureADAppOnlyAuthenticatedContext AuthenticationManager authManager = new AuthenticationManager(clientId, certPath,certPassword,tenantId); using…


How to System.BadImageFormatException (No string associated with token) error solved
Our Web Application build in .NET 4.8 and hosted as an azure app service throws this exception in some views. Here is the stack trace for one of these exceptions. We have run out of options to try certain things but it is stuck like that. We have tried…


Problem querying JSON using LINQ when there are semicolons in the name tag
I'm trying to work with a Json file from an outside source. They put semicolons and additional data in some the field names. I'm trying to query the data using LINQ and having problems. Is there a way of specifying wildcards in LINQ queries? I'm…



