0

I have a WPF Application and when I change my screen resolution to 800 X 600 or other smaller resolutions then, I can not see all my form. I see just up side of my form. How may I overcome this?

      <local:WorkControl x:Class="Mzaddress.AddressControl"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Mzaddress"
      Title="Adresse" mc:Ignorable="d" d:DesignWidth="840"    
      xmlns:r="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon" 
      Loaded="WorkControl_Loaded" x:Name="myCntl"
      FontFamily="Arial" FontSize="12" xmlns:my="clr-namespace:Mzaddress.UserControls" 
      VerticalAlignment="Top" VerticalContentAlignment="Stretch" 
      local:HelpProvider.HelpParameter="AddressControl">
      <local:WorkControl.Resources>
9
  • Why would you change the screen resolution to such small resolution? As a user, I would be upset if an application requires something like this. Moreover, WPF has a great feature that allows to adapt to any resolution. Or I miss something?
    – Steve B
    Oct 8, 2012 at 9:39
  • @SteveB some of users are using tablet computers. Therefore , they usually change the resolutions. Oct 8, 2012 at 9:43
  • So isn't your question: "How to adapt my application to work on smaller resolutions?"?
    – Steve B
    Oct 8, 2012 at 9:45
  • 4
    You need to change from using absolute values for the position of elements to a fluid layout. However, without the code that defines the layout we can't help you. A list of using statements doesn't help.
    – ChrisF
    Oct 8, 2012 at 9:49
  • 1
    @Prasad thnx. I have done it !! Oct 9, 2012 at 7:43

1 Answer 1

3

Try this little sample und put your form into such simple ScrollViewer.

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
              <Grid Height="600" Width="800" Background="Green"/>
</ScrollViewer>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.