就我而言,我必须更改来源Image元素。它有ico文件,但 XP 不能将其作为此类元素的源。
<Image Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" Width="48" Height="48" VerticalAlignment="Center"
Source="Resources/Images/favicon.ico" />
我必须将其更改为并制作特定的 PNG 文件
<Image Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" Width="48" Height="48" VerticalAlignment="Center"
Source="Resources/Images/favicon-256.png" />
我的错误是:
Exception: Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception. PresentationFramework at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)