I have a ToggleButton which when clicked, sets the IsActionMenuOpen to true so that the popup can be displayed. What my desired outcome would be that the placement for the popup would be to the bottom right like here. Any ideas on how to do this? Also, if the window is being resized, can a solution be found so that the popup will move as well?
<ToggleButton x:Name="PART_TGAction">
<ToggleButton.Template>
<ControlTemplate>
<TextBlock x:Name="PART_SubjectActions"
Text="Actions"
Margin="4,0,0,0"
PreviewMouseLeftButtonDown="PART_SubjectActions_PreviewMouseLeftButtonDown"
/>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Popup IsOpen="{Binding IsActionMenuOpen, Mode=OneWay}"
x:Name="PART_Popup">
<Border Background="White">
......
</Border>
</Popup>
I was able to get this to work by placing it in the Loaded event of the UserControl: