Symbol Icon with event or Button?

Uff182

New member
Feb 17, 2014
31
0
0
Visit site
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>
 

Uff182

New member
Feb 17, 2014
31
0
0
Visit site
Have you tried to put the symbolicon in the content of the button?

Hi Vittorio, because of a lack of time I didn't go on with my project: I think there should be better and more efficient way of working compared to the way I was trying, thanks anyway for the suggestion. :)
 

Members online

Forum statistics

Threads
326,660
Messages
2,248,721
Members
428,535
Latest member
cotton-vegan-afoot