Building Modern Desktop Applications with .NET

Presenters: Markus Egger, Otto Dobretsberger

Where: Houston, Texas, UNITED STATES
This event can also be attended online.

Click here to register for this event!

Where: This event is currently scheduled as an online-only event due to the pandemic. We will make further announcements in case in-person attendance at the CODE offices in Houston will become possible.

Windows Desktop Application Development may not be the flashiest of topics, but it turns out to still be one of the most popular (as is apparent when we talk to our consulting customers, CODE Magazine readers, and our event attendees, that continuously make desktop development topics one of the most sought-after).

But this begs the question: "What even is Windows Desktop Application Development and how do you do it?"

These days, the answer comes down to a combination of technologies, usually lead by WPF (Windows Presentation Foundation) or sometimes even WinForms, combined with other technologies, such as WinUI. Collectively, the set of tools used in today's Windows Desktop Applications is known as the Windows App SDK (formerly codenamed “Project Reunion”).

This 2-day, lecture-style workshop explains how to develop such apps, and also how to modernize existing applications, and bring them forward into the modern world of .NET 6 and beyond. Prior desktop app development experience is a benefit in this workshop (as is an understanding of the C# language) but it isn't strictly required. Attendees will walk away from this workshop with an understanding of what technologies to use, how to best use them, how to best preserve an investment in existing desktop applications and how to bring them foreward. Attendees will also see many real-world examples and the presenters will not just teach theoretical knowledge, but share their real-world experience with real production applications and what does and doesn't work well.

Day 1:

9:00 – 10:15 Introduction to the Modern Desktop Development Landscape
XAML, WPF, WinForms, WinUI, MAUI, and many other buzzwords are floating around the developer community. But which technologies do you choose? When do you use what? And what do you do with your existing applications? This first session of the workshop kicks off the event with a general overview of all involved technologies, discusses how they fit together, and provides a first glimps at how to retro-fit existing systems with modern technologies.
10:15 – 10:30 BREAK
10:30 – 12:00 Introduction to Modern Desktop Development with Views and View-Models
Most modern user interfaces are built out of a combination of "Views" (the visual part of the UI, usually defined in XAML) and "View-Models" (the data and behavior/logic defined in C# or another .NET language). These two parts are then married together using advanced data binding. When done correctly, this setup is not just powerful and flexible, but it is also easy and straightforward to do, even for junior team members. It also provides for a reusable setup that can be changed easily. This fundamental pattern is now used in many UI technologies, especially in Windows Desktop Applications. This is especially true in XAML-based technologies, such as WPF. However, this session also discusses how this pattern applies to WinForms scenarios. This session provides an in-depth look at these concepts and how to implement them.
12:00 – 13:30 Lunch and Brown-Bag Meeting
Note: The Brown-Bag meeting will only happen if in-person attendance is possible.
On-site attendees will have a complimentary lunch with Markus Egger and EPS Software/CODE staff. During lunch, Markus Egger (and potentially other EPS Software/CODE staff members, and on-site attendees) will informally show various real-life examples and current real-life work as bonus content. Use this opportunity to see production code, ask questions, and a lot more. Due to the informal and in-person nature of the Brown-Bag Meeting, this bonus content is only available to on-site attendees and will NOT be recorded.
13:30 – 15:00 Controls (WPF, WinForms, Windows App SDK)
Now that the class has given attendees an understanding of how to set up Views and View-Models, it is time to take a look at some of the UI details. What controls are available in the different UI technologies that make up Windows Desktop Development? Which ones are appropriate for which task? When do we need 3rd-Party controls? How do you combine controls from different environments, such as using WinUI controls in WinForms apps?
15:00 – 15:15 BREAK
15:15 – 16:45 Understanding Templates and Styles
Many modern UI environments provide a means of styling and templating. These techniques were originally made popular by technologies such as CSS in HTML. However, the same ideas also apply to XAML-driven technologies, such as WPF. In this session, the attendee is introduced to advanced styling, including the ability to create layout templates in order to drastically improve developer productivity and app maintainability over time. While many of these techniques apply mostly to XAML technologies, this session also shows how the same concepts can even be used to make WinForms development more productive.
16:45 – 17:00 Wrap-Up and Q&A
CODE Training’s classes are always open-ended. 15 minutes are spared at the end of the day to answer questions and wrap up examples and topics that may need further explanation. The class isn’t truly over until the last question is answered. Therefore, the actual end time is somewhat flexible.

Day 2

9:00 - 10:30 View Layout
At this point, attendees have now learned how to create Views that are bound to View-Models, and know which controls to use, and how to use them effectively. However, the best position for those controls on the screen has not yet been truly explored. In other UI environments, this might hardly be worth discussing, as developers would put controls on the screen at certain positions and dimensions. This is certainly also possible in WPF. However, this approach is tedious (who wants to do this for lots of UIs in a business application?), labor intensive, error prone, and highly inflexible. WPF offers layout features that go much beyond the basics. Most developers new to WPF tend to ignore this capability, which is a shame since this capability is one of the reasons, WPF can be the world's most productive UI development environment, when used correctly. This session may well be the most surprising and valuable session for attendees!
10:30 – 10:45 BREAK
10:45 – 12:00 Presenting Lists of Data
Business applications usually feature lots of "lists" of data: item search screens display a list of search results, there often is a list of customers displayed in a variety of formats (list, grid, contact cards, etc.), invoices have lists of line items… there is no end to such examples. Luckily, WPF, when used correctly, is extremely powerful when it comes to displaying lists and visualizing data in very advanced ways. Unfortunately, this very topic is also one of the most common sources of errors and bad architecture in WPF applications. Therefore, this session is devoted entirely to this very topic (especially for WPF business applications). During this session, Markus Egger takes attendees on a journey starting with very simple lists and ending with some very complex visualization. Best of all, the different approaches are interchangeable and highly flexible. This session may well rival the previous one for most surprising and most valuable!
12:00 – 13:30 LUNCH BREAK
Again, lunch will be brought in, and bonus content will be shown informally. Attendees are invited to part-take and ask questions or show their projects. Just as on the first day, this bonus content will only be available to on-site attendees and will NOT be recorded.
13:30 – 15:00 Advanced View and View-Model Concepts
Attendees have now learned a lot. Yet there is always room for improving an approach to building WPF applications. In this session, Markus Egger represents several real-world improvements to building Views and View-Models. In particular, attendees will explore the concept of advanced command structures and applying styles and templates to such commands, and will also explore the role of code-behind files and how they relate to concepts such as “behaviors.” With guidance from Markus Egger, attendees will take a second look at some data-binding scenarios and Attached Properties will be explored in depth. And in this session, Markus Egger will open the CODE Training bag of tricks and show attendees how to overcome those pesky little details that tend to creep up during the most inopportune moments.
15:00 – 15:15 BREAK
15:15 – 16:45 Conversion to .NET 6
.NET 6 makes it feasible to move many older Windows Desktop apps forward, regardless of whether they were build with WPF or WinForms. However, the conversion process is not completely automated. Some manual work has to be done, and there are tools that make the conversion easier. This session goes in-depth with all these tasks and shows the ideas behind app conversion and modernization. It also shows some real world examples of how we, at CODE, have moved legacy applications forward (some going all the way back to .NET 1.0, pushing 20 years of production deployment).
16:45 – 17:00 Wrap-Up and Q&A
Another open-ended Q&A session. Again, the class isn’t truly over until the last question is answered. And of course, class attendees should always feel free to contact EPS Software/CODE with questions even after the class is over and take advantage of a free 1-hour consulting session that is granted as an extra bonus to all paid attendees, giving attendees the chance to discuss how all the concepts shown in this class apply to specific problems and projects.

Please note that times are approximate and meant to be flexible depending on class participation and questions.

At a Glance:

Presenters: Markus Egger, Otto Dobretsberger

When: Thursday, September 29, 2022 (2 days)
Price: $1,895

Key Take-Aways:

  • Slide Deck
  • Source Code
  • Downloadable recordings of all the sessions
  • Certificate of Completion
  • Free CODE Magazine subscription
  • Discount off of future CODE Training Classes

Class Outline:

  • Introduction to the Modern Desktop Development Landscape
  • Introduction to Modern Desktop Development with Views and View-Models
  • Controls (WPF, WinForms, Windows App SDK)
  • Understanding Templates and Styles
  • View Layout
  • Presenting Lists of Data
  • Advanced View and View-Model Concepts
  • Conversion to .NET 6

Venue Information