data binding - WPF Databinding TextBox to integer property in another object -


i have think simple databinding question (i'm still new wpf). have class (simplified question)

public class configurationdata {     public int baudrate { get; set; }  } 

in mainwindow.xaml.cs have private member variable:

private configurationdata m_data; 

and method

void dostuff() {    // bunch of stuff (read serial port?) may result in calling...    m_data.baudrate = 300; // or other value depending on logic } 

in mainwindow gui, i'd have textbox displays m_data.baudrate , allows 2 way binding. user should able enter value in textbox, , textbox should display new values we're caused "dostuff()" method. i've seen tons of examples on binding property of control on mainwindow, , binding datacollection, no examples of binding property of object. think example simple get, nagging annoyance i'm binding integer, not string, , if possible, user able enter integers.
btw considered using numeric up/down, decided against there did not seem lot of support/examples of non-commercial numeric up/down controls. plus, awfully big range of numbers spin through.

i think pointer 1 example me on way. many in advance, dave

i think http://blogs.msdn.com/b/wpfsdk/archive/2006/10/19/wpf-basic-data-binding-faq.aspx


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -