XCAD.NET
XCAD.NET
Framework for .NET (C# and VB.NET) to create modern application for CAD systems (SOLIDWORKS, SOLIDWORKS Document Manager, Autodesk Inventor, etc.)
Get technical support Connect to xCAD community on Discord server Explore code and application examples xCAD.NET Templates for Visual Studio and VS Code Access source code

Common Options of all controls in SOLIDWORKS property manager page


All generated controls have common properties which can be customized

Control common properties
Control common properties

  1. Control icon selected from the standard library of icons
  2. Custom control icon loaded from the image
  3. Tooltip of the control displayed on mouse hovering

Style

Common styles can be customized via ControlOptionsAttribute by decorating the specific properties in data model.

This attribute allows to define the alignment, position, size as well as background and foreground colours:

[ControlOptions(backgroundColor: KnownColor.Green, textColor: KnownColor.Yellow)]
public string TextField { get; set; } = "Sample Text";

Custom background and foreground colours applied to textbox
Custom background and foreground colours applied to textbox

Attribution

Tooltip

Tooltip for controls can be set by applying the DescriptionAttribute

Standard Icon

Standard icon added to text box control
Standard icon added to text box control

Standard icon defined in BitmapLabelType_e enumeration can be set to control via StandardControlIconAttribute attribute.

[Description("Depth Value")]
[StandardControlIcon(BitmapLabelType_e.Depth)]
public string Depth { get; set; }

Use the below map of all available standard icons:

Standard bitmap icons for Property Manager Page controls
Standard bitmap icons for Property Manager Page controls

  1. LinearDistance
  2. AngularDistance
  3. SelectEdgeFaceVertex
  4. SelectFaceSurface
  5. SelectVertex
  6. SelectFace
  7. SelectEdge
  8. SelectFaceEdge
  9. SelectComponent
  10. Diameter
  11. Radius
  12. LinearDistance1
  13. LinearDistance2
  14. Thickness1
  15. Thickness2
  16. LinearPattern
  17. CircularPattern
  18. Width
  19. Depth
  20. KFactor
  21. BendAllowance
  22. BendDeduction
  23. RipGap
  24. SelectProfile
  25. SelectBoundary

Custom Icon

Custom icon can be set via overloaded constructor of IconAttribute attribute

[Icon(typeof(Resources), nameof(Resources.OffsetImage))]
public double Offset { get; set; }


Powered by Docify