3
I defined the visibility of my combobox as Collapsed, for visual reasons and since Appbarbutton is more presentable. I want to know if it is possible to call the combobox event by firing an Appbarbutton event?
Something like:
private void teste_click(object sender, RoutedEventArgs e)
{
private void combobox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{ ...
} }
or
<AppBarButton x:Name="teste" HorizontalAlignment="Left" Icon="Undo" Label="" Margin="11.5,12,0,0" Grid.RowSpan="3" VerticalAlignment="Top" Click="combobox1_SelectionChanged" Grid.Column="1"/>
Why call it in? To my knowledge, when an element becomes visible, all the events associated with it become valid, not needing to place an event inside the other. If you want to dynamically assign the event, just put:
meuObjeto_MeuHandler += Nome_Do_Handler;
– Felipe Avelar