2

I have modified the ControlTemplate for ComboBoxEdit like this (in App.xaml):

<ControlTemplate x:Key="CustomComboBoxEditTemplate" TargetType="{x:Type dxe:ButtonEdit}">
           ...
</ControlTemplate>
<Style TargetType="{x:Type dxe:ComboBoxEdit}">
   <Setter Property="Template" Value="{StaticResource CustomComboBoxEditTemplate}"/>
</Style>

For 1 Control in I need the original. How can I set the original template for only 1 control?

<dxe:ComboBoxEdit Name="PART_Editor" ItemsSource="{Binding ...}"
   Template="What can I write here?">
</dxe:ComboBoxEdit>
4

1 回答 1

2

您可以将 Style 属性设置{x:Null}为使用默认样式:

<dxe:ComboBoxEdit Name="PART_Editor" ItemsSource="{Binding ...}" Style="{x:Null}" />

当然,这假定控件实际上具有默认样式。

于 2017-01-30T10:51:55.977 回答