tags:

views:

28

answers:

1

Hi,

I have Itemcontrol

<ItemsControl ItemsSource="{Binding}">
    <ItemsControl.ItemTemplate>
        <DataTemplate>
            <Border BorderBrush="Red" BorderThickness="1" Background="Blue">
                <TextBlock Text="{Binding Text}"/>
            </Border>
        </DataTemplate>
    </ItemsControl.ItemTemplate>
</ItemsControl>

How to bind the Itemcontrol using c sharp code.

+1  A: 

Try:

WPF DataBinding, Styles and DataTemplates

http://www.codegod.de/WebAppCodeGod/wpf-databinding-styles-and-datatemplates-AID406.aspx

You get the best of both worlds UI and Data in one post :)

JeremySpouken
Thanks a lot.I will give a try.
Lalchand