'在'system.windows.baml2006.typeconvertermarkupextension上提供值。线号'12'和线位置'18'。
<Window x:Class="Gasoline.Style.BaseWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BaseWindow" Height="300" Width="300" ResizeMode="NoResize" WindowStyle="None" BorderBrush="Black">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="26"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DockPanel LastChildFill="False" Height="26">
<DockPanel.Background>
<ImageBrush ImageSource="/Resources/FrameTitle.png"/>
</DockPanel.Background>
</DockPanel>
</Grid>
</Window>
,原因是:
<ImageBrush ImageSource="/Resources/FrameTitle.png"/>
我在这里做错了什么?
一旦我给刷子一个映像源(即使是通过属性窗口,也会创建不同的值),当我启动应用程序时,它会引发该错误。
设计师工作正常。
可能的解决方案/提示:
1-每次获得"提供值"异常的例外时,请尝试查看Innerexception以找到根部异常。
2-确保您的映像文件在其构建操作中设置为"资源"。您不需要"复制到输出目录"。
3-如果其他一切都失败了,请尝试使用PACK URI语法