xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
.
.
<Style x:Key="ButtonEditInSearchCriteriaStyle" TargetType="dxe:ButtonEdit">
<Setter Property="Height" Value="25"/>
<Setter Property="Width" Value="100"/>
<Setter Property="NullValueButtonPlacement" Value="EditBox"/>
<Setter Property="AllowDefaultButton" Value="False"/>
</Style>
.
.
<dxe:ButtonEdit Grid.Row="1"
Grid.Column="3"
Style="{StaticResource ButtonEditInSearchCriteriaStyle}"/>
我在Style =&#34; {StaticResource ButtonEditInSearchCriteriaStyle}&#34;
上收到错误错误讯息: &#39; ButtonEdit&#39; Targettype与元素类型&#39; ButtonEdit&#39;
不匹配答案 0 :(得分:1)
您在解决方案中使用两种不同的devExpress版本吗? 如果是,这是已知的bug,尚未解决。 https://www.devexpress.com/Support/Center/Question/Details/T373315/wpf-theme-issue-targettype-does-not-match-type-of-element