Sometimes when i open a particular context menu on a button and then press another button the whole window goes black except for a rectangle. When i minimize and maximize or move the window to another screen the window repaints. I am registered to the button and context menu's events and it include some work like changing bounded properties and so forth. Is it my fault, (and if it is, how can i fix it?) or it's a framework bug?
Update (23.07): I avoided the problem in that specific area, but i still don't know much about it. I had a ListBox with a ContextMenu on top of it. The ListBox'es visibility was bounded to a certain property, when it had one value the ListBox was Visible and when it had another value it was Collapsed. The ContextMenu's MenuItem Changed the property that in turn changed the visibility. Sometimes when the visibility was changed to Collapsed the whole screen turned black. After playing around with it I noticed that it doesn't happen in Hidden so now i use Hidden instead of Collapsed. I guess rearranging the controls after collapsing one in the middle was the problem.