Tooltip wird korrekt angezeigt

This commit is contained in:
2026-07-22 14:57:57 +02:00
parent 12bf5bcacb
commit 6c90b902d6
2 changed files with 27 additions and 2 deletions

View File

@@ -34,8 +34,10 @@
Background="Transparent" Background="Transparent"
Command="{Binding OpenConversationPopupCommand}" Command="{Binding OpenConversationPopupCommand}"
Content="{StaticResource AiDesignsIconKIChatWeissOrange}" Content="{StaticResource AiDesignsIconKIChatWeissOrange}"
ToolTip="KI Chat öffnen"
ToolTipService.ShowOnDisabled="True"> ToolTipService.ShowOnDisabled="True">
<Button.ToolTip>
<TextBlock Text="{Binding TooltipName, StringFormat='{}{0} öffnen'}" />
</Button.ToolTip>
<!--<Button.InputBindings> <!--<Button.InputBindings>
<MouseBinding Command="{Binding OpenConversationPopupCommand}" Gesture="LeftClick" /> <MouseBinding Command="{Binding OpenConversationPopupCommand}" Gesture="LeftClick" />
</Button.InputBindings>--> </Button.InputBindings>-->
@@ -48,8 +50,10 @@
Command="{Binding OpenAllPromptsPopupCommand}" Command="{Binding OpenAllPromptsPopupCommand}"
Content="{StaticResource AiDesignsIconKIFunktionWeissGruen}" Content="{StaticResource AiDesignsIconKIFunktionWeissGruen}"
MouseRightButtonUp="btnOpenAi5_MouseRightButtonUp" MouseRightButtonUp="btnOpenAi5_MouseRightButtonUp"
ToolTip="KI Chat mit Prompt-Baustein starten"
ToolTipService.ShowOnDisabled="True"> ToolTipService.ShowOnDisabled="True">
<Button.ToolTip>
<TextBlock Text="{Binding TooltipName, StringFormat='{}{0} mit Prompt-Baustein starten'}" />
</Button.ToolTip>
<!--<Button.InputBindings> <!--<Button.InputBindings>
<MouseBinding Command="{Binding OpenAllPromptsPopupCommand}" Gesture="LeftClick" /> <MouseBinding Command="{Binding OpenAllPromptsPopupCommand}" Gesture="LeftClick" />
</Button.InputBindings>--> </Button.InputBindings>-->

View File

@@ -29,6 +29,7 @@ namespace BeWo.ViewModel.Controls.AI
private AiChatButtonState buttonState; private AiChatButtonState buttonState;
public AiActionType ActionType { get; protected set; } public AiActionType ActionType { get; protected set; }
public string TooltipName { get; set; }
public bool IsFavoritenOpen { get; set; } public bool IsFavoritenOpen { get; set; }
public List<AiMenuItemTemplate> AssistentCommands { get; protected set; } public List<AiMenuItemTemplate> AssistentCommands { get; protected set; }
@@ -93,6 +94,26 @@ namespace BeWo.ViewModel.Controls.AI
OpenFavoritePromptsPopupCommand = new DelegateCommand(OpenFavoritePromptsPopup, () => CanSendNewMessage); OpenFavoritePromptsPopupCommand = new DelegateCommand(OpenFavoritePromptsPopup, () => CanSendNewMessage);
ButtonState = AiChatButtonState.Loading; ButtonState = AiChatButtonState.Loading;
LoadModuleName();
}
public void LoadModuleName()
{
switch (ActionType)
{
case AiActionType.ServiceRecord:
TooltipName = "KI Zeiterfassung";
break;
case AiActionType.ServiceRecordConversation:
TooltipName = "KI Chat";
break;
case AiActionType.ServiceRecordDocumentation:
TooltipName = "KI Doku";
break;
default:
break;
}
} }
public void CheckContextSize() public void CheckContextSize()