We are not exactly sure that we completely understand the desired by you functionality. Would you like to apply RadContextMenu
to the whole RadAutoCompleteBox
or just for the items?
From you initial post it seems you are trying to apply it to the control itself which is an appropriate approach. The reason why it does not get set as expected is because the WatermarkTextBox
control that is placed inside RadAutoCompleteBox
provides its own ContextMenu
So, one possible approach that we could suggest you in order to achieve the desired is by using the ChildrenOfType<T>
to iterate through the visual tree of RadAutoCompleteBox
and find the WatermarkTextBox
. After that you need to set its ContextMenu
property to null in order to disable the default native WPF ContextMenu and set the desired RadContextMenu
We have created a sample project that demonstrates the described above approach - please, check it and let us know if it worked for you. If not please, provide us some more information on when exactly you expect the menu to appear and where.
Hope this helps.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items