My app has a appbar 2 button, the click event for the first button works, but not for the second (does not enter the event). Following code:
private void AddTipoDespesa_Click(object sender, RoutedEventArgs e)
{
ucFlyoutAddTipoDespesa fatd = new ucFlyoutAddTipoDespesa();
fatd.Show();
}
<Page.BottomAppBar>
<AppBar x:Name="barBottom" LostFocus="barBottom_LostFocus">
<StackPanel Orientation="Horizontal" >
<Button x:Name="addConta" Content="Add Conta" VerticalAlignment="Stretch" ToolTipService.ToolTip="Adiciona nova conta" Click="addConta_Click" Margin="0,0,10,0"/>
<Button Name="AddTipoDespesa" Content="Add Tipo Despesa" VerticalAlignment="Stretch" ToolTipService.ToolTip="Adiciona novo tipo de despesa" Click="AddTipoDespesa_Click"/>
</StackPanel>
</AppBar>
</Page.BottomAppBar>
The project is a app for windows 8, I'm using vs2012.
Does the event AddTipoDespesa_Click excist? Otherwise try the event addConta_Click also to the 2nd button. If this works you need to check AddTipoDespesa_Click
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.