0

我有一个 WPF 应用程序,当我将屏幕分辨率更改为 800 X 600 或其他更小的分辨率时,我看不到我的所有表单。我只看到表格的正面。我该如何克服这一点?

      <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>
4

1 回答 1

3

试试这个小示例并将您的表单放入如此简单的 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>

于 2012-10-08T13:01:02.860 回答