TextBox, PropertyChangeHandler

This commit is contained in:
2023-08-11 21:51:44 +02:00
parent e989a65e81
commit 1fde0df2d6
81 changed files with 1539 additions and 390 deletions

View File

@@ -39,7 +39,7 @@ public partial class CommandPalette : UserControl
}
else
{
if (e.ToGeneralKeyEventArgs(_appKeyService.Value) is not { } eventArgs) return;
if (e.ToGeneralKeyEventArgs(_appKeyService.Value, e.KeyModifiers) is not { } eventArgs) return;
viewModel.HandleKeyDown(eventArgs);
}
@@ -50,7 +50,7 @@ public partial class CommandPalette : UserControl
if (e.Handled
|| DataContext is not ICommandPaletteViewModel viewModel) return;
if (e.ToGeneralKeyEventArgs(_appKeyService.Value) is not { } eventArgs) return;
if (e.ToGeneralKeyEventArgs(_appKeyService.Value, e.KeyModifiers) is not { } eventArgs) return;
viewModel.HandleKeyUp(eventArgs);
}
}

View File

@@ -1,6 +1,7 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using FileTime.App.Core.Models;
using FileTime.App.Core.Services;
using FileTime.App.FrequencyNavigation.ViewModels;
using FileTime.GuiApp.App.Extensions;
@@ -39,7 +40,7 @@ public partial class FrequencyNavigation : UserControl
}
else
{
if (e.ToGeneralKeyEventArgs(_appKeyService.Value) is not { } eventArgs) return;
if (e.ToGeneralKeyEventArgs(_appKeyService.Value, e.KeyModifiers) is not { } eventArgs) return;
viewModel.HandleKeyDown(eventArgs);
}
@@ -50,7 +51,7 @@ public partial class FrequencyNavigation : UserControl
if (e.Handled
|| DataContext is not IFrequencyNavigationViewModel viewModel) return;
if (e.ToGeneralKeyEventArgs(_appKeyService.Value) is not { } eventArgs) return;
if (e.ToGeneralKeyEventArgs(_appKeyService.Value, e.KeyModifiers) is not { } eventArgs) return;
viewModel.HandleKeyUp(eventArgs);
}
}

View File

@@ -972,7 +972,7 @@
Background="{DynamicResource BarelyTransparentBackgroundColor}"
DataContext="{Binding FrequencyNavigationService.CurrentModal}"
HorizontalAlignment="Stretch"
IsVisible="{Binding ShowWindow^, FallbackValue=False}"
IsVisible="{Binding ShowWindow.Value, FallbackValue=False}"
VerticalAlignment="Stretch">
<Grid Background="{DynamicResource ContainerBackgroundColor}" Margin="100">
<local:FrequencyNavigation IsVisible="{Binding ShowWindow^, FallbackValue=False}" />
@@ -983,7 +983,7 @@
Background="{DynamicResource BarelyTransparentBackgroundColor}"
DataContext="{Binding CommandPaletteService.CurrentModal}"
HorizontalAlignment="Stretch"
IsVisible="{Binding ShowWindow^, FallbackValue=False}"
IsVisible="{Binding ShowWindow.Value, FallbackValue=False}"
VerticalAlignment="Stretch">
<Grid Background="{DynamicResource ContainerBackgroundColor}" Margin="100">
<local:CommandPalette IsVisible="{Binding ShowWindow^, FallbackValue=False}" />