Hey there,
I have an Image that represents a button, and I created a ContextMenu to drop down when image is clicked. I have also added some StackPanels to the ContextMenu and I added Image and Textblock to each Stackpanel so they pretend as menu items.
Look at my work:
So, the problem is that I need to get click from the menu item, not just from Stackpanel, because Stackpanel is smaller than the width of menu item.
Here's my XAML:
Please help!<Image x:Name="Sucelje_Slika_Datoteka" MouseUp="DatotekaMeni_Klik" ContextMenuService.IsEnabled="False" HorizontalAlignment="Left" Height="29" VerticalAlignment="Top" Width="76"><Image.ContextMenu><ContextMenu> <StackPanel Orientation="Horizontal" Width="240"><Image Source="Resources/NoviDokumentIkona.png" Width="30" Height="30"/><TextBlock Text="Novi dokument..." Margin="10,0,0,0" FontFamily="Titillium" FontSize="16" VerticalAlignment="Center"/></StackPanel><StackPanel Orientation="Horizontal"><Image Source="Resources/OtvoriDokumentIkona.png" Width="30" Height="30"/><TextBlock Text="Otvori dokument..." Margin="10,0,0,0" FontFamily="Titillium" FontSize="16" VerticalAlignment="Center"/></StackPanel>
</Image>
Knowledge: C, C++, C#, Java, Pawn