שאלה Binding Image.Source

  • Saturday, November 11, 2006 4:18 PM
     
     
    Hi

    I start with WPF and this code won't compile.
    ...
    <ListBox.ItemTemplate >
                    <DataTemplate>
                        <Image Width="200">
                            <Image.Source>
                                <BitmapImage UriSource="{Binding}"  DecodePixelWidth="200" />
                            </Image.Source>
                        </Image>
                    </DataTemplate>
    </ListBox.ItemTemplate>

    But this code work
    ...
    <ListBox.ItemTemplate >
                    <DataTemplate>
                        <Image Width="200" Source="{Binding}"> </Image>
                    </DataTemplate>
      </ListBox.ItemTemplate>

    The "Binding" is just : Images As List(Of String)
    Could you help me

    Thanks