TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nerdfactor
NA
1
0
passing parameters to user control
Feb 10 2010 11:35 AM
i would like to pass a parameter to a user control, in order to create a button with a image.
the xaml code should look like this:
<local:ImageButton
ImageName
="test.png" />
and the object looks something like this:
public string ImageName { get; set; }
public ImageButton() {
InitializeComponent();
this.
ImageName
=
ImageName
;
this.DataContext = this;
}
that has a xaml code like this:
<Grid >
<Image Source="{Binding
ImageName
}"/>
</Grid>
and now i want to pass the test.png all the way down, so a can create buttons with different images.
i searched for some time, but i could not find something that i could understand. so i holp someone can help me :)
Reply
Answers (
1
)
Animating transition with wrap panel content
Animated Filtering