开发者

ContentTemplate does not work with DXWindow?

I want to use a ContentTemplate property with my window. First I tried it with standard Window class:

<Window.ContentTemplate>
    <DataTemplate>
        <DockPanel LastChildFill="true">
            <TextBlock DockPanel.Dock="Top">Hello world</TextBlock>
            <ContentPresenter Content="{Binding}" />
        </DockPanel>
    </DataTemplate>
</Window.ContentTemplate>
<Button>TestButton</Button>

This works the way I want:

ContentTemplate does not work with DXWindow?

Now try to do the same thing with DXWindow (I'm using DevExpress 10.2.4 version):

<dx:DXWindow.ContentTemplate>
    <DataTemplate>
        <DockPanel LastChildFill="true">
            <TextBlock DockPanel.Dock="Top">Hello world</TextBlock>
            <ContentPresenter Content="{Binding}" />
        </DockPanel>
    </DataTemplate>
</dx:DXWindow.ContentTemplate>
<Button>TestButton</Button>

But this does not work, looks like this property is ignored

ContentTemplate does not work with DXWindow?

Is it possible to fix this behavior开发者_开发技巧?

Thank you.


I see the problem with this xaml (it fails with error in the latest version (10.2.5)):

The DXWindow.ContentTemplate with the ContentPresenter raises exception

We will fix this issue in the future.

Could you please explain why you are using ContentTemplate and do not want to add both controls directly to DXWindow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜