0

有人使用过可重复使用的免费主题,特别是“inc.xaml”吗?如果是的话,你能帮我解决这个问题吗?我从 nukeation 下载的示例正在使用mercury.xaml并且工作正常,但是当我更改为 inc.xaml 时,出现了一些错误。问题是编译器无法识别名为“incbutton”的样式。下面是我的代码:

<!--App.xaml-->
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="GeminiSampleProject.App"
StartupUri="MainWindow.xaml">
<Application.Resources>
    <!-- Resources scoped at the Application level should be defined here. -->
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/ReuxablesLegacy;component/inc.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

//fragment of code that fire error
<Button Content="Button" HorizontalAlignment="Left" Height="25" Margin="33,16.08,0,0" VerticalAlignment="Top" Width="80" Style="{StaticResource IncButton}" />
4

1 回答 1

0

我有同样的问题,我认为静态资源“IncButton”在inc.xml中不存在,但它存在于mercery.xml中。

我的问题是一样的,但是另一个静态资源,我检查了 .dll 文件,发现该资源只存在于 Mercery 中,而不存在于 inc 中。

br/J

于 2013-04-11T12:01:48.823 回答