From 5fb242594775710e0bb261dd9c10bb7f4221ebcd Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Thu, 7 May 2026 13:14:24 +0200 Subject: [PATCH] Button wird teilweise im Debuggen Grau --- BeWo/View/Controls/AI/AiPromptbausteinButton.xaml.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BeWo/View/Controls/AI/AiPromptbausteinButton.xaml.cs b/BeWo/View/Controls/AI/AiPromptbausteinButton.xaml.cs index c91d88dd4..82716549a 100644 --- a/BeWo/View/Controls/AI/AiPromptbausteinButton.xaml.cs +++ b/BeWo/View/Controls/AI/AiPromptbausteinButton.xaml.cs @@ -38,7 +38,7 @@ namespace BeWo.View.Controls.AI public partial class AiPromptbausteinButton : UserControl { public static readonly DependencyProperty CanExecuteProperty = - DependencyProperty.Register("CanExecute", typeof(bool), typeof(AiPromptbausteinButton), new PropertyMetadata(true, OnCanExecuteChanged)); + DependencyProperty.Register("CanExecute", typeof(bool), typeof(AiPromptbausteinButton), new PropertyMetadata(false, OnCanExecuteChanged)); public static readonly DependencyProperty StateProperty = DependencyProperty.Register("State", typeof(AiPromptbausteinButtonState), typeof(AiPromptbausteinButton), new PropertyMetadata(AiPromptbausteinButtonState.Normal, OnStateChanged)); @@ -134,7 +134,11 @@ namespace BeWo.View.Controls.AI private void UpdateState(AiPromptbausteinButtonState state) { if (state == AiPromptbausteinButtonState.Normal && !CanExecute) - state = AiPromptbausteinButtonState.Disabled; + { + State = AiPromptbausteinButtonState.Disabled; + return; + } + switch (state) {