[C#/WPF/.NET6] ToolTip 엘리먼트 : HorizontalOffset/VerticalOffset 속성을 사용해 툴팁 오프셋 설정하기
C#/WPF 2022. 10. 13. 17:52728x90
728x170
■ ToolTip 엘리먼트의 HorizontalOffset/VerticalOffset 속성을 사용해 툴팁 오프셋을 설정하는 방법을 보여준다.
▶ MainWindow.xaml
<Window x:Class="TestProject.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="800"
Height="600"
Title="TestProject"
FontFamily="나눔고딕코딩"
FontSize="16">
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Button
Margin="10"
Width="100"
Height="30"
Content="테스트">
<Button.ToolTip>
<ToolTip HorizontalOffset="20">
여기를 클릭해 주시기 바랍니다.
</ToolTip>
</Button.ToolTip>
</Button>
<Button
Margin="10"
Width="100"
Height="30"
Content="테스트">
<Button.ToolTip>
<ToolTip VerticalOffset="20">
여기를 클릭해 주시기 바랍니다.
</ToolTip>
</Button.ToolTip>
</Button>
<Button
Margin="10"
Width="100"
Height="30"
Content="테스트">
<Button.ToolTip>
<ToolTip
HorizontalOffset="20"
VerticalOffset="20">
여기를 클릭해 주시기 바랍니다.
</ToolTip>
</Button.ToolTip>
</Button>
</StackPanel>
</Window>
728x90
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] InkCanvas 클래스 : DefaultDrawingAttributes 속성을 사용해 스트로크 모양 설정하기 (0) | 2022.11.22 |
---|---|
[C#/WPF] InkCanvas 클래스 : MouseRightButtonUp 이벤트를 사용해 스트로크 크기 확대하기 (0) | 2022.11.22 |
[C#/WPF] Matrix 구조체 : Scale 메소드를 사용해 크기 확대하기 (0) | 2022.11.22 |
[C#/WPF] InkCanvas 엘리먼트 : Background 속성을 사용해 배경 브러시 설정하기 (0) | 2022.11.22 |
[C#/WPF/.NET6] FrameworkElement 엘리먼트 : XAML에서 포커스 설정하기 (0) | 2022.10.20 |
[C#/WPF/.NET6] ToolTipService 엘리먼트 : InitialShowDelay 첨부 속성을 사용해 툴팁 초기 표시 지연 시간 설정하기 (0) | 2022.10.13 |
[C#/WPF/.NET6] ToolTipService 엘리먼트 : ShowOnDisabled 첨부 속성을 사용해 엘리먼트 비활성화시에도 툴팁 표시하기 (0) | 2022.10.13 |
[C#/WPF] ToolTip 클래스 : HasDropShadow 속성을 사용해 툴팁 그림자 표시하기 (0) | 2022.10.13 |
[C#/WPF/.NET6] ToolTip 엘리먼트 : 복합 툴팁 사용하기 (0) | 2022.10.13 |
[C#/WPF/.NET6] ToolTip 엘리먼트 사용하기 (0) | 2022.10.13 |