WPF 容器拉伸内容
我有以下 XAML
<TabPanel>
<TreeView HorizontalAlignment="Left" Margin="0,0,0,0" Name="treeView1" MinWidth="212" SelectedItemChanged="treeView1_SelectedItemChanged" MinHeight="467" />
<ScrollViewer Margin="0,0,0,0" Name="scrollViewer1" HorizontalAlignment="Stretch" >
<ContentControl Name="gridView" />
</ScrollViewer>
</TabPanel>
Scrollviewer 不会拉伸到选项卡面板的剩余部分。有谁知道如何实现这一目标?
尼尔.
I have the following XAML
<TabPanel>
<TreeView HorizontalAlignment="Left" Margin="0,0,0,0" Name="treeView1" MinWidth="212" SelectedItemChanged="treeView1_SelectedItemChanged" MinHeight="467" />
<ScrollViewer Margin="0,0,0,0" Name="scrollViewer1" HorizontalAlignment="Stretch" >
<ContentControl Name="gridView" />
</ScrollViewer>
</TabPanel>
The Scrollviewer does not stretch to the remaining with of the Tab panel. Does anyone have any idea how to achieve this?
Neil.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ContentControl 控制 ScrollViewer 的宽度。试试这个:
Your ContentControl is what controls the width of your ScrollViewer. Try this: