101
101
<DataTemplate .Triggers>
102
102
<MultiDataTrigger >
103
103
<MultiDataTrigger .Conditions>
104
- <Condition Binding =" {Binding Path=Kind}" Value =" UserFolder" />
105
- <Condition Binding =" {Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value =" True" />
106
- </MultiDataTrigger .Conditions>
107
- <Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource FolderOpenDrawingImage}" />
108
- </MultiDataTrigger >
109
- <MultiDataTrigger >
110
- <MultiDataTrigger .Conditions>
111
- <Condition Binding =" {Binding Path=Kind}" Value =" UserFolder" />
112
- <Condition Binding =" {Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value =" False" />
104
+ <Condition Binding =" {Binding Path=Kind}" Value =" Folder" />
105
+ <Condition Binding =" {Binding Path=Name}" Value =" EVM Networks" />
113
106
</MultiDataTrigger .Conditions>
114
- <Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource FolderDrawingImage }" />
107
+ <Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource BlockchainNetworkDrawingImage }" />
115
108
</MultiDataTrigger >
116
109
<MultiDataTrigger >
117
110
<MultiDataTrigger .Conditions>
120
113
</MultiDataTrigger .Conditions>
121
114
<Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource GlobeDrawingImage}" />
122
115
</MultiDataTrigger >
123
-
124
116
<DataTrigger Binding =" {Binding Path=Kind}" Value =" Endpoint" >
125
117
<Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource UrlDrawingImage}" />
126
118
</DataTrigger >
127
-
128
119
<MultiDataTrigger >
129
120
<MultiDataTrigger .Conditions>
130
121
<Condition Binding =" {Binding Path=Kind}" Value =" Network" />
131
122
<Condition Binding =" {Binding Path=Name}" Value =" Stratis Mainnet" />
132
123
</MultiDataTrigger .Conditions>
133
124
<Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource StratisIconDrawingImage}" />
134
125
</MultiDataTrigger >
126
+ <MultiDataTrigger >
127
+ <MultiDataTrigger .Conditions>
128
+ <Condition Binding =" {Binding Path=Kind}" Value =" UserFolder" />
129
+ <Condition Binding =" {Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value =" True" />
130
+ </MultiDataTrigger .Conditions>
131
+ <Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource FolderOpenDrawingImage}" />
132
+ </MultiDataTrigger >
133
+ <MultiDataTrigger >
134
+ <MultiDataTrigger .Conditions>
135
+ <Condition Binding =" {Binding Path=Kind}" Value =" UserFolder" />
136
+ <Condition Binding =" {Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Value =" False" />
137
+ </MultiDataTrigger .Conditions>
138
+ <Setter TargetName =" NodeImage" Property =" Source" Value =" {StaticResource FolderDrawingImage}" />
139
+ </MultiDataTrigger >
135
140
</DataTemplate .Triggers>
136
141
</DataTemplate >
137
142
150
155
<Style x : Key =" ContextMenuStyle" TargetType =" {x:Type ContextMenu}" >
151
156
<Setter Property =" Foreground" Value =" {DynamicResource TextFillColorPrimaryBrush}" />
152
157
<Setter Property =" Background" Value =" {DynamicResource ApplicationBackgroundBrush}" />
158
+ <Style .Resources>
159
+ <Style TargetType =" {x:Type Image}" >
160
+ <Setter Property =" Height" Value =" 16" />
161
+ <Setter Property =" Width" Value =" 16" />
162
+ <Setter Property =" Margin" Value =" -8,2,8,0" />
163
+ </Style >
164
+ </Style .Resources>
153
165
</Style >
154
166
155
167
<!-- Context Menus -->
156
168
<ContextMenu x : Key =" NetworkContextMenu" Style =" {DynamicResource ContextMenuStyle}" >
157
169
<MenuItem Header =" Add Endpoint..." Command =" {x:Static stratisui:BlockchainExplorerTree.NewEndpointCmd}" >
158
170
<MenuItem .Icon>
159
- <Image Source =" {StaticResource GlobeDrawingImage}" Width = " 16 " Height = " 16 " />
171
+ <Image Source =" {StaticResource GlobeDrawingImage}" />
160
172
</MenuItem .Icon>
161
173
</MenuItem >
162
174
</ContextMenu >
163
175
164
176
<ContextMenu x : Key =" StratisNetworkContextMenu" Style =" {DynamicResource ContextMenuStyle}" >
165
177
<MenuItem Header =" Statistics" Command =" {x:Static stratisui:BlockchainExplorerTree.NewEndpointCmd}" >
166
178
<MenuItem .Icon>
167
- <Image Source =" {StaticResource GlobeDrawingImage}" Width = " 16 " Height = " 16 " />
179
+ <Image Source =" {StaticResource GlobeDrawingImage}" />
168
180
</MenuItem .Icon>
169
181
</MenuItem >
170
182
</ContextMenu >
171
183
172
- <ContextMenu x : Key =" TreeMenu " Style =" {DynamicResource ContextMenuStyle}" >
184
+ <ContextMenu x : Key =" RootContextMenu " Style =" {DynamicResource ContextMenuStyle}" >
173
185
<MenuItem Header =" Add Network..." Command =" {x:Static stratisui:BlockchainExplorerTree.NewNetworkCmd}" >
174
186
<MenuItem .Icon>
175
- <Image Source =" {DynamicResource AddNetworkDrawingImage}" Width = " 16 " Height = " 16 " />
187
+ <Image Source =" {DynamicResource AddNetworkDrawingImage}" />
176
188
</MenuItem .Icon>
177
189
</MenuItem >
178
190
</ContextMenu >
188
200
<cm : SortDescription PropertyName =" Header.CategoryName" Direction =" Descending" />
189
201
</cm : SortDescriptionCollection >
190
202
191
- <!-- The root node for the tree -->
192
- <TreeViewItem x : Key =" RootNode"
193
- Foreground =" {DynamicResource TextFillColorPrimaryBrush}"
194
- Background =" {DynamicResource TextBackgroundBrush}" >
195
- <TreeViewItem .Header>
196
- <StackPanel Orientation =" Horizontal" Margin =" 0,2,0,2" >
197
- <Image x : Name =" RootNodeImage" Source =" {DynamicResource BlockchainNetworkDrawingImage}" Width =" 16" Height =" 16" />
198
- <TextBlock Text =" EVM Networks" Margin =" 4,0,0,0" />
199
- </StackPanel >
200
- </TreeViewItem .Header>
201
- <TreeViewItem .ContextMenu>
202
- <ContextMenu Style =" {StaticResource ContextMenuStyle}" >
203
- <MenuItem Header =" Add Network..." Command =" {x:Static stratisui:BlockchainExplorerTree.NewNetworkCmd}" >
204
- <MenuItem .Icon>
205
- <Image Source =" {StaticResource BlockchainNetworkDrawingImage}" Width =" 16" Height =" 16" VerticalAlignment =" Center" HorizontalAlignment =" Center" />
206
- </MenuItem .Icon>
207
- </MenuItem >
208
- </ContextMenu >
209
- </TreeViewItem .ContextMenu>
210
- </TreeViewItem >
203
+ <!-- Dialog style -->
204
+ <Style x : Key =" DialogStyle" TargetType =" {x:Type StackPanel}" >
205
+ <Style .Resources>
206
+ <Style TargetType =" {x:Type ui:TextBox}" >
207
+ <Setter Property =" FontSize" Value =" 12" />
208
+ </Style >
209
+ <Style TargetType =" {x:Type ui:NumberBox}" >
210
+ <Setter Property =" FontSize" Value =" 12" />
211
+ <Setter Property =" HorizontalContentAlignment" Value =" Right" />
212
+ </Style >
213
+ <Style TargetType =" {x:Type ui:TextBlock}" >
214
+ <Setter Property =" FontSize" Value =" 12" />
215
+ </Style >
216
+ </Style .Resources>
217
+ </Style >
211
218
212
219
<!-- Dialogs -->
213
- <StackPanel x : Key =" AddNetworkDialog" Orientation =" Vertical" VerticalAlignment =" Top" >
220
+ <StackPanel x : Key =" AddNetworkDialog" Orientation =" Vertical" VerticalAlignment =" Top" Style = " {DynamicResource DialogStyle} " >
214
221
<StackPanel Orientation =" Vertical" >
215
222
<ui : TextBlock Text =" Enter the network name:" VerticalAlignment =" Center" Margin =" 1,0,0,2" />
216
223
<ui : TextBox x : Name =" NetworkNameTextBox" Width =" 150" Margin =" 0,2,10,4" VerticalAlignment =" Center" />
226
233
<StackPanel Orientation =" Vertical" >
227
234
<Grid >
228
235
<ui : TextBlock Name = " AddNetworkDialogValidationErrors" Grid.Row=" 0" Foreground =" Red" Visibility =" Hidden" VerticalAlignment =" Center" TextWrapping =" WrapWithOverflow"
229
- ScrollViewer.VerticalScrollBarVisibility=" Auto" ScrollViewer.CanContentScroll=" True" />
236
+ ScrollViewer.VerticalScrollBarVisibility=" Auto" ScrollViewer.CanContentScroll=" True" />
230
237
<ui : ProgressRing Name =" AddNetworkDialogProgressRing" IsIndeterminate =" True" IsEnabled =" True" Width =" 20" Height =" 20" Visibility =" Hidden" />
231
238
</Grid >
232
239
</StackPanel >
233
- <StackPanel .Resources>
234
- <Style TargetType =" {x:Type ui:TextBox}" >
235
- <Setter Property =" FontSize" Value =" 12" />
236
- </Style >
237
- <Style TargetType =" {x:Type ui:NumberBox}" >
238
- <Setter Property =" FontSize" Value =" 12" />
239
- <Setter Property =" HorizontalContentAlignment" Value =" Right" />
240
- </Style >
241
- <Style TargetType =" {x:Type ui:TextBlock}" >
242
- <Setter Property =" FontSize" Value =" 12" />
243
- </Style >
244
- </StackPanel .Resources>
245
240
</StackPanel >
246
241
247
- <StackPanel x : Key =" AddEndpointDialog" Orientation =" Vertical" VerticalAlignment =" Top" >
242
+ <StackPanel x : Key =" AddEndpointDialog" Orientation =" Vertical" VerticalAlignment =" Top" Style = " {DynamicResource DialogStyle} " >
248
243
<StackPanel Orientation =" Vertical" >
249
244
<ui : TextBlock Text =" JSON-RPC Url:" VerticalAlignment =" Center" Margin =" 1,0,0,2" />
250
245
<ui : TextBox x : Name =" EndpointRpcUrlTextBox" Width =" 150" Margin =" 0,2,10,4" VerticalAlignment =" Center" />
251
246
</StackPanel >
252
247
<StackPanel Orientation =" Vertical" >
253
248
<ui : TextBlock Name = " AddEndpointDialogValidationErrors" Foreground =" Red" Visibility =" Hidden" VerticalAlignment =" Center" TextWrapping =" WrapWithOverflow" />
254
249
</StackPanel >
255
- <StackPanel .Resources>
256
- <Style TargetType =" {x:Type ui:TextBox}" >
257
- <Setter Property =" FontSize" Value =" 12" />
258
- </Style >
259
- <Style TargetType =" {x:Type ui:TextBlock}" >
260
- <Setter Property =" FontSize" Value =" 12" />
261
- </Style >
262
- </StackPanel .Resources>
263
250
</StackPanel >
264
251
</ResourceDictionary >
0 commit comments