0
votes

Tried many ways like defining the binding as RelativeSource=TemplatedParent, RelativeSource=FindAncestor, TemplateBinding and even ControlTemplate but the ToolTip remains blank.

Note: not looking for a direct binding to a Path property since the template will feature many progress bars.

    <DataTemplate DataType="{x:Type echoNestModel:dboAudioSummary}">
        <DataTemplate.Resources>
            <Style TargetType="ProgressBar" >
                <Setter Property="Maximum" Value="1" />
                <Setter Property="ToolTip">
                    <Setter.Value>
                        <ToolTip>
                            <TextBlock Text="{TemplateBinding RangeBase.Value}" />
                        </ToolTip>
                    </Setter.Value>
                </Setter>
            </Style>
        </DataTemplate.Resources>
    </DataTemplate>
1
Read the documentation, TemplateBinding and TemplatedParent are for ControlTemplates only.H.B.

1 Answers

2
votes

How about:

<Setter Property="ToolTip" Value="{Binding Value, RelativeSource={RelativeSource Self}}">