Reputation: 4522
I am learning wpf technology. I have created such custom class, which should react on mouse up event (should show popup menu)
public class CustomControl : UIElement
{
protected override void OnMouseUp(MouseButtonEventArgs args)
{
ContextMenu context_menu = new ContextMenu();
// How to show context_menu at specific point?
}
};
I don't know how to show created context menu at speficic position. It don't have specified Show method. UIElement don't have appropriated ContextMenu property
Edit: I am not using XAML (I don't want create dependency between source code and design)
Upvotes: 0
Views: 196