29

I'm creating Windows application and Class library. Class library contains WPF control named "InsertForm.xaml"

InsertForm contains TextBox named eUserName.

I'm using the following code to show InsertForm. That's successful. But I can't access eUserName. How to set Textbox modifiers to public?

using System.Windows.Forms.Integration

ElementHost host = new ElementHost();
iform= new Extender.InsertForm();
host.Child = iform;
this.Controls.Add(host);
Stanislav Kniazev
  • 5,386
  • 3
  • 35
  • 44
ebattulga
  • 10,774
  • 20
  • 78
  • 116

1 Answers1

64

Would this work?

<TextBox Name="eUserName" x:FieldModifier="public"/>
Stanislav Kniazev
  • 5,386
  • 3
  • 35
  • 44