1. WPF Introduction

Introduction to Windows Presentation Foundation (WPF)

Windows Presentation Foundation (WPF) is a UI framework for building Windows desktop applications. It provides a unified programming model for building rich, modern desktop applications with clean UI design.

WPF Components

WPF is primarily composed of two parts:

Advantages of WPF

Unlike traditional Windows Forms, WPF provides a binding system and uses your computer's graphics card for rendering, resulting in a more responsive and visually pleasing user interface.

XAML in WPF

XAML stands for Extensible Application Markup Language. Used in conjunction with C#, it is primarily responsible for creating and managing UI elements in WPF.

The advantage of using XAML is that it is processed by the graphics card, providing an improved performance compared to Windows Forms that rely solely on the CPU for rendering.

Example:

<Window x:Class="WpfApp1.MainWindow"
        xmlns="<http://schemas.microsoft.com/winfx/2006/xaml/presentation>"
        xmlns:x="<http://schemas.microsoft.com/winfx/2006/xaml>"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Button Content="Button" HorizontalAlignment="Left" Margin="197,123,0,0" VerticalAlignment="Top" Width="75"/>
    </Grid>
</Window>

Key Concepts Covered

Throughout the study of WPF, we have covered various key concepts:

Reference

The content in this document is based on the original notes provided in Azerbaijani. For further details, you can refer to the original document using the following link:

Original Note - Azerbaijani Version