7
다음은 내 텍스트 블록입니다.WPF : 일부 컨트롤의 트리거에서 다른 컨트롤의 속성을 Chainging
<Image x:Name:imgAnother/>
<TextBlock>
this is my text block
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="TextDecorations" Value="None"/>
<Style.Triggers>
<Trigger Property="TextBlock.IsMouseOver" Value="True">
<Setter Property="Foreground" Value="RoyalBlue"/>
<!--I like to insert a code at here that changes another control's property...-->
</Trigger>
<Trigger Property="TextBlock.IsMouseOver" Value="False">
<Setter Property="Foreground" Value="#FF808080"/>
<!--..and this line too.-->
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
"imgAnother"와 같이 다른 컨트롤의 proerpty를 변경할 수있는 xaml 코드를 만들고 싶습니다.
어떻게 할 수 있습니까?
해당 이미지 (또는 의미하는 컨트롤)는 어디에 있습니까? –
기본적으로 동일한 창에서 다른 컨트롤의 proeprty를 변경하려고합니다. 또한 컨트롤은 응용 프로그램 리소스, 윈도우의 리소스, 컨트롤의 리소스에도 배치 할 수 있습니다. – mjk6026