1
我想在Layout面板中添加两个ComboBoxes,如下面的代码所示。XAML - LayoutPanel属性'Content'被设置多次
但是我遇到一个错误 - “属性'内容'被设置多次”。如何在布局中添加两个组合框?
<!--User Control Layout-->
<dxdo:LayoutGroup x:Name="LayoutGroupTopLevel">
<dxdo:LayoutGroup x:Name="GridViews" ItemWidth="1*" Orientation="Vertical" AllowClose="True" AllowDock="True" AllowFloat="True" AllowHide="True">
<dxdo:LayoutPanel x:Name="Layers" Caption="User Control" ItemHeight="1*">
<dxdo:LayoutGroup>
<dxlc:LayoutItem Label="Plan Type">
<dxe:ComboBoxEdit Height="25" VerticalAlignment="Top" Width="200" Name="BoxEdit">
<dxe:ComboBoxEditItem Content="3 month"/>
<dxe:ComboBoxEditItem Content="2 year"/>
</dxe:ComboBoxEdit>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="Site">
<dxe:ComboBoxEdit Height="25" VerticalAlignment="Top" Width="200" Name="BoxEdit1"/>
</dxlc:LayoutItem>
</dxdo:LayoutGroup>
</dxdo:LayoutPanel>
<dxdo:LayoutPanel x:Name="LayoutPanel" Caption="Properties" ItemHeight="1*">
<dxlc:LayoutItem Label="Site">
<dxe:ComboBoxEdit Height="25" VerticalAlignment="Stretch" Width="200" Name="ComboBoxEdit"/>
<dxe:ComboBoxEdit Height="25" VerticalAlignment="Stretch" Width="200" Name="ComboBoxEdit1"/>
</dxlc:LayoutItem>
</dxdo:LayoutPanel>
</dxdo:LayoutGroup>
任何人都可以指出我犯的错误吗?
为u建议我改变了代码和我已经编辑它上面为好。但我仍然得到这个错误 - “一个'LayoutItem'类型的值不能被添加到'BaseLayoutItemCollection'类型的集合或字典中。 – Dazzler
是的,我正在使用DevExpress WPF控件套件。 – Dazzler
非常感谢,像一个魅力:) – Dazzler