Button control in SOLIDWORKS property Manager Page

Edit ArticleEdit Article
Comments

Button control
Button control

In order to create a button in the property manager page, it is required to declare the property of delegate type Action.

The pointer to void function assigned to this property is a handler of the button:

using System;

public class ButtonDataModel
{
    public Action Button => OnButtonClick;

    private void OnButtonClick()
    {
        //TODO: Handle button click
    }
}

Notifications

All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.


Product of Xarial Product of Xarial