0
は、私はstackoverflowの中に以下のコードを見て:XAMLでusercontrolの子のスタイルを使用しますか?
<UserControl x:Class="WpfApplication3.UserControl1"
x:Name="Uc1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<Style TargetType="Label">
<Setter Property="Foreground"
Value="{Binding Foreground, ElementName=Uc1, Mode=OneWay}"/>
</Style>
</UserControl.Resources>
<Grid>
<Label Content="Label 1"/>
<Label Content="Label 2"/>
</Grid>
</UserControl>
質問:私はスタイリングのための私のusercontrol.resources内の特定のラベルをターゲットにすることができた場合、私は今、不思議。私のuserControlの中で可能ですか?もしそうなら、どのように?
回答を受け入れました:) – Asperger