簡體   English   中英

在xaml中將DockLayoutManager與視圖模型文件綁定

[英]Binding DockLayoutManager in xaml with view model file

我想將Xaml中的DockLayoutManager綁定到ViewModel。 DockLayoutManager的什么屬性將幫助我完成此綁定。

<dxdo:DockLayoutManager  ItemsSource="{Binding DockLayoutManager1,  Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}"  dxdo:RestoreLayoutOptions.RemoveOldPanels="False" dxdo:RestoreLayoutOptions.RemoveOldLayoutControlItems="False"  FloatingMode="Desktop" Margin="0,54,0,0">
            <dxdo:LayoutGroup>

            </dxdo:LayoutGroup>
        </dxdo:DockLayoutManager>

`

項目來源對我沒有幫助。 在調試時,當我向ockeroutoutmanager中添加某些內容時,它會給出異常。 由於DockLayoutManager為NULL。 請提供解決方案。

ItemsSource屬性用於綁定停靠UI是正確的。 但是您應該從ViewModel方面提供其他基礎結構。 要獲得確切的解決方案,請遵循MVVM支持-構建Dock UI文章和如何:使用MVVM模式示例構建Dock UI中所述的方法 還請查看相應的產品演示

相關文章:
如何在MVVM應用程序中使用IMVVMDockingProperties接口。

JFI-先進的MVVM概念(例如,具有Docking UI):
MVVM框架
文件管理器服務文件管理系統
DockingDocumentUIService
如何:使用WindowedDocumentUIService,TabbedDocumentUIService,DockingDocumentUIService和FrameDocumentUIService

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM