WPF Binding to local variable

Posted by PrimeTSS on Stack Overflow See other posts from Stack Overflow or by PrimeTSS
Published on 2009-09-26T12:38:14Z Indexed on 2010/04/12 9:03 UTC
Read the original article Hit count: 835

Filed under:
|

Can you bind to a local variable like this?

SystemDataBase.cs

namespace WebWalker
{
    public partial class SystemDataBase : Window
    {
        private string text = "testing";
...

SystemDataBase.xaml
  ...
 <TextBox 
       Name="stbSQLConnectionString" 
       Text="{SystemDataBase.text}">
 </TextBox>

??

Text is set to the local variable "text"

© Stack Overflow or respective owner

Related posts about binding

Related posts about wpf