Wpf 阿瓦隆码头v2布局问题
我目前正在使用avalon dock v2,在我的文档源的模板中,我还加入了一个停靠管理器 是的,对于我的每一个文档,我希望里面有固定的窗格。但是,当我尝试这样做时,它不起作用,它只显示每个文档的对接管理器的toString,是否有办法解决这个问题 另外,我如何默认停靠我的锚点 感谢和问候,Wpf 阿瓦隆码头v2布局问题,wpf,avalondock,Wpf,Avalondock,我目前正在使用avalon dock v2,在我的文档源的模板中,我还加入了一个停靠管理器 是的,对于我的每一个文档,我希望里面有固定的窗格。但是,当我尝试这样做时,它不起作用,它只显示每个文档的对接管理器的toString,是否有办法解决这个问题 另外,我如何默认停靠我的锚点 感谢和问候, Kev84在为AvalonDock的LayoutDocument创建模板时(通过LayoutDocumentControl),我也遇到了类似的问题。解决方案是将ContentPresenter的Conten
Kev84在为AvalonDock的LayoutDocument创建模板时(通过LayoutDocumentControl),我也遇到了类似的问题。解决方案是将ContentPresenter的ContentSource设置为指向控件的Model属性。下面的代码对此进行了说明:
<!--The LayoutDocument is templated via the LayoutDocumentControl-->
<Style TargetType="{x:Type ad:LayoutDocumentControl}">
<Style.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ad:LayoutDocumentControl}">
<ScrollViewer
Background="AliceBlue"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" SnapsToDevicePixels="True">
<!--Make sure that the ContentSource points the Model Property of the Control-->
<ContentPresenter
Content="{Binding Path=Content, UpdateSourceTrigger=PropertyChanged}"
ContentSource="{Binding Path=Model, UpdateSourceTrigger=PropertyChanged}"
/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
类似的方法应该适用于您的案例。这只是一个诱人的答案(因为我对Avalondock2.0也是新手),但可能值得一试
长命百岁