I have a component which call 2usercontrols. Usercontrols1 :(code part)
<StackPanel Name="NeedThisName" >
</StackPanel>
Usercontrols2 :(code part)
<Button >
<Button.Template>
<ControlTemplate>
<Rectangle >
<Rectangle.Fill>
<VisualBrush Visual="{Binding ElementName=????}" Opacity="0.75" Stretch="None" >
<VisualBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform ScaleX="0.5" ScaleY="0.5" />
</TransformGroup>
</VisualBrush.RelativeTransform>
</VisualBrush>
</Rectangle.Fill>
</Rectangle>
</ControlTemplate>
</Button.Template>
I would like to get the name in usercontrol1 ("NeedThisName") to specify to the Visual property of the visualbrush.