Posts

Showing posts with the label DI

Build a Responsive Kanban Board Application in WPF using C# and MVVM 🚀

Are you looking for a practical WPF project to improve your C#, MVVM, and desktop application development skills? In this series, we will build a Responsive Kanban Board Application from scratch using WPF, C#, and MVVM architecture . This project is inspired by modern task management tools like Trello and helps you understand how real-world desktop applications are designed and developed. Why Build a Kanban Board in WPF? Many developers learn WPF concepts individually: Buttons TextBoxes Data Binding Commands Collections But when building a real application, you need to combine everything together. A Kanban Board project helps you learn: ✅ Real UI design ✅ MVVM architecture ✅ Dynamic data handling ✅ User interaction ✅ Drag & Drop functionality ✅ Command-based programming ✅ Reusable WPF components What You Will Build in This WPF Project We create a responsive Kanban Board where users can manage tasks visually. The application contains: 📌 Multiple ...

How Dependency Injection Containers Work in C#?

Dependency Injection (DI) containers, such as Unity or DryIoc, help manage the creation and lifetime of object dependencies in C#. They facilitate the Inversion of Control (IoC) principle, allowing you to focus on writing clean, maintainable code without worrying about the complexities of instantiating dependencies manually. How DI Containers Work? Registration:  You define which concrete classes should be used to fulfill specific interface contracts. This allows the DI container to know what to instantiate when a class requests a particular dependency. Resolution:  When an instance of a class is requested, the DI container looks at the registered services, resolves the dependencies, and creates the object with the required dependencies injected. Lifetime Management:  The container manages the lifecycle of the dependencies. You can specify whether instances should be singleton (one instance for the entire application), transient (a new instance each time), or scoped (one ...