0

我希望将现有的 ConfigurationsView(MVVM 的视图)停靠到一个空的 DocumentGroup。

这是我的 ConfigurationsView 的样子:

<!--ConfigurationsView-->
<UserControl
    x:Class="myWPF.Views.ConfigurationsView"
    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:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:mvvm="clr-namespace:myWPF.Mvvm"
    xmlns:utils="clr-namespace:myWPF.Utils"
    xmlns:views="clr-namespace:myWPF.Views"
    mc:Ignorable="d" 
    dx:ThemeManager.ThemeName="Office2007Blue"
    SnapsToDevicePixels="True" UseLayoutRounding="True" >

    <UserControl.Resources>
        <mvvm:DxColumnTemplateSelector x:Key="ColumnTemplateSelector"/>
    </UserControl.Resources>

    <Grid>
        <dxg:GridControl x:Name="GridControl" ShowBorder="False" 
            ColumnsSource="{Binding Path=GridColumns}"
            ColumnGeneratorTemplateSelector="{StaticResource ColumnTemplateSelector}" 
            TotalSummaryGeneratorTemplate="{StaticResource SummaryTemplate}"
            TotalSummarySource="{Binding SummaryColumns}"
            ItemsSource="{Binding GridItems}"
            SelectedItem="{Binding SelectedGridItem}">

            <dxg:GridControl.View>
                <views:TableView x:Name="TableView" FontSize="11" ShowGroupPanel="False"  ShowAutoFilterRow="True"
                    AllowBestFit="True" AllowEditing="False" NavigationStyle="Row" AutoWidth="False" AllowColumnFiltering="True" 
                    AllowFilterEditor="True" ShowTotalSummary="False" GroupSummaryDisplayMode="AlignByColumns" >
                </views:CvaTableView>
            </dxg:GridControl.View>
        </dxg:GridControl>

        <!-- Overlay a label with some hint text if there's a warning to show -->
        <utils:SplashScreen DataContext="{Binding}" />

    </Grid>
</UserControl>

我希望将此现有面板添加到一个空的 DocumentGroup,它可以充当多个现有面板的容器。我在网上做了一些研究,大多数文档面板示例只解释了如何停靠 DocumentPanels,而不是现有视图。请帮忙。

谢谢!

4

0 回答 0