From 326bda2f65cd7ecb1e5bcf99847dda46749ac09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fele?= Date: Fri, 20 Oct 2023 22:02:05 +0200 Subject: [PATCH] Make TextEnhancementView.xaml look better --- src/ChatPrisma/App.xaml | 1 + src/ChatPrisma/Themes/Attached.cs | 12 ++++++ src/ChatPrisma/Themes/TextBoxStyles.xaml | 38 ++++++++++++++++ .../TextEnhancement/TextEnhancementView.xaml | 43 +++++++------------ 4 files changed, 67 insertions(+), 27 deletions(-) create mode 100644 src/ChatPrisma/Themes/TextBoxStyles.xaml diff --git a/src/ChatPrisma/App.xaml b/src/ChatPrisma/App.xaml index 62c0487..624b4c5 100644 --- a/src/ChatPrisma/App.xaml +++ b/src/ChatPrisma/App.xaml @@ -14,6 +14,7 @@ + diff --git a/src/ChatPrisma/Themes/Attached.cs b/src/ChatPrisma/Themes/Attached.cs index 333b0db..85e3145 100644 --- a/src/ChatPrisma/Themes/Attached.cs +++ b/src/ChatPrisma/Themes/Attached.cs @@ -39,4 +39,16 @@ public static double GetGroupBoxOpacity(DependencyObject element) { return (double)element.GetValue(GroupBoxOpacityProperty); } + + public static readonly DependencyProperty PlaceholderProperty = DependencyProperty.RegisterAttached( + "Placeholder", typeof(string), typeof(Attached), new PropertyMetadata(default(string))); + + public static void SetPlaceholder(DependencyObject element, string value) + { + element.SetValue(PlaceholderProperty, value); + } + public static string GetPlaceholder(DependencyObject element) + { + return (string)element.GetValue(PlaceholderProperty); + } } diff --git a/src/ChatPrisma/Themes/TextBoxStyles.xaml b/src/ChatPrisma/Themes/TextBoxStyles.xaml new file mode 100644 index 0000000..5d11983 --- /dev/null +++ b/src/ChatPrisma/Themes/TextBoxStyles.xaml @@ -0,0 +1,38 @@ + + + \ No newline at end of file diff --git a/src/ChatPrisma/Views/TextEnhancement/TextEnhancementView.xaml b/src/ChatPrisma/Views/TextEnhancement/TextEnhancementView.xaml index 5327c58..b1ac695 100644 --- a/src/ChatPrisma/Views/TextEnhancement/TextEnhancementView.xaml +++ b/src/ChatPrisma/Views/TextEnhancement/TextEnhancementView.xaml @@ -2,9 +2,8 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ChatPrisma.Views.TextEnhancement" - xmlns:fluentIcons="clr-namespace:FluentIcons.WPF;assembly=FluentIcons.WPF" - xmlns:fluentIconsCommon="clr-namespace:FluentIcons.Common;assembly=FluentIcons.Common" xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf" + xmlns:themes="clr-namespace:ChatPrisma.Themes" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" @@ -18,39 +17,29 @@ Loaded="TextEnhancementView_OnLoaded" DataContextChanged="TextEnhancementView_OnDataContextChanged" > - + - + - - - - - - - - - - - - - - - + + + + + + + + + + +