-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
56 lines (56 loc) · 3.04 KB
/
MainWindow.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<Window x:Class="MemoryDump.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:util="clr-namespace:Wpf.Util"
Title="Application memory dumper" Height="600" Width="750"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Window.Resources>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Padding" Value="5,0,0,0" />
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
</Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Black" />
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
</Style>
</Window.Resources>
<Grid>
<ListView
ItemsSource="{Binding ProcessList}"
Margin="12,12,12,43"
SelectionChanged="ListView_SelectionChanged"
SelectionMode="Single"
util:GridViewSort.AutoSort="True">
<ListView.View>
<GridView>
<GridViewColumn
Width="60"
DisplayMemberBinding="{Binding Id}"
util:GridViewSort.PropertyName="Id">
<GridViewColumnHeader Content="Id" />
</GridViewColumn>
<GridViewColumn
Width="200"
DisplayMemberBinding="{Binding ProcessName}"
util:GridViewSort.PropertyName="ProcessName">
<GridViewColumnHeader Content="Process" />
</GridViewColumn>
<GridViewColumn
Width="420"
DisplayMemberBinding="{Binding MainWindowTitle}"
util:GridViewSort.PropertyName="MainWindowTitle">
<GridViewColumnHeader Content="Title" />
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<Button Margin="12,0,0,12" Content="Refresh" Click="RefreshProcesses" Name="refreshButton" HorizontalAlignment="Left" Width="76" Height="25" VerticalAlignment="Bottom" />
<Button Margin="0,0,12,12" Content="Create memory dump" Click="MemoryDumpProcess" Name="dumpButton" HorizontalAlignment="Right" Width="168" Height="25" VerticalAlignment="Bottom" Visibility="Visible" />
<ProgressBar Height="25" Margin="12,0,186,12" Name="progressBar" VerticalAlignment="Bottom" IsIndeterminate="True" Visibility="Hidden" />
<Label Content="" Height="28" HorizontalAlignment="Right" Margin="0,0,12,9" Name="progressText" VerticalAlignment="Bottom" Width="168" HorizontalContentAlignment="Center" Visibility="Hidden" />
</Grid>
</Window>