C#/UWP Button content (picture) suddenly gets changed

Jan 6 Reputation points
2021-04-14T13:04:03.143+00:00

Hi @ all,

once more, I've found strange behavior of an UWP/C# application I developed.

The image within button content suddenly (rarely, occasionaly, in one of 1000 application runs) changes to the another one from solution assets. 87832-image.png

Normal (coded) look of button: 87650-image.png

There's no code within whole app affecting the button content. The button content is set just once in XAML: 87806-image.png

Of course, I've rechecked multiple times the code related to this button. At runtime, only visibility property gets changed from time to time: 87788-image.png

How can I prevent such occasional issue?

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.