1

侧画布标签有边框,现在我想根据窗口最大化来最大化画布的大小

<ScrollViewer x:Name="scrollViewer" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    <Border BorderBrush="DarkGray" BorderThickness="1">
        <Canvas x:Name="canvas"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AllowDrop="True" Background="Transparent" PreviewDragOver="canvas_DragOver" PreviewDrop="canvas_Drop" Width="600" Height="500">
            <TextBlock x:Name="tb" AllowDrop="True" Text="WorkBench" TextAlignment="Center" Width="100" Height="20" Canvas.Left="258" Canvas.Top="0" ToolTip="Drag and Drop Tools Here" />
        </Canvas>
    </Border>
 </ScrollViewer>
4

0 回答 0