WPF APPLICATION

Total Post:9

Points:63
C# 
 1219  View(s)
Ratings:
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.
  1. Post:106

    Points:748
    Re: WPF APPLICATION

    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>

Answer