0
使用MVVM時,Images文件夾應位於Project文件夾下或View下作爲子文件夾?wpf將項目子文件夾移動到不同的位置
我本來有項目文件夾下的圖像文件夾:
ImageBrush ImageSource="/DataTransfer;component/Images/image1.png"
,一切工作正常。
接我一招查看文件夾下的圖像文件夾中去,我註明:
ImageBrush ImageSource="/DataTransfer/View/Images/image1.png"
它拋出:
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)
......
什麼我需要做修復它?