diff --git a/demo/Semi.Avalonia.Demo/Pages/ToolTipDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ToolTipDemo.axaml new file mode 100644 index 0000000..86080c4 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/ToolTipDemo.axaml @@ -0,0 +1,93 @@ + + + + Hover Here + + + + + + ToolTip + A control which pops up a hint when a control is hovered + + + ToolTip bottom placement + + + + + + Moving offset + + + Top + + + Left + + + Right + + + Bottom + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/ToolTipDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/ToolTipDemo.axaml.cs new file mode 100644 index 0000000..0b3a0c7 --- /dev/null +++ b/demo/Semi.Avalonia.Demo/Pages/ToolTipDemo.axaml.cs @@ -0,0 +1,18 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace Semi.Avalonia.Demo.Pages; + +public partial class ToolTipDemo : UserControl +{ + public ToolTipDemo() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } +} \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Views/MainView.axaml b/demo/Semi.Avalonia.Demo/Views/MainView.axaml index aaa69f0..e526ef6 100644 --- a/demo/Semi.Avalonia.Demo/Views/MainView.axaml +++ b/demo/Semi.Avalonia.Demo/Views/MainView.axaml @@ -78,6 +78,9 @@ + + + diff --git a/src/Semi.Avalonia/Controls/Controls.axaml b/src/Semi.Avalonia/Controls/Controls.axaml index adce855..e9deabf 100644 --- a/src/Semi.Avalonia/Controls/Controls.axaml +++ b/src/Semi.Avalonia/Controls/Controls.axaml @@ -31,6 +31,7 @@ + diff --git a/src/Semi.Avalonia/Controls/Tooltip.axaml b/src/Semi.Avalonia/Controls/Tooltip.axaml new file mode 100644 index 0000000..a0809d5 --- /dev/null +++ b/src/Semi.Avalonia/Controls/Tooltip.axaml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Themes/Light/Light.axaml b/src/Semi.Avalonia/Themes/Light/Light.axaml index c9f723b..1716221 100644 --- a/src/Semi.Avalonia/Themes/Light/Light.axaml +++ b/src/Semi.Avalonia/Themes/Light/Light.axaml @@ -23,8 +23,10 @@ + + diff --git a/src/Semi.Avalonia/Themes/Light/Tooltip.axaml b/src/Semi.Avalonia/Themes/Light/Tooltip.axaml new file mode 100644 index 0000000..895ccee --- /dev/null +++ b/src/Semi.Avalonia/Themes/Light/Tooltip.axaml @@ -0,0 +1,14 @@ + + + M24 0V1C20 1 18.5 2 16.5 4C14.5 6 14 7 12 7C10 7 9.5 6 7.5 4C5.5 2 4 1 0 1V0H24Z + + + + 6 + 12 8 + 320 + 0 +