-
Using Moq: A Simple Guide to Mocking for .NET
Last updated: Monday, December 8, 2025
Published in: CODE Magazine: 2023 - May/Jun
Moq is a mocking library for C# .NET that can help developers achieve better unit testing by improving the isolation of tests. This article explains how to use Moq for mocking, including its features such as parameter matching, setups, verification, and sequences. Moq's fluent interface is easy to use compared to other mocking libraries and it enforces loosely coupled software design using dependency injection, resulting in modular code that is easier to test, read, and extend. The article concludes with additional resources for further reading on Moq.
-
The Resurgence of XAML
Last updated: Wednesday, June 2, 2021
Published in: CODE Magazine: 2016 - November/December
Microsoft seemed to have put XAML out to pasture for a while, but Billy shows us how it’s back, and why even Microsoft is touting its praises.
-
XAML Anti-Patterns: Code-Behind
Last updated: Monday, December 8, 2025
Published in: CODE Magazine: 2015 - May/June, Markus Egger Talks Tech
Markus Egger argues that relying on traditional XAML code-behind leads to tightly coupled, hard-to-test UIs and technical debt; instead he advocates a View/ViewModel approach using commands, property binding, attached properties and behaviors to decouple logic from visuals, improve reuse and testability, and simplify maintenance—practices embodied in his CODE Framework that enable building flexible XAML UIs without code-behind.
-
XAML Anti-Patterns: Virtualization
Last updated: Thursday, September 9, 2021
Published in: CODE Magazine: 2014 - July/August, Newsletters, Markus Egger Talks Tech
Markus shows us why virtualization gets a bad reputation and how to clean it up.
-
CODE Framework: Accelerating Development with Standard Views and Standard View-Models
Last updated: Friday, June 10, 2022
Published in: VFP Conversion Papers, Markus Egger Talks Tech, CODE Magazine: 2013 - January/February
In prior articles, I have shown how to create WPF-based applications using the CODE Framework and the MVVM and MVC patterns. This enabled developers to create quality applications quickly and in a fashion that can easily be understood by developers of all skill levels. In those articles I showed how to use view-models and views to create UIs. In this article, I am going to take this concept further by showing you how you do not even have to create new views and view-models, but instead can use the ones CODE Framework defines for you out of the box.
-
Spice Up Your Silverlight and WPF Application Images
Last updated: Wednesday, February 20, 2019
Published in: CODE Magazine: 2011 - November/December
Most programmers have a hard time making applications that look interesting and fun. We are great at creating functionality that makes the application do exactly what the user wants, but many applications often look very utilitarian. However, with just a few little XAML tricks, you can make your Silverlight or WPF applications look like an artist had a hand in their creation. In this article I will provide you with a couple of very easy XAML tips that you can use right away to spice up the images in your Silverlight and WPF applications.
-
Implementing Drag and Drop in Your Windows Application
Last updated: Monday, December 8, 2025
Published in: CODE Magazine: 2008 - March/April
Wei‑Meng Lee explains how to implement drag-and-drop in Windows Forms by detailing the key events (MouseDown/Move, GiveFeedback, QueryContinueDrag, DragEnter/Over/Leave/Drop), showing practical examples for text, images, files and custom objects, handling different data formats (Bitmap, RTF, FileDrop, etc.), managing move vs. copy semantics and pitfalls, and providing a workaround (user-control wrapper) for ActiveX controls like Windows Media Player so developers can add robust drag-and-drop support to their applications.
-
WPF Meets the iPhone
Last updated: Wednesday, August 31, 2022
Published in: CODE Magazine: 2008 - March/April
The iPhone is one of the most compelling and exciting user interfaces to appear on any consumer electronic device, with many innovations that make it a pleasure to use. How can you deliver a similar experience with your .NET applications?This article demonstrates how you can implement these features in your .NET applications in a step-by-step format as you recreate the iPhone interface using Windows Presentation Foundation (WPF) technology with both Visual Studio 2008 and Microsoft Expression Blend.
-
101 Windows Phone 7 Apps, Volume I: Developing Apps 1-50- Chapter 2 Flashlight -
Last updated: Wednesday, August 31, 2022
Published in: Book Excerpts
This excerpt is from the new book, ‘101 Windows Phone 7 Apps, Volume I: Developing Apps 1-50’, authored by Adam Nathan, published April 2011, ISBN 0672335522, Copyright 2011. For more info, please visit the publisher site http://www.informit.com/store/product.aspx?isbn=0672335522
-
Ask the Doc Detective
Last updated: Tuesday, February 19, 2019
Published in: CODE Magazine: 2005 - March/April
Doc Detective Column March April/05

