728x90
728x170
컨트롤의 Background 를 Transparent 로 하게되면
해당 컨트롤 뒤쪽에 배치된 컨트롤들에 마우스 오버이벤트나 툴팁처리를 한경우 작동하지 않게됩니다.
하지만 Background 를 {x:Null} 로 지정하게되면
뒤쪽에 배치된 컨트롤들의 이벤트 처리가 가능해 집니다.
아래처럼 {x:Null} 로 된 경우 ToolTip 이 제대로 표시되지만
<Grid>
<Label Content="null 과 transoarent" ToolTip="ToolTip!!" Height="30" Width="300"/>
<Border Name="Button1" Height="30" Width="300" BorderBrush="Yellow" Background="{x:Null}" BorderThickness="1"/>
</Grid>
아래처럼 Transparent 로 된 경우 ToolTip 이 표시되지 않습니다.
<Grid>
<Label Content="null 과 transoarent" ToolTip="ToolTip!!" Height="30" Width="300"/>
<Border Name="Button1" Height="30" Width="300" BorderBrush="Yellow" Background="Transparent" BorderThickness="1"/>
</Grid>
728x90
그리드형
'C# > WPF' 카테고리의 다른 글
[WPF] DataTrigger 를 이용해 특정 타겟 Control 의 Action 에 따른 처리하기 (0) | 2020.12.01 |
---|---|
[WPF] Flat Button (0) | 2020.12.01 |
[WPF] GradientStopCollection 의 Offset 컬러 구하기 (0) | 2020.10.20 |
[WPF] Random Brush (0) | 2020.10.12 |
[WPF] UpdateSourceTrigger (0) | 2020.09.07 |