Building a responsive UI with WPF
In this section, we are going to build the same kind of interface as we did for the WinForms application, but this time, it will be using WPF. We will now start writing our code:
- Create a new WPF application called
CH12_ResponsiveWPF
and make sure to select .NET 6.0 as the target framework. - Add the
Product
class to the project. It is the same code that we used in our WinForms application. - Add a new Window called
SplashWindow
. - Modify the SplashWindow XAML as follows:
<Window x:Class=”CH12_ResponsiveWPF.SplashWindow” xmlns=”” xmlns:x=”” xmlns:d=”” xmlns:mc=”” xmlns:local=”clr-namespace:CH12_ResponsiveWPF” ...