我正在使用Avalonia创建一个应用程序,其中一些UI组件在另一个程序集中以便于重用。在这个额外的程序集中,我想要有一个Resource.xml文件,被应用程序项目和其他项目引用。它包含样式等内容。
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Style x:Key="normal_button" Selector="Button.normal_button">
<Setter Property="Margin" Value="0" />
<Setter Property="Height" Value="25" />
<Setter Property="MinWidth" Value="75" />
</Style>
</ResourceDictionary>
错误:
Unable to find suitable setter or adder for property Content of type Avalonia.Styling:Avalonia.Controls.ResourceDictionary for argument Avalonia.Styling:Avalonia.Styling.Style, available setter parameter lists are: ...
我做错了什么?.csproj文件中是否有必要的条目?