|
| 1 | +<ResourceDictionary xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:behaviors="using:Beutl.Controls.Behaviors" |
| 4 | + xmlns:lang="using:Beutl.Language" |
| 5 | + xmlns:service="using:Beutl.Services" |
| 6 | + xmlns:local="using:Beutl.Controls.PropertyEditors" |
| 7 | + xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
| 8 | + x:CompileBindings="True"> |
| 9 | + <Design.PreviewWith> |
| 10 | + <Border Height="600" Padding="50"> |
| 11 | + <local:FilterEffectPickerFlyoutPresenter VerticalAlignment="Center"> |
| 12 | + <local:SimpleColorPicker /> |
| 13 | + </local:FilterEffectPickerFlyoutPresenter> |
| 14 | + </Border> |
| 15 | + </Design.PreviewWith> |
| 16 | + |
| 17 | + <ControlTheme x:Key="{x:Type local:FilterEffectPickerFlyoutPresenter}" |
| 18 | + TargetType="local:FilterEffectPickerFlyoutPresenter"> |
| 19 | + <Setter Property="Width" Value="240" /> |
| 20 | + <Setter Property="ShowHideButtons" Value="True" /> |
| 21 | + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
| 22 | + <Setter Property="VerticalContentAlignment" Value="Stretch" /> |
| 23 | + <Setter Property="Background" Value="{DynamicResource FlyoutPresenterBackground}" /> |
| 24 | + <Setter Property="BorderBrush" Value="{DynamicResource FlyoutBorderThemeBrush}" /> |
| 25 | + <Setter Property="BorderThickness" Value="{StaticResource FlyoutBorderThemeThickness}" /> |
| 26 | + <Setter Property="Padding" Value="0" /> |
| 27 | + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> |
| 28 | + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> |
| 29 | + <Setter Property="CornerRadius" Value="{DynamicResource OverlayCornerRadius}" /> |
| 30 | + <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" /> |
| 31 | + <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" /> |
| 32 | + <Setter Property="Template"> |
| 33 | + <ControlTemplate> |
| 34 | + <ui:FABorder Padding="{DynamicResource FlyoutBorderThemePadding}" |
| 35 | + Background="{TemplateBinding Background}" |
| 36 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 37 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 38 | + CornerRadius="{TemplateBinding CornerRadius}"> |
| 39 | + <Grid RowDefinitions="Auto,Auto,Auto"> |
| 40 | + <Grid Name="DragArea" |
| 41 | + Height="40" |
| 42 | + VerticalAlignment="Top" |
| 43 | + Background="Transparent" |
| 44 | + ColumnDefinitions="*,Auto"> |
| 45 | + <WrapPanel Name="TabLayout" Margin="4,4,0,4"> |
| 46 | + <ToggleButton IsChecked="{TemplateBinding ShowSearchBox, Mode=TwoWay}" |
| 47 | + Name="ShowSearchBoxButton"> |
| 48 | + <ui:SymbolIcon Symbol="Find" /> |
| 49 | + </ToggleButton> |
| 50 | + <ToggleButton Name="ShowAllButton" IsChecked="{TemplateBinding ShowAll, Mode=TwoWay}"> |
| 51 | + <ui:SymbolIcon Symbol="More" /> |
| 52 | + </ToggleButton> |
| 53 | + </WrapPanel> |
| 54 | + |
| 55 | + <Button Name="CloseButton" |
| 56 | + Grid.Column="1" |
| 57 | + Width="32" |
| 58 | + Height="32" |
| 59 | + Margin="4" |
| 60 | + Padding="0" |
| 61 | + HorizontalAlignment="Right" |
| 62 | + HorizontalContentAlignment="Center" |
| 63 | + VerticalContentAlignment="Center" |
| 64 | + Theme="{StaticResource TransparentButton}"> |
| 65 | + <ui:FontIcon FontFamily="{DynamicResource SymbolThemeFontFamily}" Glyph="" /> |
| 66 | + </Button> |
| 67 | + </Grid> |
| 68 | + |
| 69 | + <Border Grid.Row="2" |
| 70 | + BorderBrush="{DynamicResource PickerFlyoutPresenterDivider}" |
| 71 | + BorderThickness="0,1,0,0"> |
| 72 | + |
| 73 | + <Panel Name="AcceptDismissContainer" |
| 74 | + Height="{DynamicResource PickerAcceptDismissRegionHeight}" |
| 75 | + IsVisible="False"> |
| 76 | + <Grid ColumnDefinitions="*,*"> |
| 77 | + <Button Name="AcceptButton" |
| 78 | + Margin="4,4,2,4" |
| 79 | + HorizontalAlignment="Stretch" |
| 80 | + VerticalAlignment="Stretch" |
| 81 | + Theme="{StaticResource FlyoutAcceptDismiss}"> |
| 82 | + <ui:SymbolIcon FontSize="18" Symbol="Checkmark" /> |
| 83 | + </Button> |
| 84 | + <Button Name="DismissButton" |
| 85 | + Grid.Column="1" |
| 86 | + Margin="2,4,4,4" |
| 87 | + HorizontalAlignment="Stretch" |
| 88 | + VerticalAlignment="Stretch" |
| 89 | + Theme="{StaticResource FlyoutAcceptDismiss}"> |
| 90 | + <ui:SymbolIcon FontSize="16" Symbol="Dismiss" /> |
| 91 | + </Button> |
| 92 | + </Grid> |
| 93 | + |
| 94 | + </Panel> |
| 95 | + </Border> |
| 96 | + |
| 97 | + <StackPanel Grid.Row="1"> |
| 98 | + <TextBox x:Name="SearchTextBox" |
| 99 | + Classes="clearButton" |
| 100 | + Text="{TemplateBinding SearchText, Mode=TwoWay}" |
| 101 | + Margin="6,0,6,6" |
| 102 | + IsVisible="False" |
| 103 | + Watermark="{x:Static lang:Strings.Search}" /> |
| 104 | + |
| 105 | + <ListBox x:Name="PART_ListBox" SelectedItem="{TemplateBinding SelectedItem, Mode=TwoWay}" |
| 106 | + ItemsSource="{TemplateBinding Items}" Height="250"> |
| 107 | + <ListBox.ItemTemplate> |
| 108 | + <DataTemplate x:DataType="service:LibraryItem"> |
| 109 | + <TextBlock VerticalAlignment="Center" Text="{Binding DisplayName}" /> |
| 110 | + </DataTemplate> |
| 111 | + </ListBox.ItemTemplate> |
| 112 | + </ListBox> |
| 113 | + </StackPanel> |
| 114 | + |
| 115 | + <ProgressRing Name="PART_ProgressRing" |
| 116 | + IsVisible="False" |
| 117 | + IsIndeterminate="False" |
| 118 | + Grid.RowSpan="3" |
| 119 | + VerticalAlignment="Center" |
| 120 | + HorizontalAlignment="Center" /> |
| 121 | + </Grid> |
| 122 | + </ui:FABorder> |
| 123 | + </ControlTemplate> |
| 124 | + </Setter> |
| 125 | + |
| 126 | + <Style Selector="^:acceptdismiss /template/ Panel#AcceptDismissContainer"> |
| 127 | + <Setter Property="IsVisible" Value="True" /> |
| 128 | + </Style> |
| 129 | + <Style Selector="^:acceptdismiss /template/ Button#CloseButton"> |
| 130 | + <Setter Property="IsVisible" Value="False" /> |
| 131 | + </Style> |
| 132 | + |
| 133 | + <Style Selector="^:search-box /template/ TextBox#SearchTextBox"> |
| 134 | + <Setter Property="IsVisible" Value="True" /> |
| 135 | + </Style> |
| 136 | + |
| 137 | + <Style Selector="^:busy /template/ ProgressRing#PART_ProgressRing"> |
| 138 | + <Setter Property="IsVisible" Value="True" /> |
| 139 | + <Setter Property="IsIndeterminate" Value="True" /> |
| 140 | + </Style> |
| 141 | + |
| 142 | + <Style Selector="^ /template/ WrapPanel#TabLayout"> |
| 143 | + <Style Selector="^ > ToggleButton"> |
| 144 | + <Setter Property="Width" Value="32" /> |
| 145 | + <Setter Property="Height" Value="32" /> |
| 146 | + <Setter Property="Margin" Value="0,0,4,0" /> |
| 147 | + <Setter Property="Theme" Value="{StaticResource ColorPickerTypeTransparentToggleButtonStyle}" /> |
| 148 | + |
| 149 | + <Style Selector="^ > ui|FontIcon"> |
| 150 | + <Setter Property="FontFamily" Value="{DynamicResource SymbolThemeFontFamily}" /> |
| 151 | + </Style> |
| 152 | + </Style> |
| 153 | + </Style> |
| 154 | + </ControlTheme> |
| 155 | +</ResourceDictionary> |
0 commit comments