You can do this, but I would suggest using a ResourceDictionary .
Anyway, if you want to do it this way, you can use FindAncestor to find the parent and access the Resource from the parent ResourceDictionary
<UserControl x:Class="UserControl1"> <UserControl.Resources> <Style x:Key="MyStyle" /> </UserControl.Resources> <Grid> <UserControl2 /> </Grid> </UserControl> <UserControl x:Class="UserControl2"> <Grid Style="{Binding Resources[MyStyle], RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:UserControl1}}}"> </Grid> </UserControl>
Beacause Resource is a dictionary that you can access using key , as in the code for
source share