Binding AutoCompleteBox inside DataTemplate
Posted
by Thiago
on Stack Overflow
See other posts from Stack Overflow
or by Thiago
Published on 2010-05-15T23:29:11Z
Indexed on
2010/05/15
23:40 UTC
Read the original article
Hit count: 574
wpf-binding
I have the following AutoCompleteBox defined inside DataTemplate:
<Window.Resources>
<DataTemplate x:key="PaneTitleTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinition>
<ContentPresenter Content="{Binding}" />
<toolkit:AutoCompleteBox x:Name="InsertBox" ItemsSource="{???}" />
</Grid>
</DataTemplate>
</Window.Resources>
...
<radRock:RadPane x:Name="pane1" TitleTemplate="{StaticResource PaneTitleTemplate}"/>
Now I'd like to fill it with a list of strings, but I don't know which Binding should I use. The list of strings is an instance variable from the Window. What should I do?
© Stack Overflow or respective owner