I have the following XAML defined.
<Popup x:Class="EMS.Controls.Dictionary.MapTip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
PopupAnimation="Slide"
AllowsTransparency="True" Placement="Mouse"
x:Name="root"
>
<Popup.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Popup.Resources>
<Viewbox x:Name="viewBox" IsHitTestVisible="True">
<Grid Background="Transparent" Name="mainGrid">
</Grid>
</Viewbox>
</Popup>
If I walk up the visual tree using VisualTreeHelper.GetParent from "mainGrid", I eventually get System.Windows.Controls.Primitives.PopupRoot, but never get the Popup itself. Anyone with a theory on why this is and what I can do about it? I neeed Popup and not PopupRoot.
TIA.
LogicalTreeHelper
is unable to reach the Popup as well the best one could do is try using the Name the "PopupRoot" to compare to GetType().Name
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With