replace v6 with experimental v7 code

This commit is contained in:
stax76
2023-10-24 11:17:45 +02:00
parent fb27bb8727
commit 5706d7b66d
212 changed files with 15014 additions and 12173 deletions

View File

@@ -0,0 +1,90 @@
<UserControl
x:Class="MpvNet.Windows.WPF.Controls.SearchControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:MpvNet.Windows.WPF.Controls"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
>
<Grid Background="{Binding Theme.Background}">
<TextBlock
Name="HintTextBlock"
Padding="6,1"
Text="Find a setting"
VerticalAlignment="Center"
Foreground="{Binding Theme.Foreground2}"
Background="{Binding Theme.Background}"
/>
<TextBox
Name="SearchTextBox"
Height="25"
BorderThickness="2"
Padding="2"
Background="Transparent"
Foreground="{Binding Theme.Foreground}"
CaretBrush="{Binding Theme.Foreground}"
GotFocus="SearchTextBox_GotFocus"
PreviewMouseUp="SearchTextBox_PreviewMouseUp"
Text="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type controls:SearchControl}},
Path=Text, UpdateSourceTrigger=PropertyChanged}"
/>
<Button
Name="SearchClearButton"
Background="Transparent"
HorizontalAlignment="Right"
FontFamily="Marlett"
FontSize="10"
Width="17"
Height="17"
Margin="2,0,4,0"
Visibility="Hidden"
Command="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type controls:SearchControl}}, Path=ClearCommand}"
>r
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3"/>
</Style>
</Button.Resources>
<Button.Style>
<Style TargetType="Button">
<Setter Property="Background" Value="{Binding Theme.Background}"/>
<Setter Property="Foreground" Value="{Binding Theme.Foreground2}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
BorderThickness="1"
BorderBrush="{TemplateBinding Foreground}"
SnapsToDevicePixels="True"
>
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center"
/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{Binding Theme.Heading}"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</Grid>
</UserControl>