У меня есть следующий XAML:
<Grid>
<Rectangle x:Name="RedRect" Fill="Red" Width="100" Height="100" Margin="362,245,316,216"></Rectangle>
<Rectangle x:Name="GreenRect" Fill="Green" Width="200" Height="200" Margin="118,46,460,315"></Rectangle>
<Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
</Grid>
и следующий код:
private void button1_Click(object sender, RoutedEventArgs e)
{
IntersectionDetail res = GreenRect.RenderedGeometry.FillContainsWithDetail(RedRect.RenderedGeometry, .000001, ToleranceType.Relative);
Debug.WriteLine(res);
}
Результатом является IntersectionDetail.FullyContains, что означает, что GreenRect полностью содержится в RedRect (насколько я понимаю). Но представленное представление показывает иначе:
![Rendered View](https://i.stack.imgur.com/nmRYM.png)
Почему это?