c# - UIElement position relative to Window -
In WPF, I want to get the corner position of
TabControl
in my code, so I < / P> How do I get the given UIElement
?
buildingInfoWindow = new BuildingInfoWindow (); // Building Window: System.Windows.Window Building InfoWindow.Owner = This; //buildingInfoWindow.Left = ?; // X coordination relative to my TabControl // Building INFOWindow.Top = ?; // My TabControl relative y coordinate
point pt = tabControl.TranslatePoint (New point (0, 0), inside the window);