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:
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
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.
精彩评论