forum

home / developersection / forums / popup does not closed event stayopen set as false

Popup does not closed event Stayopen set as False

Anonymous User 1833 29-Jan-2014

I have use the following code snippet to define the Popup.

XAML:

  <Grid Margin="0,0,0,0"  Height="40">      
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="19" />
      <ColumnDefinition Width="19" />
    </Grid.ColumnDefinitions>
    <TextBlock HorizontalAlignment="Stretch"
               Text="HeaderText"                        
               FontWeight="Bold"
               TextTrimming="CharacterEllipsis"
               VerticalAlignment="Center"/>
       <Grid Grid.Column="1">
         <Button Width="19" x:Name="FilterButton" Click="FilterButton_OnClick" Content="^"/>
         <Popup x:Name="FilterPanel" StaysOpen="False"   >
           <Border >
             <Grid>
               <TextBlock x:Name="tblTitle" Text="PopUp Header" Background="Red" Grid.Column="0" Grid.Row="0"/>
             </Grid>
           </Border>
         </Popup>
       </Grid>
    <TextBox Text="Test" Grid.Column="2"/>
  </Grid>

I have use the following code snippet to open the popup

C#:

private void FilterButton_OnClick(object sender, RoutedEventArgs e)
{
     this.FilterPanel.IsOpen = true;
}

Scenorio:

Open the popup using button click.

Actual Behavior:

Popup does not close.

Expected Behavior:

Popup should be closed.

Thanks in advance.


c# c# 
Updated on 29-Jan-2014

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By