In my application, there are two functions to add and clean image in PersonPicture
. However, I don't know of a way to clean up the image that has been added in the PersonPicture
. So, how to clean the image that has been added in the PersonPicture
?
Example of the code.
// Xaml file
<PersonPicture x:Name="UserProfile"/>
// Cpp file
void MyPage::AddImage(hstring const& path)
{
Windows::UI::Xaml::Media::Imaging::BitmapImage bitmap{ Windows::Foundation::Uri(path) };
UserProfile().ProfilePicture(bitmap);
}
void MyPage::ClearImage()
{
// Clean up the image that has been added in PersonPicture.
// However,
// How to do that here?
}