0

according to this question. I prepare stack panel with 4 textboxes and button. When the user open application bar i change the margin in stackpanel to fit it to the top of application bar and here is the problem.

If the application bar is open and I try to click on the button which is on the stackpanel, instead of invoking the click event, the application bar became closed. The code from click event isn't invoked at all.

Here is my code in xaml:

<StackPanel x:Name="SummerizePanel" Grid.Row="2" Margin="0,0,0,0" Orientation="Horizontal" Style="{StaticResource StackPanelStyle1}">

        <StackPanel  Orientation="Vertical" Margin="10,0,0,0">
            <TextBlock Text="pay:" Foreground="Black" />
            <TextBlock Text="0.0  " x:Name="payment" FontSize="40"></TextBlock>
        </StackPanel>
        <StackPanel Orientation="Vertical" Margin="10 0 0 0" >
            <TextBlock Text="how:" Foreground="Black" />
            <TextBlock Text="0" FontSize="40" x:Name="acc"></TextBlock>
        </StackPanel>
        <Button
            Margin="30 0 0 0" Width="167"  Background="Black" Click="GoToCheckout_Click"  Content="Go there">
        </Button>
    </StackPanel>
</Grid>
<phone:PhoneApplicationPage.ApplicationBar >
    <shell:ApplicationBar x:Name="option_bar" StateChanged="ApplicationBar_StateChanged"  BackgroundColor="#FFCB0505" Mode="Minimized"  Opacity="1" >
        <shell:ApplicationBar.MenuItems  >                
            <shell:ApplicationBarMenuItem Text="Kupony"/>
            <shell:ApplicationBarMenuItem Text="My account" Click="Update_Click"/>
            <shell:ApplicationBarMenuItem Text="Log out" Click="logout_Click"/>
        </shell:ApplicationBar.MenuItems>
    </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

Is there any possibility to make it clickable when the application bar is open?

Community
  • 1
  • 1
MyWay
  • 1,011
  • 2
  • 14
  • 35

1 Answers1

0

Try adding after StateChanged="ApplicationBar_StateChanged":

Click="Click_Show"

And in code in the function Click_Show change the desired button options

BestR
  • 669
  • 2
  • 6
  • 17