Describe the bug
Come across InvalidOperationException When setting the uri of Imageselector
To Reproduce
if (File.Exists(Properties.Settings.Default.str1))
{
pictureBox1.Uri = new Uri(Properties.Settings.Default.str1);
}
picturebox1 is the name of a imageselector
Expected behavior
System.InvalidOperationException:““Uri”属性注册为只读属性,不使用身份验证密钥则无法修改。”
System.InvalidOperationException:“the 'URI' property is registered as a read-only property and cannot be modified without an authentication key.”
Screenshots
Environment (please complete the following information):
I solve the fuction I want by setting the background to a imagebrush and set it null in imageselected, but I still think the uri{get;set} should be able to be set in the backend
Describe the bug Come across InvalidOperationException When setting the uri of Imageselector
To Reproduce if (File.Exists(Properties.Settings.Default.str1)) { pictureBox1.Uri = new Uri(Properties.Settings.Default.str1); }
picturebox1 is the name of a imageselector
Expected behavior System.InvalidOperationException:““Uri”属性注册为只读属性,不使用身份验证密钥则无法修改。” System.InvalidOperationException:“the 'URI' property is registered as a read-only property and cannot be modified without an authentication key.”
Screenshots
Environment (please complete the following information):