<!-- Code 1 -->
<DataTrigger Binding="{Binding (ap:PasswordBoxProperties.HasText), RelativeSource={RelativeSource Mode=TemplatedParent}}" Value="False">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
<!-- Code 2 -->
<DataTrigger Binding="{Binding Path=(ap:PasswordBoxProperties.HasText), RelativeSource={RelativeSource Mode=TemplatedParent}}" Value="False">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
The Code 1 only omits the Path.
I think omitting the Path is supported, but it doesn't work. I wonder why this writing won't work, is it because it can't find this additional property?