所以我有一个用 ControlPanelItem
定义的控件ShipmentGridView.xaml
<telerik:RadGridView x:Class="SmartShipping.BaseViews.ShipmentGridView"
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:local="clr-namespace:SmartShipping.MainRegionItems.CollectiveShipmentRegionItems"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:lang="clr-namespace:LanguageResources.Properties;assembly=LanguageResources"
>
<telerik:RadGridView.ControlPanelItems>
<telerik:ControlPanelItem >
...
</telerik:ControlPanelItem>
</telerik:RadGridView.ControlPanelItems>
我在其他视图中使用它是这样的:
FileImportView.xaml
<baseViews:ShipmentGridView IsReadOnly="True" x:Name="FileImportGrid">
现在我想添加一个新的ControlPanelItem,但我还想在那里找到旧的。有没有办法合并这两个收藏家?所以我可以这样:
<baseViews:ShipmentGridView IsReadOnly="True" x:Name="FileImportGrid">
<baseViews:ShipmentGridView.ControlPanelItems>
<OldCollection></OldCollection>
<telerik:ControlPanelItem>
...
</telerik:ControlPanelItem>
</baseViews:ShipmentGridView.ControlPanelItems>
</baseViews:ShipmentGridView>
还是其他方式?