I have a fairly simple silverlight application, in which I have databound a silverlight coverflow control to a simple list of images. This is working fine.
Further down the page I have another image, that I need databound to the same datacontext.
I am doing the following: <Border Name="DetailImage" Grid.ColumnSpan="2" Grid.Row="0" Style="{StaticResource FatBorderStyle}" Width="225" Height="225">
<Border.Background> <ImageBrush Stretch="UniformToFill"> <ImageBrush.ImageSource> <BitmapImage UriSource="{Binding ImageSource}"/> </ImageBrush.ImageSource> </ImageBrush> </Border.Background> </Border>
However the line: <BitmapImage UriSource="{Binding ImageSource}"/>
- fails with the error in the headline. It is working fine in the other databinding in the page.
The datacontext of the page is set through code.
Answer: 1
Problem solved.
I was just not properly awake :-D
I was trying in the failing line to actually databind incorrectly.
I just had to change the binding to this: <BitmapImage UriSource="{Binding ElementName=HLARad, Path=SelectedItem.ImageSource}"/>
See ya - until next time...
by : csharp.mehttp://stackoverflow.com/users/696500
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog