-
Notifications
You must be signed in to change notification settings - Fork 13
/
MainWindow.xaml
87 lines (83 loc) · 2.95 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<Window
x:Class="StyleSnooper.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:StyleSnooper"
Name="window"
Title="WPF Style Snooper"
Icon="icon.ico"
local:WindowSettings.Save="True"
xml:lang="en-US">
<Window.Resources>
<Style x:Key="BracketStyle" TargetType="{x:Type Run}">
<Setter Property="Foreground" Value="Blue" />
</Style>
<Style x:Key="ElementStyle" TargetType="{x:Type Run}">
<Setter Property="Foreground" Value="DarkCyan" />
</Style>
<Style x:Key="QuotesStyle" TargetType="{x:Type Run}">
<Setter Property="Foreground" Value="Maroon" />
</Style>
<Style x:Key="TextStyle" TargetType="{x:Type Run}">
<Setter Property="Foreground" Value="Navy" />
</Style>
<Style x:Key="AttributeStyle" TargetType="{x:Type Run}">
<Setter Property="Foreground" Value="Black" />
</Style>
<Style TargetType="{x:Type Paragraph}">
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="Background" Value="White" />
</Style>
</Window.Resources>
<DockPanel>
<DockPanel
Margin="10"
DockPanel.Dock="Top"
LastChildFill="False">
<Label
Name="typeLabel"
Width="100"
Content="Choose a style"
DockPanel.Dock="Left" />
<ComboBox
Name="typeComboBox"
Width="300"
DisplayMemberPath="DisplayName"
DockPanel.Dock="Left"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding Path=Styles, ElementName=window, Mode=OneWay}"
SelectionChanged="ShowStyle" />
<Button
Name="button1"
Width="75"
Height="23"
Margin="10,0,0,0"
Click="OnLoadClick"
DockPanel.Dock="Right">
Load
</Button>
<TextBox
Name="AsmName"
Height="26"
MinWidth="200"
DockPanel.Dock="Right"
IsReadOnly="True" />
</DockPanel>
<StackPanel
Margin="10,0"
DockPanel.Dock="Top"
Orientation="Horizontal">
<Label
Name="namespaceLabel"
Width="100"
Content="Namespace" />
<Label Name="namespaceValue" Content="{Binding ElementName=window, Path=Styles/ElementType.Namespace}" />
</StackPanel>
<FlowDocumentScrollViewer
Name="styleTextBox"
Padding="0"
Background="White"
FontFamily="Consolas" />
</DockPanel>
</Window>