HI,
I stuggeling with the databinding with in a custom control
I've got some properties within my custom control.
public static DependencyProperty TitleProperty;
public static DependencyProperty PageDictionaryProperty;
public string Title
{
get
{
return (string)base.GetValue(TitleProperty);
}
set
{
base.SetValue(TitleProperty, value);
}
}
}
public Innax.ManualParts.PageDictionary PageDictionary
{
get
{
return (Innax.ManualParts.PageDictionary)base.GetValue(PageDictionaryProperty);
}
set
{
base.SetValue(PageDictionaryProperty, value);
}
}
binding to teh table isn't a problem. this works fine
but now i want to bind to the keyword property within the pageDictionary.
public class PageDictionary {
//some other properties....
public List<string> Keywords
{
get
{
return GetKeyWords();
}
}
}
This is the XAML file.
<ItemsControl ItemContainerStyle="{StaticResource alternatingWithTriggers}"
AlternationCount="2"
x:Name="RelatedItemsControl"
Grid.Row="1"
Grid.Column="0"
ItemsSource="{TemplateBinding PageDictionary}"
ItemTemplate="{StaticResource HelpTopicLineTemplate}">
</ItemsControl>
</StackPanel>
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
if anyone could help me with this...
kind regards,
Frans