Table of Contents

Class PmpWpfHost

Namespace
Hymma.Solidworks.Addins
Assembly
Hymma.Solidworks.Addins.dll

a windows winForm host that solidworks uses to show win forms or wpf

public class PmpWpfHost : PmpControl<IPropertyManagerPageWindowFromHandle>, IWrapSolidworksObject<IPropertyManagerPageWindowFromHandle>, IReleaseSolidworksObject, IEquatable<PmpWpfHost>, IDisposable
Inheritance
PmpControl<IPropertyManagerPageWindowFromHandle>
PmpWpfHost
Implements
IWrapSolidworksObject<IPropertyManagerPageWindowFromHandle>
Inherited Members

Remarks

your addin must add a reference to WindowsFormsIntegration

Constructors

PmpWpfHost(UserControl, int)

constructor

public PmpWpfHost(UserControl winFormOrWpfControl, int height)

Parameters

winFormOrWpfControl UserControl

a wpf controller

height int

height of this control in property manager page if set to zero the control will not appear

PmpWpfHost(ElementHost, UserControl, int)

default constructor

public PmpWpfHost(ElementHost elementHost, UserControl wpfControl, int height)

Parameters

elementHost ElementHost

solidworks uses ElementHost to hook into a windows winForm

wpfControl UserControl

wpf controller

height int

height of this control in property manager page if set to zero the control will not appear

Properties

ElementHost

A host for WindowsControl

public ElementHost ElementHost { get; }

Property Value

ElementHost

Enabled

enables or disables this property control on

public override bool Enabled { get; set; }

Property Value

bool

WindowsControl

a windows winForm or wpf controller

public UserControl WindowsControl { get; }

Property Value

UserControl

Methods

Dispose()

properly disposes of this object

public void Dispose()

Equals(PmpWpfHost)

makes sure each SwWindowHandler has its unique ElementHost

public bool Equals(PmpWpfHost other)

Parameters

other PmpWpfHost

Returns

bool

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.