Closed arivoir closed 4 years ago
public override string Type => "CustomControlLibrary.WpfCore.ExampleButton";
Please change it to full type name of your control. And also PropertyAction
should be added for existing properties in your control
It worked now
public class C1PathIconSuggestedActionProvider : SuggestedActionProvider
{
public static ActionToken Token_Property_Data = new ActionToken(0x1001);
public static ActionToken Token_Property_Foreground = new ActionToken(0x1002);
public static ActionToken Token_StrokeBrush = new ActionToken(0x10FF);
public static ActionToken Token_StrokeThickness = new ActionToken(0x10FE);
public override string Header => "Actions";
public override string Type => "C1.WPF.Core.C1PathIcon";
public override void Initialize()
{
this.ShowNameProperty = true;
base.Initialize();
this.AddGroup(new ActionGroup(SuggestedActionProviderTokens.Token_Group_Common,
new PropertyAction(Token_Property_Data, "Data"),
new PropertyAction(Token_Property_Foreground, "Foreground"),
new PropertyAction(Token_StrokeBrush, "StrokeBrush"),
new PropertyAction(Token_StrokeThickness, "StrokeThickness")
));
}
}
Thanks
I'm trying to create "Suggested Actions" for a control, but the content of the popup doesn't appear
I created this class (It's a copy of the documentation)
And added this attributes
The icon appeared, but when open the popup there is nothing.
When debugging it, I see the attributes are added, but it never calls "Initialize" method.