Content
Generate a simple message from controller (blazor page not for razor view)
In a Blazor server application, I have implemented user authentication via cookie. In the Blazor page (not razor view) I have created a form with email and password entries as well as a button for sending the data. The method is Post and is run on the…


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…


C# TCP/IP, Client with reconnect and timeout
Hello, I am looking for a good example how to create a client. There should be a timeout if no connection could be created. Then until 3 times automatic retry. If there is no response after the request, there should be error message, timeout. The request…


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…


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 =…


How to download rest api response content into excel using windows forms application c#
I'm trying to download REST API response content as (original format) excel (.xlsx) And I have used this method to return the response content public static string DownloadFileName() { try { var client = new…


C#: How do I read the full output of a command (given via a .bat file)?
Hello everyone. I must admit that I am really a beginner with C#. I have to develop software for Windows 10 Enterprise LTSC Embedded which among other things has to parse the output of the uwfmgr.exe get-config command (contained in the UWFStatus.bat…


c# Button execute value fro profile
I want under the button a cmd.exe executen I have unde the properties the following configured: <setting name="CMD" serializeAs="String"> <value>C:\Windows\System32\cmd.exe</value> …


ZipFile.CreateFromDirectory() looks like working, but zip file size is smaller than expected one.
Hi, I made a C# progrm which make a zip file, and save it to spedific folder on another drive. Yes, it's back up program. Zipping is taken in another independent thread. My program created zip file when the time is on my setup exactly. Problem is…


Best way to unit test cancellation
Good evening. I have been trying to write a unit test that will test the cancellation of a method. Now I have a unit test written that passes, but I am do not think it is what I am looking to achieve. I have tried a few different ways to achieve the…


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,…


How do I add my company subscription Id?
Hi all, I would like to add my company Subscription ID to my subscriptions. Is that possible?


How to search dictionary key and find the value in C#?
Hello: I have the following Json data stored into one dictionary: public class JsonKey { public int? Index { get; set; } public string? ID { get; set; } public string? Name { get; set; } …
How to use Json Data as dictionary key and find the value?
Hello: I have the following Json data stored into one dictionary: (newtonsoft.json) public class JsonKey { public int? Index { get; set; } public string? ID { get; set; } public string? Name { get; set;…
Why does the onclick event not work, in my razor pages hosted blazor component, in .net 7.0?
I've used the following code in multiple blazor web assembly applications hosted on a razor pages page under .net 5.0 and .net 6.0 before now. An application I was forced to upgrade to .net 7.0 has rendered the onclick command completely useless What…


Field never assigned and will always have null value
Delete all file from filesystemwatcher
How to show all data or text in Xvalue using Graph in c# 2019
Good day, I have a problem with my graph. Please see the picture below. This is my graph problem, not all datetime has display. I don't know what the problem, please help me to fix this problem.


File type cannot be inspected, CorrelationId=4ac4cbff-e67f-4ce9-81b7-254d7728cdb9, CorrelationId.Description=FileHandler
Hi Team, I'm using Microsoft Graph v1.0 to read emails. Recently we started receiving emails which are encrypted with below label. When I'm trying to read the attachments of these emails, I'm receiving RPMSG file which I'm unable to decrypt. I'm using…


mscorlib.resources.dll Module was built without symbols
Intento depurar un proyecto WFC pero me da error: Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_es_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols. An unhandled exception of type…


Is possible to use the same background process for all forms?
Can I use the same background process for all forms in visual studio c#? If it possible, how is it done?

