Is there a way of adding a custom menu annotation to properties? I want to add a functionality using a menu annotation. It would be nice if that custom menu item is shown on editors when right clicked on property.
Hi @btyilmaz ,
This is definitely possible. I think you need to make a menu model factory, I am a bit fuzzy on the details.
Anyway, I think this example does what you want:
//Copyright 2012-2021 Keysight Technologies
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
using System.ComponentModel;
using System.Linq;
namespace OpenTap.PluginDevelopment.Advanced_Examples
{
// Icon annotations can be used to provide custom context menu / right-click functionality
This file has been truncated. show original
It should also be in the examples from the SDK package (Advanced Examples).
1 Like