polish focus behavior of tag box.
MODIFY
WalletWasabi.Fluent.Desktop/WalletWasabi.Fluent.Desktop.csproj
WalletWasabi.Fluent.Desktop/WalletWasabi.Fluent.Desktop.csproj
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Avalonia.Desktop" Version="0.10.999-cibuild0011740-beta" />
- <PackageReference Include="Avalonia.ReactiveUI" Version="0.10.999-cibuild0011740-beta" />
+ <PackageReference Include="Avalonia.Desktop" Version="0.10.999-cibuild0011747-beta" />
+ <PackageReference Include="Avalonia.ReactiveUI" Version="0.10.999-cibuild0011747-beta" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WalletWasabi.Fluent\WalletWasabi.Fluent.csproj" />

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
@@ -92,6 +92,15 @@ namespace WalletWasabi.Fluent.Controls
_autoCompleteBox
.AddDisposableHandler(TextInputEvent, OnTextInput, RoutingStrategies.Tunnel)
.DisposeWith(_compositeDisposable);
+
+ if (_isFocused)
+ {
+ Dispatcher.UIThread.Post(
+ () =>
+ {
+ _autoCompleteBox.Focus();
+ });
+ }
}
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
@@ -152,10 +161,13 @@ namespace WalletWasabi.Fluent.Controls
private void FocusChanged()
{
- if (IsKeyboardFocusWithin != _isFocused)
+ if (_autoCompleteBox is {})
+ {
+ if (IsKeyboardFocusWithin && !_autoCompleteBox.IsKeyboardFocusWithin)
{
_autoCompleteBox?.Focus();
}
+ }
_isFocused = IsKeyboardFocusWithin;
}

MODIFY
WalletWasabi.Fluent/Views/RecoveryPageView.axaml
WalletWasabi.Fluent/Views/RecoveryPageView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
xmlns:vm="clr-namespace:WalletWasabi.Fluent.ViewModels"
+ xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
+ xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="vm:RecoveryPageViewModel"
x:Class="WalletWasabi.Fluent.Views.RecoveryPageView">
RestrictInputToSuggestions="True"
Items="{CompiledBinding Mnemonics}"
Suggestions="{CompiledBinding Suggestions}"
- SelectedTag="{CompiledBinding SelectedTag}"/>
+ SelectedTag="{CompiledBinding SelectedTag}">
+ <i:Interaction.Behaviors>
+ <behaviors:FocusOnAttachedBehavior />
+ </i:Interaction.Behaviors>
+ </c:TagsBox>
</StackPanel>
</c:ContentArea>
<Button Content="Cancel" Command="{Binding CancelCommand}" Classes="invisible" HorizontalAlignment="Left"

MODIFY
WalletWasabi.Fluent/WalletWasabi.Fluent.csproj
WalletWasabi.Fluent/WalletWasabi.Fluent.csproj
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Avalonia.ReactiveUI" Version="0.10.999-cibuild0011740-beta" />
- <PackageReference Include="Avalonia.Diagnostics" Version="0.10.999-cibuild0011740-beta" />
- <PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.0-preview5" />
- <PackageReference Include="Avalonia.Xaml.Interactions.Custom" Version="0.10.0-preview5" />
- <PackageReference Include="Avalonia.Xaml.Interactivity" Version="0.10.0-preview5" />
+ <PackageReference Include="Avalonia.ReactiveUI" Version="0.10.999-cibuild0011747-beta" />
+ <PackageReference Include="Avalonia.Diagnostics" Version="0.10.999-cibuild0011747-beta" />
+ <PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.0-preview6" />
+ <PackageReference Include="Avalonia.Xaml.Interactions.Custom" Version="0.10.0-preview6" />
+ <PackageReference Include="Avalonia.Xaml.Interactivity" Version="0.10.0-preview6" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WalletWasabi.Gui\WalletWasabi.Gui.csproj" />

polish focus behavior of tag box.