I have a Window with several Frame controls and would like to find the Bounds/Rectangle of the controls at runtime. They go into a grid on the window using XAML with Height/Width/Margin attributes.
The Frame control doesn’t have Bounds, Rect, Top or Left properties.
The purpose is to test each frame to see if the mouse is inside when other events occur. My current work around is to set/clear boolean flags in the MouseEnter and MouseLeave handlers but there must be a better way. It could be obvious because I am new to C# WPF and .NET.
Why don’t you just test the IsMouseOver or IsMouseDirectlyOver properties ?