在SOLIDWORKS Property Page中使用SwEx.PMPage框架创建选项框控件
可以通过使用OptionBoxAttribute对类型为Enum的属性进行修饰来定义选项组。
Imports CodeStack.SwEx.Common.Attributes
Imports CodeStack.SwEx.PMPage.Attributes
Public Class OptionBoxDataModel
Public Enum Options_e
Option1
Option2
<Title("Third Option")>
Option3
End Enum
<OptionBox>
Public Property Options As Options_e
End Class
using CodeStack.SwEx.Common.Attributes;
using CodeStack.SwEx.PMPage.Attributes;
public class OptionBoxDataModel
{
public enum Options_e
{
Option1,
Option2,
[Title("Third Option")]
Option3
}
[OptionBox]
public Options_e Options { get; set; }
}