is FrameworkElement rendered or not?
Is there a way to know is certain FrameworkElement
was rendered to the screen. For example. I have two rectangles, and one overlap other. But I'm not sure about "how much" one overlap other.
So I need to know is user will see both rectangles, or will see only one, or will see one fully 开发者_JAVA百科and one partially?
It all depends on what kind of parent container it is, if both rectangles are inside StackPanel
then they will not, you have to either make a custom container or use canvas as parent of these rectangles.
Then you can get LocalToScreen or such similar methods to get their absolute positions compared to screen or top parent window and find out whether they overlap or not.
精彩评论