To remove the chevron arrow I use FlyoutBase.AttachedFlyout
in place of AppBarButton.Flyout
, and I open the flyout with the AppBarButton.Click
event handler.
<AppBarButton Click="AppBarButton_OnClick">
<FlyoutBase.AttachedFlyout>
<Flyout x:Name="RulesFlyout">
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
<Setter Property="Background" Value="#E6E6E6"/>
</Style>
</Flyout.FlyoutPresenterStyle>
<StackPanel>
<StackPanel Margin="0,5,0,0">
<SymbolIcon Symbol="Cancel" Foreground="#7B7B7B" IsTapEnabled="True" PointerPressed="SymbolIcon_PointerPressed" MaxHeight="10" MinHeight="10" HorizontalAlignment="Right" VerticalAlignment="Top" PointerEntered="Button_PointerEntered" PointerExited="Button_PointerExited"/>
<TextBlock Text="Rules" FontSize="12" HorizontalAlignment="Left" FontWeight="SemiBold" FontFamily="Segoe UI" Margin="0,-15,0,-50"/>
</StackPanel>
</StackPanel>
</Flyout>
</FlyoutBase.AttachedFlyout>
</AppBarButton>
and
private async void AppBarButton_OnClick(object sender, RoutedEventArgs e)
{
FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
}