How do I write a HTTPS Client request code properly in C#?
I have written this HTTPS Client code to get data from NSE Server.
On button click, the code is expected to send a request to the Server and get data in return.
Half the times when I click the button I don’t get data from the Server, and it returns me Status Code 401 – Unauthorized. But other half of the times when I click the button, the server returns me the required data and a Status Code 200.
How does the `CalculateButton_Click` method validate and update `HourlyEmployee` and `CommissionEmployee` properties, and handle input errors?
I need to understand how the CalculateButton_Click method in my WPF application handles input validation and updates for HourlyEmployee and CommissionEmployee objects. Specifically, how does it check and manage errors for user inputs related to hours worked, wage rates, gross sales, and commission rates? The method involves parsing user input, validating ranges, and throwing exceptions if the inputs are invalid. Could you explain how this process is implemented in the provided C# code? Any insights into how input errors are managed and the validation logic used would be very helpful
My WPF app is not displaying text correctly in some datagrids
This is the UI on a windows 10 machine
Wpf frame navigation automatically makes the path smaller
public void frameNavigation(string url) { string path = “”; if (url == “startup”) { path = “Pages/Optimizations/startupManagementPage.xaml”; } else if (url == “unusedM”) { path = “Pages/Optimizations/unusedMemoryPage.xaml”; } else { return; } try { framePage.Navigate(new Uri(path, UriKind.Relative)); } catch (Exception ex) { MessageBox.Show($”Navigation error: {ex.Message}”); } } This is a method added to my settings […]
WPF program sometimes has touch failure, but the mouse can click
WPF program uses a touch-screen all-in-one machine, so you can click on the screen or click with the mouse. When you start the program, everything is normal. After using it for a while, there is a small probability that you can’t touch the screen, but you can click with the mouse. I really don’t know why and how to solve it. I use the .netFramework framework。
Measuring WPF TextBox gives zero size
I’m trying to calculate the height of an WPF textbox.
The code below does work for TextBlock, but returns a empty size for TextBox.
Wpf Dragging a rectangle on a canvas causes it to flash/blink
I am trying to drag a rectangle on an empty canvas. However, when i drag it, it flashes/blinks constantly.
How do I get logs to show up in the command line when using dotnet run command?
I have a WPF project which I would like to build and run from the command line instead of Visual Studio. This can be done with the dotnet run command from the project folder, but no debug logs are output to the console.
Scanner (SHARP MX-3060N) scans pages then throws feeder empty exception C# WPF, NAPS2
I will begin saying I’m not an expert so if there’s already a solution to this or this isn’t the right place to post this I apologize and I’ll correct it.
Scanner (SHARP MX-3060N) scans pages then throws feeder empty exception C# WPF, NAPS2
I will begin saying I’m not an expert so if there’s already a solution to this or this isn’t the right place to post this I apologize and I’ll correct it.