devexpress buttonedit上的wpf风格

时间:2018-04-19 07:37:36

标签: wpf devexpress

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;

不匹配

1 个答案:

答案 0 :(得分:1)

您在解决方案中使用两种不同的devExpress版本吗? 如果是,这是已知的bug,尚未解决。 https://www.devexpress.com/Support/Center/Question/Details/T373315/wpf-theme-issue-targettype-does-not-match-type-of-element