In this article, we will discuss how to handle screen changes using WPF
Introduction
Hi friends today we will discuss how to handle screen changes using WPF

- Once open the Visual Studio click on File Click on the Project.
- As you are seeing there are many application(s) from them Select WPF application
- At name rename it as per your requirement
Adding new Window
- Right click on the project and click on add from there click on window for adding a new window to the project
- Rename the window as per your requirement
- Drag a text box from tools .
- Drag a TextBlock from the tools and rename it as Window Title her will will get the window title
- Drag and drop two text boxes .Arrange it below Window Title
- Drag and drop TextBlock and place before those text boxes and name it as window dimensions.
<Window x:Class="DataBindingExamples.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<StackPanel Margin="15">
<WrapPanel>
<TextBlock Text="Window Title: "/>
<TextBox Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" Width="150"/>
</WrapPanel>
<WrapPanel Margin="0,10,0,0">
<TextBlock Text="Window dimensions: " />
<TextBox Text="{Binding Width}" Width="50" />
<TextBlock Text=" x " />
<TextBox Text="{Binding Height}" Width="50" />
</WrapPanel>
</StackPanel>
</Window>
Out Put :
Based on the window changes text box will file the exact value of the dimensions
Conclusion
In this article we have seen how to handle screen changes using WPF .