Made EASY - WPF Dependency Injection with IServiceCollection Dependency injection is a core part of any modern C# application -- and WPF apps are no different! In this video, I'll walk you through how we can transform a simple WPF application to take advantage of dependency injection using IServiceCollection. And you know that fun MVVM pattern that gets used heavily with WPF? Rest assured! We can inject our View Models into our Views with IServiceCollection and clean things up nicely! Watch here: https://lnkd.in/gRPZY9rJ
How to use IServiceCollection for WPF Dependency Injection
More Relevant Posts
-
WPF developers: how many sprints have you lost to “quick” DIY controls? From PropertyGrid and BusyIndicator to culture-aware NumericUpDown and masked inputs, the hidden costs stack up—accessibility, localization, edge cases, and caret bugs. We broke down 10 controls you shouldn’t rebuild (plus the cost model that proves it) View Article: https://zurl.co/gKXPl Ship features, not plumbing. Start faster with Xceed WPF Toolkit Plus. #WPF #DotNet #CSharp #WPFDevelopers #XAML #DevTools #UIComponents
To view or add a comment, sign in
-
-
WPF’s Fluent Theme Looks Good — But It’s Not a Theme https://lnkd.in/gtNxGv5u Included with the release of .NET 9.0 was a sweet new feature for WPF: the Fluent theme. Using this new […]
To view or add a comment, sign in
-
Task.Yield() in C# is a small but powerful method from the TPL (Task Parallel Library). It’s used to yield execution back to the current context (like the synchronization context or thread pool), allowing other queued work to run before the method continues. What it does ? When you call await Task.Yield();, the current method is asynchronously paused and control is returned to the caller. The rest of the method is scheduled to run later, usually on the current SynchronizationContext (e.g., UI thread in WPF/WinForms, ASP.NET request context, etc.). It forces an asynchronous yield, even if the method could otherwise continue synchronously.
To view or add a comment, sign in
-
-
Microsoft released .NET 10 RC 1 with a go-live license (production supported through Oct. 14, 2025), highlighting updates across ASP.NET Core, Blazor, .NET MAUI, EF Core, Libraries, and WinForms, with testing supported in Visual Studio 2026 Insiders and VS Code’s C# Dev Kit. https://lnkd.in/eFD-DdXp #DotNet10 #GoLiveSupport #SoftwareDevelopment
To view or add a comment, sign in
-
-
Visual Studio trick I use for converting JSON to C# classes: (no need for online tools) Paste JSON as Classes When you copy your JSON object, you can paste it into Visual Studio. And automatically create a new C# class from JSON. This is available under: Edit -> Paste Special -> Paste Json As Classes It even supports nested JSON objects. P.S. Have you used this option?
To view or add a comment, sign in
-
-
Researchers reveal a flaw in Visual Studio Code Marketplace allowing attackers to republish deleted extensions under the same names. Malicious versions can deliver PowerShell payloads and demand Shiba Inu tokens. #OpenSourceRisk #VSCode #USA link: https://ift.tt/hTYw78q
To view or add a comment, sign in
-
-
How To Build Modular WPF Applications With a Plugin Architecture WPF is a powerful user interface framework for CSharp, but I hate some of it. Is hate too strong of a word? Probably. But in the many years I spent building desktop applications in WPF, I found that I would be fighting against a lot of the framework to make things happen. However, two things that I don't compromise on are: - Dependency Injection - Plugins So we're going to see how we can build a plugin-based WPF application and set you on course for using a plugin architecture in CSharp! Watch here: https://lnkd.in/gPiMd3x9
To view or add a comment, sign in
-
-
Are you new to using Visual Studio Code (VS Code)? When opening a folder full of Markdown Files (.md), do you wish there was a way to view the files without all of the Markdown symbols and special characters? VS Code: How To Preview Markdown Files To Make Them Easier To Read How To Preview Markdown Files in VS Code: 1. Open VS Code 2. Open Folder of files with Markdown Files 3. Select Markdown File 4. Right-click and select ‘Open Preview’ to open Markdown in new tab 5. Close Preview Tab to return to original Markdown file
To view or add a comment, sign in
-
For the past 5 years, I’ve been using the built-in debugger in Visual Studio Code to work on backend apps like Nest or Express—and it’s been a game changer. No more endless console.log statements. The debugger helps me focus, trace issues faster, and keep my workflow smooth and efficient. If you're still relying on logs, give the VS Code debugger a try. It might just boost your productivity like it did for me! Attached the configuration I generally do in launch.json file for the developer reference. #DeveloperTools #VSCode #BackendDevelopment #ExpressJS #ProductivityTips
To view or add a comment, sign in
-