Open kirsan31 opened 1 year ago
Any response on this?
@KlausLoeffelmann can you help with similar problem please? 🙏 The code above from CollectionEditor
where we have ShowHelp
method to change opening link, but how to achieve same result on control properties itself? If we press F1
here:
I can't find any information about it 🤔😳
Is there any hope this could happen? At least point 1? 🙏 /cc @KlausLoeffelmann
Hey Kirsan,
sorry for the late reply.
I can't consider changing the scope for the APIs right now, but we can revisit them for the next part of the SDK we're currently working on the context of the Root Designer.
Hey Kirsan,
sorry for the late reply.
I can't consider changing the scope for the APIs right now, but we can revisit them for the next part of the SDK we're currently working on the context of the Root Designer.
Yea, I know that changing scope is something hard to change after release, so hope that this will be done during preview 🙏 At least Point 1, will let to do stuff without reflection...
internal
classes:Microsoft.DotNet.DesignTools.Client.Proxies.ProxyPropertyDescriptor
andMicrosoft.DotNet.DesignTools.Protocol.PropertyData
. It would very useful to make thempublic
, I will explain with a concrete example from chart control (I think it's all clear from comments and code). The code fromprotected override void ShowHelp()
.GetPropValue
is my extension method to get property value with reflection:// We have a proxy object (Microsoft.DotNet.DesignTools.Client.Proxies.ProxyPropertyDescriptor) here as PropertyDescriptor. // So to get real type we need get PropertyData (Microsoft.DotNet.DesignTools.Protocol.PropertyData) from PropertyDescriptor and then ComponentType from it. // Because Microsoft.DotNet.DesignTools.Client.Proxies.ProxyPropertyDescriptor and Microsoft.DotNet.DesignTools.Protocol.PropertyData are internal we need to use reflection... if (item.PropertyDescriptor.GetPropValue("PropertyData")?.GetPropValue("ComponentType") is Microsoft.DotNet.DesignTools.Protocol.Types.TypeIdentity typeIdentity) _helpTopic = typeIdentity.TypeName + "." + item.PropertyDescriptor.Name;