Custom Control Binding Issue
WPF
1
Posts
1
Posters
4
Views
1
Watching
-
I am creating a Custom Control. Everything is working fine but I have one binding problem that I can't seem to get past. Here's the control's XAML. Some of the XAML has been removed for brevity.
<Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:NavigationList}"> <Expander Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsExpanded="{TemplateBinding IsExpanded}" HorizontalAlignment="{Binding HorizontalAlignment, RelativeSource={RelativeSource AncestorType=ContentPresenter}, Mode=OneWayToSource}"> <Grid> <ListBox Grid.Row="1" ItemsSource="{Binding Items, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" BorderBrush="Transparent" HorizontalAlignment="Stretch"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image Source="{Binding ItemImage, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="16" Height="16" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center"/> \*\*\*\*\*\* THE PROBLEM IS HERE \*\*\*\*\*\* <TextBlock M</x-turndown>