Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 206093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:36:53+00:00 2026-05-11T17:36:53+00:00

N.B THIS QUESTION HAS BEEN UPDATED, READ FURTHER DOWN Hi, I want to create

  • 0

N.B THIS QUESTION HAS BEEN UPDATED, READ FURTHER DOWN

Hi,

I want to create a custom context menu that has 4 sub-menus, each in their own quadrant (top left, top right, bottom left, bottom right). Similar to 3ds Studio Max.

This is how I’ve approached the issue so far:
– create a custom WPF control, derive from ContextMenu[1]
– declare 4 dependency properties of ContextMenu, these will be menus displayed and can be set from XAML.
– AddOwner to the ContextMenu.IsOpenProperty, adding a property changed notification.
– when the IsOpen property changes set the IsOpen property of 4 child context menus.
– using ContextMenuService set the Vertical and Horizontal offsets of the context menus to make them appear in each quadrant; binding the actual height and width properties to calculate the offsets.

[1] Need to derive from context menu otherwise you cannot assign it to the ContextMenu property on the Window.

This appears to work, there are issues with the menus NOT staying open (they’re being closed as the focus is outside the menu) but I’m sure using Reflector.NET find a way around this.

This is my first custom WPF control that I’ve attempted to write; and not sure if this is best approach.

Any suggestions/ideas on how to create this Quad Context menu?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:36:53+00:00Added an answer on May 11, 2026 at 5:36 pm

    UPDATE

    OK. After playing around with custom controls I have something that is working better than before. All menus now stay open.

    What I’ve done:
    – created custom control named QuadContextMenu deriving from ContextMenu, override the default style key.
    – the style for the control has 4 popup primitives:
    – each with PART_ name so I get a reference to them when the OnApplyTemplate.
    – each has child QuadMenu, which is custom control deriving from MenuBase.
    – each has their VerticleOffset and HorizontalOffset properties binding to the ActualHeight and ActualWidth of the child [2].

    QuadMenu Style/Control Template:
    – has a classic border with a dockpanel, and a border with a textblock to put the menu name.

    [2] How to position the menus into the Quad:
    – TopLeft is offset negative the actual width and height
    – TopRight is offset negative the actual height
    – BottomLeft is offset negative the actual height
    – BottomRight is NOT offset and is in it’s original location

    alt text

    NEW QUESTIONS/ISSUES

    These are the next challenges to making this control:
    1. at the moment keyboard and mouse is locked/captured by the first menu you focus on and the others are not available by hovering over them. which means you can only use 1 of the menus.
    2. flip the MenuItem so that for the TopLeft/BottomLeft the submenu opens on the left hand side.

    I’ve already attempted to replace the menu item by overriding the GetContainerForItemOverride methods to return QuadMenuItem. QuadMenuItem is a custom control derive from MenuItem. When I do this however I lose the submenus functionality which is frustrating.

    If anyone has any tip/tricks/suggestions on how to tackle these issues it would greatly appreciated! 😀 Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question has been asked in a C++ context but I'm curious about Java.
I know this question has been asked several times and I read those with
I know that this question has been asked many times ( but in different
This question has been asked before but i still don't understand it fully so
This question has been bugging me for a long time now but essentially I'm
This question has been puzzling me for a long time now. I come from
This question has been asked in various forms in a number of different forums,
This question has been bugging me for some time. I always picture launching my
This question has been asked before but the answers aren't always clear or are
This question has been bugging me for some time. I've already developed a couple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.