-
Notifications
You must be signed in to change notification settings - Fork 30
/
Win_Search.xaml
41 lines (41 loc) · 2.37 KB
/
Win_Search.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<l:RoundedWindow x:Class="DesktopNote.Win_Search"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:DesktopNote"
Width="250" FontSize="10" ResizeMode="NoResize" SizeToContent="Height" RenderTransformOrigin_BG="0.5,0.5"
Loaded="Window_Loaded" ShowInTaskbar="False" Topmost="True" ButtonCloseVisible="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ContentControlBaseStyle}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type ContentControl}" BasedOn="{StaticResource ContentControlBaseStyle}">
<Setter Property="Padding" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</Grid.Resources>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{StaticResource label_search_for}"/>
<ContentControl Grid.Column="1" Margin="8 5 2 5">
<TextBox x:Name="TB_Search" Height="24" BorderThickness="0" VerticalContentAlignment="Center" TextChanged="TB_Search_TextChanged"/>
</ContentControl>
<UniformGrid Grid.Column="1" Grid.Row="1" HorizontalAlignment="Right" Rows="1">
<Button x:Name="Btn_Search" Content="{StaticResource button_search}" IsDefault="True" Click="Btn_Search_Click"/>
<Button x:Name="Btn_Cancel" Content="{StaticResource button_cancel}" IsCancel="True" Click="Btn_Cancel_Click"/>
</UniformGrid>
</Grid>
</l:RoundedWindow>