left button context menu
-
Hello, I have a popup which is opened on button click.
<Popup Name="MenuPopUp" IsOpen="False" PlacementTarget="{Binding ElementName=dropDownbtn}" Placement="Top" LostFocus="MenuPopUp_LostFocus" MouseLeftButtonDown="MenuPopUp_MouseLeftButtonDown">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<MenuItem Grid.Row="0" Name="ViewReportItem" Header="View Report" Command="{Binding ViewReportCommand}"/>
<MenuItem Grid.Row="1" Name="ExportReportItem" Header="Export Report" Command="{Binding ExportReportCommand}"/>
<MenuItem Grid.Row="2" Name="AbortReportItem" Header="Abort Report" Command="{Binding AbortReportCommand}"/>
</Grid>
</Popup>I want the popup to stay on screen unless i click somewhere else in the UserControl. This UserControl is small part of a big UserControl which is working using MVVM and PRISM How can i do it?