Good work yxhu. Didn't recognize that. But if you are that fussy watch your parenthesis
Loop 3, i initialised = 3:
container.Add(data[4]).Items <<< Exception here
Your code wouldn't compile because .Add() is usually of type void. ;) greets Adrian
Good work yxhu. Didn't recognize that. But if you are that fussy watch your parenthesis
Loop 3, i initialised = 3:
container.Add(data[4]).Items <<< Exception here
Your code wouldn't compile because .Add() is usually of type void. ;) greets Adrian
Hi dasblinkenlight, thank you for your reply. This might be a solution. Would be great to access the textbox directly when an event is fired. Otherwise I need to put all textboxes in an array or not? I thought of something like this below.
<TextBox x:Name="UserNameTB" />
<TextBox x:Name="AddressTB" />
<Image Source="..." MouseLeftButtonDown="editText_MouseLeftButtonDown" Tag="{UserNameTB}"/>
<Image Source="..." MouseLeftButtonDown="editText_MouseLeftButtonDown" Tag="{AddressTB}"/>
Is it possible to access it like this??
TextBox userNameTB = ((sender as Image).Tag) as TextBox);
Tried some combinations but with no luck. Greets Adrian
I have several pairs of TextBlock and an Image next to each other. OnMouseLeftButtonDown I want to modify the TextBlock. That is some standard situation, but in this case I don't want to add an EventHandler to each image as there are many of them. How can I user only one Handler and change the corresponding TextBlock. I've tried to add some DataContext to the image but it did not work out. Can anyone give me some help? Thanks!
Sounds like a newbie question. But can't help my self for already an hour. I've Silverlight application with tabs and don't want to put all code in one large file. So I have made single UserControls and now I want to put them into the tab control.
I can't see anything in the designer. Can somebody help me out of this?
Thanks!
modified on Thursday, January 20, 2011 8:43 AM
I can improve even that code for ( int i = 0; i < data.Count; container.Add(data[++i].Items)