<RadioButton Style="{DynamicResource RadioButtonStyle}" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="" FontFamily="./Fonts/#iconfont" FontSize="22" Margin="10 0 0 0" Foreground="#6074C2" />
<TextBlock Margin="10 0 0 0" Text="待办事项" FontSize="14" VerticalAlignment="Center"
Foreground="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type RadioButton}}}" />
</StackPanel>
</RadioButton>
RelativeSource FindAncestor:寻找TextBlock这个元素的祖宗元素,
AncestorLevel=1:向外层找1层,在上面的代码就是RadioButton
AncestorType={x:Type RadioButton}:寻找的类型为RadioButton类型
Foreground="{Binding Foreground,: 当前元素TextBlock绑定目标元素的Foreground属性