Introduction
Here I will Explain How to obtain screen size from xaml?.
This will work. You can read more here about SystemParameters.
Here I will Explain How to obtain screen size from xaml?.
This will work. You can read more here about SystemParameters.
<window x:class="WpfApplication1.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">
<StackPanel>
<TextBlock Text="{Binding
Source={x:Static SystemParameters.FullPrimaryScreenHeight}}" />
<TextBlock Text="{Binding
Source={x:Static SystemParameters.FullPrimaryScreenWidth}}" />
<TextBlock Text="{Binding
Source={x:Static SystemParameters.PrimaryScreenHeight}}" />
<TextBlock Text="{Binding
Source={x:Static SystemParameters.PrimaryScreenWidth}}" />
</StackPanel>
</window>
|
0 comments :
Post a Comment