我是XAML的新手,正在尝试创建一个基本功能区。我这里有一些代码:LargeImageSource抛出异常
<RibbonWindow x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="clr- namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
Title="MainWindow"
x:Name="RibbonWindow"
Width="640" Height="480">
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Ribbon x:Name="Ribbon" Title="Ribbon Title">
<r:RibbonButton Width="100" Background="Azure" Height="100" >
</r:RibbonButton>
<r:RibbonButton x:Name="RibbonButton" Label="Button" LargeImageSource="Icons/disk.png">
</r:RibbonButton>
</Ribbon>
</Grid>
我得到的代码的LargeImageSource部分例外。我不知道为什么。图像在设计器中呈现,构建时不会生成错误,但我无法运行该项目。
这里是例外:
类型 'System.Windows.Markup.XamlParseException' 的未处理的异常发生在PresentationFramework.dll
其他资料: '提供关于值' System.Windows.Baml2006。 TypeConverterMarkupExtension'抛出一个异常。'行号“19”和行位置“51”。
如果有这种异常的处理程序,程序可能会安全地继续。
任何帮助,将不胜感激。
问候