the xaml code should look like this:
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:
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 :)
Martin CookPosted Feb 10, 2010, 11:51 AM
You can achieve this using a Custom Control and Template Binding.
I've whipped up an example for you.
I hope it helps.
Cheers,
Martin