VisualState Only Changes Once in Custom Control WinUI/WASDK App
I am working with a custom control in a WinUI/WASDK App and trying to modify the Foreground or BorderBrush of some elements using the VisualStateManager. However, I am encountering an issue where the VisualState only changes once, and after that, I am…
Downloading Folders as Zip Files c#
I created a code that downloads OneDrive folders as zip folders. When the file's downloaded, I checked it was there but when I opened it, it was a displaying an error message saying, the compressed(zip) folder is invalid. Is the below code correct for…
What does ntfs system file stop code in my windows 10
Hello microsoft I like your windows and I was kinda having small problem, I was playing ps2 emulator and I went to browse memory card and while I found out the secret about the browsing memory card saves where the characters become upset when I about to…
How does the predicate works?
Hello, I am reading the following code from Microsoft Docs. The predicate has two parameters, a string and an index. We don't use an index or any int parameter in the Linq query. How does the Linq query get the index(int) parameter? From…
how to fix at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_Provider()
IDK how to fix all that shit
Cannot Connect Locally to when using Microsoft.CognitiveServices.Speech
Hello Everyone, I am trying to build a method that detects the language of the audio I provide it. My application translates audio but since we batch transcribe and also use a custom model, I cannot use languageIdentification. Therefore, I am trying to…
What is AndroidResource type under Android-Maui?
When migrating from XAMARIN to .NET MAUI, what was AndroidResource in Android Resources folder defaults to Content which doesn't look right. What is AndroidResource type when migrated to MAUI? The file properties (for *.png, *.xml files) give no option…
Unable to publish with fulltrustprocess and Multiple instances of UWP app
UWP experts , There are three components here. Main UWP app with multiple instances supported through package manifest - C# UWP FullTrustprocess that acts as the appserviceconnection server - C# .NET 8 WAPP Package that bundles UWP app and…
How to fix code throwing exception : Microsoft.Data.SqlClient.SqlException: 'Login failed for user '<token-identified principal>'. The server is not currently configured to accept this token.'
Hi All, I'm encountering an issue while trying to connect to an Azure SQL Database using Microsoft Entra Authentication (formerly Azure AD). I am using DefaultAzureCredential in my .NET application to authenticate and retrieve the access token, but…
How to use WebView2 AddBrowserExtensionAsync in UWP?
Attempted to use webView.CoreWebView2.Profile.AddBrowserExtensionAsync(extensionPath) but received the exception "The request is not supported." It's understood that AreBrowserExtensionsEnabled must be set to True, and the property is found in…
Response status code does not indicate success: 404 (Not Found)
I get the following error while calling an api in my Blazor application: Following is the code where the error is pointing: And following is the calling api where request is made: What went wrong here? Any suggestions? Thanks, Puneet Chandiok
Unable to detected visibility of Onscreen keyboard using user32.dll
Below code is always showing on screen keyboard as visible. Even if it is closed. using System; using System.Diagnostics; using Microsoft.Win32; using System.Runtime.InteropServices; using System.Threading; namespace CSharpTesting { class Program …
How to do.Everytime to save the file need to move in string TargetPath = @"C:\Users\sy\Documents\test22" then if name of the file are same , file in string TargetPath = @"C:\Users\sy\Documents\test22" need to delete and paste to
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using…
How do I make a richTextBox have a transparent background / show the image beneath it? (C#, Windows Forms App)
Hello, as per the title, I want to make the richTextBox in my project transparent, or have a way to show the image beneath it. Whenever I try to set the backcolor to transparent, i always get "Property value is not valid" with "Control…
How to share "System.Web.HttpContext.Current.Session" between ASP.NET and .NET CORE application
Dear All, I would like to share session values between ASP.NET and ASP.NET CORE application. It is working fine only when the session value is set inside "Session_Start() method in Global.asax.cs. When I try to set session value in an other action…
Converting BinaryFormatter Binder to DataContractSerializer
How can the Binder property from BinaryFormatter be converted to work with DataContractSerializer in C#? For example, the code snippet below uses BinaryFormatter: var bf = new BinaryFormatter(); bf.Binder = new ClassXYZ(); // ClassXYZ inherited from…
Question: Issue Fetching Updated RAW Data from GitHub Gist Using HttpClient
Hi, I’m working on a C project where I fetch a JSON file from a GitHub Gist using HttpClient. However, even after updating the Gist, the HttpClient.GetStringAsync() method keeps returning the old data. I suspect this issue might be related to…
preventing c# listview items from disappearing
I have a ListView in a form in c#. There was info about an error in the ListView implementation that causes the items to disappear the first time the mouse hovers over the ListView, and there is a solution to prevent that which works fine. However, my…
How to Apply Multiple Filtering Criteria in a CustomObservableCollection?
Hello I am managing data in my WPF application using a CustomObservableCollection. I created a custom collection by inheriting from ObservableCollection in order to control any additional operations that might arise on the collection in the future. Now,…
Remove Extra Space in String - C#
Hello, I have a CSV file as below: In the last row, I have \t\t instead of space. I wrote a method (RemoveWhiteSpaceInString) but I cannot detect extra space. Is there any differences between ' ' and \t? using System.Reflection; using…