how to add stackpanel as menuflyoutitem in UWP?
what i have tried is?
menuflyoutitem.content=stackpanel;
how to add stackpanel as menuflyoutitem in UWP?
what i have tried is?
menuflyoutitem.content=stackpanel;
MenuFlyoutItem does not support complex layouts. If you want to place multiple elements with the help of StackPanel, please use Flyout.
<Flyout x:Name="TestFlyout">
<StackPanel>
<!-- other code -->
</StackPanel>
</Flyout>
Update
If you want to display the picture icon, you can use BitmapIcon:
<MenuFlyout x:Name="TestFlyout">
<MenuFlyoutItem Text="Merge">
<MenuFlyoutItem.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/your_image.png" Width="20" Height="20"/>
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>