You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ActionToken class allows us to lookup and refer to specific actions or action groups within a provider.
To answer your questions:
We cannot use property name because ActionGroups don't have a property, and not all Actions refer to one either. (For example, Link Actions and Command Actions may not.)
The "value" parameter defines a unique integer id for the given ActionToken. All ActionTokens should be assigned one. If you don't, it may not work. However, if you create an ActionGroup or Action without a token, that is okay. You just won't be able to look it up or refer to it later.
If the same ActionToken value is used for multiple Actions/ActionGroups within a provider, that will also break your ability to look them up later on. If you're inheriting from an existing ActionProvider and wish to avoid duplicates, you can use the Last_Token field to ensure that you don't conflict with any tokens from inherited types. You can see an example of this in our Example for Inherited Controls.
Hopefully that answers your questions. We have some additional documentation on ActionTokens here: Suggested Actions Tokens. Please also feel free to follow up on this thread if you have any more questions, or close the thread if you're satisfied.
I'm wondering how the ActionToken class works.
https://github.com/microsoft/xaml-designer-extensibility/blob/master/documents/xaml-suggested-actions/xaml-designer-suggested-actions-extensibility.md
The text was updated successfully, but these errors were encountered: