contenttemplate

How to Bind ListViewItem's ToolTip to a ToolTip of TextBlock inside its ContentTemplate

非 Y 不嫁゛ 提交于 2019-12-12 04:09:00
问题 I would like to bind my ListViewItem's ToolTip to its ContentTemplate's TextBlock's ToolTip. I tried the following but it didnt work: <ListView ItemsSource="{Binding DoestMatter}" > <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Setter Property="ToolTip" Value="{Binding ElementName=Title, Path=ToolTip}"/> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <TextBlock x:Name="Title" Text="{Binding Title}" ToolTip="Test"/> </DataTemplate> </Setter.Value>