make flyout work.
MODIFY
WalletWasabi.Fluent.Desktop/Program.cs
WalletWasabi.Fluent.Desktop/Program.cs
@@ -208,7 +208,7 @@ public class Program
}
return result
- .With(new Win32PlatformOptions { AllowEglInitialization = true, UseDeferredRendering = true, UseWindowsUIComposition = true })
+ .With(new Win32PlatformOptions { AllowEglInitialization = true, UseDeferredRendering = true, UseWindowsUIComposition = true, OverlayPopups = true})
.With(new X11PlatformOptions { UseGpu = useGpuLinux, WmClass = "Wasabi Wallet" })
.With(new AvaloniaNativePlatformOptions { UseDeferredRendering = true, UseGpu = true })
.With(new MacOSPlatformOptions { ShowInDock = true });

MODIFY
WalletWasabi.Fluent/Styles/Styles.axaml
WalletWasabi.Fluent/Styles/Styles.axaml
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/SettingsLayout.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/Slider.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/ToolTip.axaml" />
+ <StyleInclude Source="avares://WalletWasabi.Fluent/Styles/FlyoutPresenter.axaml" />
</Styles>

MODIFY
WalletWasabi.Fluent/Views/MainView.axaml
WalletWasabi.Fluent/Views/MainView.axaml
</Panel>
</Border>
- <searchBar:SearchBar DataContext="{Binding SearchBar}" Margin="0 15 0 0" Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="3"
- Grid.Column="0" />
+ <searchBar:SearchBar DataContext="{Binding SearchBar}" HorizontalAlignment="Center" VerticalAlignment="Stretch"
+ Grid.Row="0" Grid.Column="1" />
</Grid>
</Panel>

MODIFY
WalletWasabi.Fluent/Views/SearchBar/SearchBar.axaml
WalletWasabi.Fluent/Views/SearchBar/SearchBar.axaml
<Style Selector="TextBox#SearchBox">
<Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="White" />
+ <Setter Property="BorderBrush" Value="{DynamicResource TileBorderColor}" />
<Setter Property="BorderThickness" Value="1 1 1 1" />
- <Setter Property="CornerRadius" Value="4" />
<Setter Property="Margin" Value="0" />
<Setter Property="FontSize" Value="12" />
<Setter Property="Padding" Value="6 3" />
<Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="MinHeight" Value="8" />
</Style>
<Style Selector="TextBox#SearchBox /template/ Border#PART_BorderElement">
<searchBar:SearchBarDesignViewModel />
</Design.DataContext>
- <StackPanel Margin="300 0" VerticalAlignment="Top">
<TextBox x:Name="SearchBox" Watermark="Search settings / advanced features" HorizontalAlignment="Left"
- Text="{Binding SearchText, Mode=TwoWay}" MaxWidth="300" VerticalAlignment="Top" />
+ Text="{Binding SearchText, Mode=TwoWay}" MaxWidth="300" VerticalAlignment="Center" />
<FlyoutBase.AttachedFlyout>
- <Flyout Placement="BottomEdgeAlignedRight" IsOpen="False" ShowMode="TransientWithDismissOnPointerMoveAway">
- <s:SearchBarDropdown x:Name="SearchBarDropdown" IsVisible="False" HorizontalAlignment="Left" MinWidth="400"
- MaxHeight="500" />
+ <Flyout Placement="Bottom" ShowMode="Transient" FlyoutPresenterClasses="search">
+ <s:SearchBarDropdown x:Name="SearchBarDropdown" Width="300" />
</Flyout>
</FlyoutBase.AttachedFlyout>
-
- </StackPanel>
-
</UserControl>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/SearchBar/SearchBarDropdown.axaml
WalletWasabi.Fluent/Views/SearchBar/SearchBarDropdown.axaml
xmlns:ic="clr-namespace:Avalonia.Xaml.Interactions.Custom;assembly=Avalonia.Xaml.Interactions"
x:Class="WalletWasabi.Fluent.Views.SearchBar.SearchBarDropdown"
x:CompileBindings="True"
- x:Name="UserControl"
x:DataType="sb:SearchBarViewModel"
xmlns:conv="clr-namespace:WalletWasabi.Fluent.Converters"
- xmlns:sb="clr-namespace:WalletWasabi.Fluent.ViewModels.SearchBar"
- Background="{StaticResource SystemBaseLowColor}">
-
+ xmlns:sb="clr-namespace:WalletWasabi.Fluent.ViewModels.SearchBar">
<Design.DataContext>
<sb:SearchBarDesignViewModel />
</Design.DataContext>
<UserControl.Styles>
-
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="0" />
+ <Setter Property="Background" Value="Transparent" />
+ </Style>
+
+ <Style Selector="ListBox">
+ <Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="ItemsControl:empty">
</Setter.Value>
</Setter>
</Style>
-
</UserControl.Styles>
- <ScrollViewer>
- <ItemsControl Items="{Binding Groups}">
+ <ItemsControl Items="{Binding Groups}" Margin="10">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type sb:SearchItemGroup}">
<DockPanel Margin="10 ">
<DataTemplate x:DataType="sb:SearchItem">
<Panel Background="Transparent">
<DockPanel Background="Transparent" Margin="10">
-
<PathIcon DockPanel.Dock="Left" Width="16" Height="16" Opacity="0.8" VerticalAlignment="Center">
<PathIcon.Data>
<Binding Path="Icon" Converter="{x:Static conv:NavBarIconConverter.Instance}" />
</PathIcon>
<TextBlock Margin="10 0" VerticalAlignment="Center" DockPanel.Dock="Left" Text="{Binding Name}" />
<TextBlock FontWeight="ExtraLight" VerticalAlignment="Center" Text="{Binding Description}" />
-
</DockPanel>
<i:Interaction.Behaviors>
<ic:RoutedEventTriggerBehavior RoutedEvent="{x:Static InputElement.PointerPressedEvent}">
<ia:InvokeCommandAction Command="{Binding Command}" />
</ic:RoutedEventTriggerBehavior>
- <ic:RoutedEventTriggerBehavior RoutedEvent="{x:Static InputElement.PointerReleasedEvent}">
- <ChangePropertyAction TargetObject="UserControl" PropertyName="IsVisible"
- Value="False" />
- <ChangePropertyAction TargetObject="ListBox" PropertyName="SelectedItem"
- Value="{x:Null}" />
- </ic:RoutedEventTriggerBehavior>
</i:Interaction.Behaviors>
-
</Panel>
-
</DataTemplate>
</ListBox.ItemTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
- </ScrollViewer>
</UserControl>
\ No newline at end of file

make flyout work.