NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using ExpressionEdit in wpf

Hi everyone,

 

I'm trying to get working an ExpressionEdit control in WPF.

I've followed the Microsoft tutorial to embed the control : 

https://docs.microsoft.com/fr-fr/dotnet/desktop/wpf/advanced/walkthrough-hosting-a-windows-forms-con...

 

And it work mostly correct, but the f(x) button is not available.

I've tried this solution:

https://forums.ni.com/t5/NI-TestStand/Proper-use-of-quot-TestStand-UI-ExpressionEdit-Control-quot-in...

but it cause my app to crash. 

 

code:

private void Window_Loaded(object sender, RoutedEventArgs e)
{
    // Create the interop host control.
    System.Windows.Forms.Integration.WindowsFormsHost host =
    new System.Windows.Forms.Integration.WindowsFormsHost();
    var v = new AxExpressionEdit();

    v.Context = _SequenceContext.AsPropertyObject();
    v.DisplayText = "";

    host.Child=v;

    this.WinformHost.Children.Add(host);
}

 

Can anyone share a code sample with wpf and ExpressionEdit ?

 

Regards,

 

FranckH

0 Kudos
Message 1 of 1
(860 Views)