Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Come across InvalidOperationException When setting the uri of Imageselector #132

Closed
IShiraiKurokoI opened this issue Mar 17, 2022 · 2 comments

Comments

@IShiraiKurokoI
Copy link

IShiraiKurokoI commented Mar 17, 2022

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
image

Environment (please complete the following information):

  • .net: 4.7.2
  • IDE vs2022
  • Version 3.3.0
@IShiraiKurokoI
Copy link
Author

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

@ghost1372
Copy link
Owner

#48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants