I'm developing my first UWP app and I have a question about what is better between Symbol Icon and buttons: in my home page I have three icons at the bottom, one to start phone dialer, one for e-mail and one for map. They are inside a Grid with three columns.
My first approach was to use a Button and then put the SymbolIcon within it so to have the icon appear, but this caused my layout not to work properly: I then decided to leave only SymbolIcons and assign to each of them a Tapped event. Is this a correct way of proceding or would it be better to use a Button with its Onclick event?
This is my code:
<Grid Background="#0099FF" Height="52" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<SymbolIcon Symbol="Phone" x:Name="PhoneButton" Grid.Column="0" Foreground="White" Tapped="PhoneButton_Tapped" />
<SymbolIcon Symbol="Mail" x:Name="MailButton" Grid.Column="1" Foreground="White" Tapped="MailButton_Tapped" />
<SymbolIcon Symbol="Map" x:Name="MapButton" Grid.Column="2" Foreground="White" Tapped="MapButton_Tapped" />
</Grid>
My first approach was to use a Button and then put the SymbolIcon within it so to have the icon appear, but this caused my layout not to work properly: I then decided to leave only SymbolIcons and assign to each of them a Tapped event. Is this a correct way of proceding or would it be better to use a Button with its Onclick event?
This is my code:
<Grid Background="#0099FF" Height="52" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<SymbolIcon Symbol="Phone" x:Name="PhoneButton" Grid.Column="0" Foreground="White" Tapped="PhoneButton_Tapped" />
<SymbolIcon Symbol="Mail" x:Name="MailButton" Grid.Column="1" Foreground="White" Tapped="MailButton_Tapped" />
<SymbolIcon Symbol="Map" x:Name="MapButton" Grid.Column="2" Foreground="White" Tapped="MapButton_Tapped" />
</Grid>