Skip to content

Instantly share code, notes, and snippets.

@mohamedmansour
Created May 10, 2014 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohamedmansour/7ee10782cad2046708f0 to your computer and use it in GitHub Desktop.
Save mohamedmansour/7ee10782cad2046708f0 to your computer and use it in GitHub Desktop.
Example of a popup control in Xaml with nice triangle
<Grid x:Name="LayoutRoot" Background="Transparent" Margin="0,55,0,0">
<Grid Background="White" Margin="0,10,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="20" Background="Transparent">
<TextBlock Text="Listening" FontSize="36" Margin="0"/>
</StackPanel>
<StackPanel Grid.Row="1" Margin="20" Background="Transparent" VerticalAlignment="Bottom">
<TextBlock Text="Home" FontSize="36" Margin="0,0,0,10"/>
<TextBlock Text="Profile" FontSize="36" Margin="0,0,0,10"/>
<TextBlock Text="Setting" FontSize="36" Margin="0,0,0,10"/>
</StackPanel>
</Grid>
<Polygon
Points="0,0 2,0 1,-1" Fill="White"
Width="20" Height="10" Margin="0,0,25,0"
Stretch="Fill" HorizontalAlignment="Right" VerticalAlignment="Top" />
</Grid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment