Click here to Skip to main content
15,891,316 members
Home / Discussions / WPF
   

WPF

 
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 
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 
Pete, I could use Your solution, but as I wrote, there is no problem when setting DataContext form .cs. I just wanted to find the reason why I could not bind my Properties in XAML.

And I found the reason, with Your (both Pete and Abhinav) clues. It was because my declaration of DataContext for LayoutRoot was wrong. I moved it from XAML to .cs
LayoutRoot.DataContext = this;

so now it points to my MainPage class, and now, I can bind local properties with no need to set the context for each control in XAML

public Field Val { get; set; }
<TextBlock Grid.Row="1" Name="txtTest"  Text="{Binding Val.Value}"/>


So, thanks for Your help guys, I think the problem is solved.
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 
AnswerRe: How to deploy silver light + wcf application in IIS Pin
#realJSOP24-Jun-10 23:23
mve#realJSOP24-Jun-10 23:23 
GeneralRe: How to deploy silver light + wcf application in IIS Pin
Destinys_child28-Jun-10 1:29
Destinys_child28-Jun-10 1:29 
Question"ItemClicked" event for "ToolBar" in wpf not available Pin
dashingsidds24-Jun-10 20:35
dashingsidds24-Jun-10 20:35 

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.