Click here to Skip to main content
15,908,111 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Begginer - Binding object in XAML Pin
Pete O'Hanlon26-Jun-10 2:35
mvePete O'Hanlon26-Jun-10 2:35 
GeneralRe: Begginer - Binding object in XAML [modified] Pin
ekimpl26-Jun-10 3:28
ekimpl26-Jun-10 3:28 
AnswerRe: Begginer - Binding object in XAML Pin
Abhinav S26-Jun-10 5:53
Abhinav S26-Jun-10 5:53 
GeneralRe: Begginer - Binding object in XAML Pin
ekimpl26-Jun-10 6:08
ekimpl26-Jun-10 6:08 
GeneralRe: Begginer - Binding object in XAML Pin
Abhinav S26-Jun-10 6:20
Abhinav S26-Jun-10 6:20 
GeneralRe: Begginer - Binding object in XAML Pin
ekimpl26-Jun-10 6:30
ekimpl26-Jun-10 6:30 
GeneralRe: Begginer - Binding object in XAML Pin
Pete O'Hanlon26-Jun-10 6:57
mvePete O'Hanlon26-Jun-10 6:57 
GeneralRe: Begginer - Binding object in XAML Pin
ekimpl26-Jun-10 7:15
ekimpl26-Jun-10 7:15 
I think I am missing something in XAML, because from .cs it all works ok. Let's forget about the Field class and stick to a simpler example like binding MyValue to a TextBlock.

        public String MyValue { get; set; }<br />
<br />
        public MainPage()<br />
        {<br />
            InitializeComponent();<br />
            MyValue = "test text";<br />
            txtTest.DataContext = MyValue;<br />
            .....<br />
<br />
<TextBlock Grid.Row="1" Name="txtTest" Text="{Binding}"/>



Above code works fine, but when i try to set DataContext in XAML it fails.

<TextBlock Grid.Row="1" DataContext={Binding MyValue} Name="txtTest" Text="{Binding}"/>
Fail
<TextBlock Grid.Row="1" Name="txtTest" Text="{Binding MyValue}"/>

Fail

Maybe I should add something to resources ?
GeneralRe: Begginer - Binding object in XAML Pin
Pete O'Hanlon26-Jun-10 9:05
mvePete O'Hanlon26-Jun-10 9:05 
GeneralRe: Begginer - Binding object in XAML Pin
Abhinav S26-Jun-10 17:25
Abhinav S26-Jun-10 17:25 
GeneralRe: Begginer - Binding object in XAML Pin
ekimpl26-Jun-10 19:38
ekimpl26-Jun-10 19:38 
GeneralRe: Begginer - Binding object in XAML Pin
Abhinav S26-Jun-10 19:54
Abhinav S26-Jun-10 19:54 
QuestionArrange controls inside a user control in wpf Pin
dashingsidds25-Jun-10 3:32
dashingsidds25-Jun-10 3:32 
AnswerRe: Arrange controls inside a user control in wpf Pin
Pete O'Hanlon25-Jun-10 4:00
mvePete O'Hanlon25-Jun-10 4:00 
GeneralRe: Arrange controls inside a user control in wpf Pin
dashingsidds27-Jun-10 18:33
dashingsidds27-Jun-10 18:33 
GeneralRe: Arrange controls inside a user control in wpf Pin
BechBej5-Jul-10 10:01
BechBej5-Jul-10 10:01 
GeneralRe: Arrange controls inside a user control in wpf Pin
dashingsidds5-Jul-10 18:23
dashingsidds5-Jul-10 18:23 
QuestionRemoving line-geometry from screen at run-time Pin
industryunleash25-Jun-10 3:15
industryunleash25-Jun-10 3:15 
AnswerRe: Removing line-geometry from screen at run-time Pin
Pete O'Hanlon25-Jun-10 3:27
mvePete O'Hanlon25-Jun-10 3:27 
GeneralRe: Removing line-geometry from screen at run-time Pin
industryunleash25-Jun-10 3:30
industryunleash25-Jun-10 3:30 
GeneralRe: Removing line-geometry from screen at run-time Pin
Pete O'Hanlon25-Jun-10 3:41
mvePete O'Hanlon25-Jun-10 3:41 
GeneralRe: Removing line-geometry from screen at run-time Pin
industryunleash30-Jun-10 7:47
industryunleash30-Jun-10 7:47 
QuestionDataGrid Focusing Issue, Pin
Hema Bairavan25-Jun-10 1:34
Hema Bairavan25-Jun-10 1:34 
QuestionHow to deploy silver light + wcf application in IIS Pin
Destinys_child24-Jun-10 21:10
Destinys_child24-Jun-10 21:10 
AnswerRe: How to deploy silver light + wcf application in IIS Pin
Abhinav S24-Jun-10 23:20
Abhinav S24-Jun-10 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.