Posted 16 years ago
by Peter Idestam-Almquist

Hello,
I wonder how to display a popup menu using a PopupButton.
I am trying this way:However, the menu background is incorrect.
Is there any better way to do the job?
Thank you!
I wonder how to display a popup menu using a PopupButton.
I am trying this way:
<Controls1:PopupButton Content="Control" Width="75" Margin="5 0 0 0">
<Controls1:PopupButton.PopupContent>
<Menu Width="75" IsMainMenu="False" >
<Menu.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</Menu.ItemsPanel>
<MenuItem x:Name="startMenuItem" Header="Start" IsEnabled="{Binding Path=CanStart}" Click="startMenuItem_Click" >
</MenuItem>
</Menu>
</Controls1:PopupButton.PopupContent>
</Controls1:PopupButton>
Is there any better way to do the job?
Thank you!