Click here to Skip to main content
15,892,839 members
Everything / NET6.0

NET6.0

NET6.0

Great Reads

by Nick Polyak
This article describes Gidon - the first IoC/MVVM plugin framework created for Avalonia.
by Nick Polyak
This article describes embedding native Windows and Linux control into an Avalonia application.
by Federico Di Marco
Fededim.Extensions.Configuration.Protected is an improved ConfigurationBuilder which allows partial or full encryption of configuration values stored inside any possible ConfigurationSource and fully integrated in the ASP.NET Core architecture using Data Protection API.

Latest Articles

by Federico Di Marco
Fededim.Extensions.Configuration.Protected is an improved ConfigurationBuilder which allows partial or full encryption of configuration values stored inside any possible ConfigurationSource and fully integrated in the ASP.NET Core architecture using Data Protection API.
by Nick Polyak
This article describes embedding native Windows and Linux control into an Avalonia application.
by Nick Polyak
This article describes Gidon - the first IoC/MVVM plugin framework created for Avalonia.

All Articles

Sort by Score

NET6.0 

27 Feb 2023 by Nick Polyak
This article describes Gidon - the first IoC/MVVM plugin framework created for Avalonia.
26 Dec 2023 by Nick Polyak
This article describes embedding native Windows and Linux control into an Avalonia application.
U 4 May 2024 by Federico Di Marco
Fededim.Extensions.Configuration.Protected is an improved ConfigurationBuilder which allows partial or full encryption of configuration values stored inside any possible ConfigurationSource and fully integrated in the ASP.NET Core architecture using Data Protection API.
15 Feb 2023 by Graeme_Grant
Change this: _percent = (100 * currentDevice) / TOTAL_DEVICE; this.Percent = _percent; //100% To this: this.Percent = (100 * currentDevice) / TOTAL_DEVICE; UPDATE #1 As you're binding to the code behind, you do not need...
28 Feb 2023 by Richard Deeming
StringFormatFlags.DirectionRig...
9 May 2022 by Graeme_Grant
"type mismatch during model binding" Firstly, Price value here is a string: "Price": "28.78", Yet you define you proerty in your class as a decimal type. Yes you have a "type mismatch" error. The error message is very explicit: Message=The...
28 Dec 2022 by Dave Kreskowiak
DON'T use Any CPU. That will run your code as a 32-bit app on 32-bit Windows and 64-bit on 64-bit Windows. The problem you're going to run into is when running on 32-bit Windows and you only included the 64-bit .DLL's for cefsharp, you're going...
16 Feb 2023 by George Swan
Graeme’s solution is excellent. I would just like to add that an alternative approach is to use the generic Progress class. That class captures the UI thread and removes the need for thread marshalling. See Reporting Progress From Async Tasks....
22 Sep 2023 by OriginalGriff
Without your code for both methods, we can't tell for sure - there are so many ways you could be doing things. But ... we can guess based on the almost negligible amount of information you have given us. If you are creating a stream in one...
23 Sep 2023 by Graeme_Grant
To expand on what @OriginalGriff has said, here is an example of what he was talking about: static void Main(string[] args) { // Create a MemoryStream to write text to using (MemoryStream memoryStream = new MemoryStream()) { ...
25 Sep 2023 by Dave Kreskowiak
You need to go lookup what "using" does in C#. Your code: public MemoryStream? Export() { using var stream = new MemoryStream(); ... blah ... return stream; } That "using" statement is telling the code to dispose the stream...
N 23 Apr 2024 by Dave Kreskowiak
You most likely don't have a reference to PresentationFramework.dll set in your project.
9 May 2022 by Virendra S from Bangalore, Karnataka
public enum SaleType { [EnumMember(Value = "COD")] COD, [EnumMember(Value = "ONLINE")] ONLINE, [EnumMember(Value = "PICKUP")] PICKUP, [EnumMember(Value = "OTHER")] OTHER } ...
14 Apr 2022 by Member 12885549
I have functions to view/remove data: [HttpGet] public IActionResult Index() { ViewData["table1"] = _repository.GetAll("table1").ToList(); ViewData["table2"] = _repository.GetAll("table2").ToList(); return...
14 Apr 2022 by Dave Kreskowiak
There's a limit on the size of the request. See c# - Increase upload file size in Asp.Net core - Stack Overflow[^]. Be sure to read ALL of the answers before tinkering with your code. There's multiple possible solutions depending on your exact...
8 May 2022 by Member 12885549
I have table like showed below. I want to check/uncheck (for now just trying out check) values in the table based on the type I select. Could this be done somehow like this? Or do I somehow need to send request from javascript to see updated...
18 Apr 2022 by Richard MacCutchan
Private Sub txtUserName_KeyPressed(sender As Object, e As EventArgs) Handles txtUserName.Press As far as I am aware there is no TextBox event named Press. The event you want is named KeyPress
19 Apr 2022 by Ralf Meier
The answer from Richard is not complete correct ... With the KeyPressed-Event from a Control (Textbox) you get not e as EventArgs but e as KeyPressEventArgs. The Difference is that with this Arguments you get a class which delivers you with...
8 May 2022 by Sni.DelWoods
Maybe the form collection is a solution: var selectedKeys = Request.Form.Keys.Where(k=> k.EndsWith(".Checked", System.StringComparison.OrdinalIgnoreCase)); Returns: 1.Checked 3.Checked
9 May 2022 by L Hills
See this page for docs on JsonConverters. For the price, I guess your converter should try to parse whatever is passed in to a decimal and if it can't be done return a default? For discount check for an empty string and return 0.00, presumably.
6 Jun 2022 by Sascha Manns
I have built an unpackaged app with .Net6 and WinUI3. Before launching the Main Window, i do some checks and API Requests. If one fails, i would like to communicate it to the user. I built a method: internal static async void...
30 Aug 2022 by Dimitri Gard
Hello Put the XAMLRoot of the in the windows With Winui3, Windows has no xamlroot
9 Sep 2022 by Magnus Sydoff
Hello all, Background: I'm writing an application that in some cases will have an Blazor UI. Due to this I want to deliver the Blazor UI part as a plug-in. I already have a few plug-ins that are non UI and that works fine. Since I'm a newbie when...
29 Sep 2022 by DoingWork
I am getting Virtual Desktop of each running process (by handles) by Using Windows APIs and following code snippet. What I have tried: List handles = GetWindowsHandles(); foreach (var hWnd in handles) { VirtualDesktop Virtual_Desktop...
5 Oct 2022 by Member 12885549
I have following code: var failed = new List name, IDictionary failedProducts)>(); foreach (var ids in batches) { var batch = Check(names, ids.ToArray()); // List checker,...
5 Oct 2022 by George Swan
Try something along these lines Dictionary failedDict = new() { { 0, new string[] { "A", "B", "C" } }, { 1, new string[] { "D", "E", "F" } } }; Dictionary batchDict = new() ...
28 Dec 2022 by huynhminh97
I have a WPF net core project and it's using CEF ChromiumWebBrowser, in the debug mode it run ok. Then I create Setup Project to make file msi file for client but it has error "File 'CefSharp.Core.Runtime.dll' of project output 'Publish Items...
2 Jan 2023 by huynhminh97
I have a WPF Project, in MainWindow.xaml there are 1 grid which contain button, 1 cefsharp ChromiumWebBrowser. When loading window Grid is Visible and ChromiumWebBrowser is Hidden. If I click the button, Grid is Hidden and ChromiumWebBrowser is...
29 Dec 2022 by Graeme_Grant
It sounds like you are missing a DLL. Have you compared the DLLs in the Debug and release folders? When you install, have you compared the install folder DLLs to the other two? Can you see any differences? You may have to manually include...
3 Jan 2023 by huynhminh97
My program is a WPF app which is installed into Program Files (x86) folder, in this app I have a method called every 30 minutes to compared version of current app and version of .msi file in local folder. If version of .msi file is the lastest,...
3 Jan 2023 by Graeme_Grant
Check out this solution: GitHub - ravibpatel/AutoUpdater.NET: AutoUpdater.NET is a class library that allows .NET developers to easily add auto update functionality to their classic desktop application projects.[^]
31 Jan 2023 by huynhminh97
My WPF app has many buttons and they are ordered on 1 row as the below picture: https://i.stack.imgur.com/hEIDk.png[^] What I want: When user click the left arrow, button will move left 1 column as below and and vice versa for the right arrow...
31 Jan 2023 by Richard Deeming
Sounds like you're looking for a carousel control: WPF: Carousel Control[^] A Custom WPF Carousel Control[^] Carousel - Windows Community Toolkit | Microsoft Learn[^]
2 Feb 2023 by Chris Copeland
Using C# you can query the PnP devices on the system by running: using (var search = new ManagementObjectSearcher(@"Select * From Win32_PnPEntity Where DeviceID Like ""USB%""")) { using (var collection =...
16 Feb 2023 by huynhminh97
I have a screen which used to check connection with multiple devices by COM/USB Port as the below picture https://i.stack.imgur.com/CAjK0.png[^] When user click button Check Device if checking a device connection is finished, icon good or not...
28 Feb 2023 by huynhminh97
I have PrintPageEvent to print document in C# and I want to print text with align right. When the text starts with character, it prints normal. But if the text starts with number, data after printing is wrong. For example: Text to print: "Print...
16 Mar 2023 by huynhminh97
I have a DataGrid with 2 column: checkbox column and Permission column. In new mode, when users select checkbox All in header then all child's checkbox is selected and vice versa (This logic is woking now). In edit mode, application will check if...
17 Mar 2023 by Graeme_Grant
With data-binding, you need to implement the PropertyChangedEventHandler to notify the data-binding which property has changed. Here is a base class implementation: public abstract class ObservableObject : INotifyPropertyChanged { protected...
19 Apr 2022 by Slow Eddie
I know this question clearly defines me ass the dolt that I am. However, I have looked in MS Help Files, Dot Net Heaven, and the Related Entry "Application Event Handler for WinForms" here. Dot Net Heaven had nothing, and MS Help, and...
N 23 Apr 2024 by s yu
I am revising a .Net FW4 project in order to add some WPF components (in net 6). In the revised .csproj,I added the 2 lines in the
N 30 Apr 2024 by Richard Deeming
As Dave said, it's not as simple as changing the target framework and adding the UseWpf item; the project format has changed quite significantly. Undo your changes, and use the CsprojToVs2017[^] command-line tool to update your project file to...
15 Feb 2023 by OriginalGriff
Move your long running code from the UI thread to a second thread - the BackgroundWorker Class (System.ComponentModel) | Microsoft Learn[^] is a good candidate as it's easy to use and provides progress reporting back to the UI thread.
2 Feb 2023 by huynhminh97
My app is running in kiosk machine and it connect with multiple devices as printer, camera, weighing scale, barcode scanner etc through USB port. It will check the connection of device when selected any port. Currently, I only can check which...
2 Jan 2023 by huynhminh97
I found the reason that cause this issue. See link Could not load file or assembly CefSharp to get detail information
24 Sep 2023 by xTMx9
Hello! I have a memoryStream object that I am passing from one method to another, each method is in a seperate class. When I build this memorystream in the 1st method, it is working fine but when I pass it to the next method in another class, I...
9 Sep 2022 by Graeme_Grant
You are wanting to have a Blazor Hybrid app. Here is Microsoft's explanation and examples: ASP.NET Core Blazor Hybrid | Microsoft Docs[^]