enter image description hereHow do I pass a value to the Text attribute of the TextBlock tag found in the ResourceDictionary from the TextBox tag? And the Tag attribute is used by me to pass data to Path. Data="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type TextBox}}}"
Page.xaml
<TextBox x:Name="SearchTextBox"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Tag="{StaticResource SearchIcon}"/>
ResourceDictionary.xaml
<Style TargetType="{x:Type TextBox}">
...
<TextBlock x:Name="SearchTextBlock"
Grid.Column="1"
Foreground="{TemplateBinding Foreground}"
Text="???"
VerticalAlignment="Center"/>
<ScrollViewer Grid.Column="1"
VerticalContentAlignment="Center"
x:Name="PART_ContentHost" />
...
</Style>