-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProcessSelectionWindow.xaml
More file actions
58 lines (54 loc) · 2.86 KB
/
ProcessSelectionWindow.xaml
File metadata and controls
58 lines (54 loc) · 2.86 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<Window x:Class="WpfApp1.ProcessSelectionWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Select Process" Height="500" Width="500"
Background="#2b2b2b"
WindowStartupLocation="CenterOwner">
<Window.Resources>
<Style x:Key="DarkButton" TargetType="Button">
<Setter Property="Background" Value="#3c3f41"/>
<Setter Property="Foreground" Value="#ffffff"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#4a4d4f"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListBox x:Name="ProcessListBox" Grid.Row="1" Background="#3c3f41" Foreground="#ffffff" BorderThickness="0" Margin="0,0,0,10">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Name}" Foreground="#ffffff" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Text="{Binding MemoryUsage}" Foreground="#aaaaaa" Margin="10,0,0,0"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="cancel" Click="Cancel_Click" Style="{StaticResource DarkButton}" Margin="0,0,10,0" Width="80"/>
<Button Content="Select" Click="Select_Click" Style="{StaticResource DarkButton}" Width="80" Foreground="#FF85FF00"/>
</StackPanel>
</Grid>
</Window>