Home > DeveloperSection > Forums > WPF APPLICATION
Jaya J
Jaya J

Total Post:9

Points:63
Posted on    March-24-2015 3:13 AM

 .NET C# 
Ratings:


 1 Reply(s)
 642  View(s)
Rate this:
Tell me the code for how to change font size of labels,buttons in wpf applications when screen resolutions was changed.i.e, when I'm using this wpf application in another system(the screen resolution for that system is different)how can i make change those labels, buttons sizes dynamically.

Please help me.


John Smith

Total Post:102

Points:720
Posted on    March-24-2015 3:46 AM

Viewbox is quite useful:
try following line of code

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window" Height="400" Width="400">
<Viewbox>
<StackPanel>
<TextBlock FontSize="16">Test</TextBlock>
<Border Background="Aqua" Width="200" Height="200"></Border>
</StackPanel>
</Viewbox>
</Window>

Don't want to miss updates? Please click the below button!

Follow MindStick