Browse Source
Merge pull request #4950 from pr8x/devtools-misc-fixes
Devtools misc fixes
fixes/tmp
Benedikt Stebner
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
15 additions and
1 deletions
-
src/Avalonia.Diagnostics/Diagnostics/ViewModels/TreeNode.cs
-
src/Avalonia.Diagnostics/Diagnostics/Views/ControlDetailsView.xaml
-
src/Avalonia.Diagnostics/Diagnostics/Views/TreePageView.xaml
|
|
|
@ -23,6 +23,8 @@ namespace Avalonia.Diagnostics.ViewModels |
|
|
|
|
|
|
|
if (visual is IControl control) |
|
|
|
{ |
|
|
|
ElementName = control.Name; |
|
|
|
|
|
|
|
var removed = Observable.FromEventPattern<LogicalTreeAttachmentEventArgs>( |
|
|
|
x => control.DetachedFromLogicalTree += x, |
|
|
|
x => control.DetachedFromLogicalTree -= x); |
|
|
|
@ -61,6 +63,11 @@ namespace Avalonia.Diagnostics.ViewModels |
|
|
|
private set { RaiseAndSetIfChanged(ref _classes, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public string ElementName |
|
|
|
{ |
|
|
|
get; |
|
|
|
} |
|
|
|
|
|
|
|
public IVisual Visual |
|
|
|
{ |
|
|
|
get; |
|
|
|
|
|
|
|
@ -26,6 +26,12 @@ |
|
|
|
<DataGridTextColumn Header="Type" Binding="{Binding Type}" /> |
|
|
|
<DataGridTextColumn Header="Priority" Binding="{Binding Priority}" IsReadOnly="True" /> |
|
|
|
</DataGrid.Columns> |
|
|
|
|
|
|
|
<DataGrid.Styles> |
|
|
|
<Style Selector="DataGridRow TextBox"> |
|
|
|
<Setter Property="SelectionBrush" Value="LightBlue"/> |
|
|
|
</Style> |
|
|
|
</DataGrid.Styles> |
|
|
|
</DataGrid> |
|
|
|
|
|
|
|
</Grid> |
|
|
|
|
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:vm="clr-namespace:Avalonia.Diagnostics.ViewModels" |
|
|
|
x:Class="Avalonia.Diagnostics.Views.TreePageView"> |
|
|
|
<Grid ColumnDefinitions="*,4,3*"> |
|
|
|
<Grid ColumnDefinitions="0.8*,4,*"> |
|
|
|
<TreeView Name="tree" |
|
|
|
BorderThickness="0" |
|
|
|
Items="{Binding Nodes}" |
|
|
|
@ -13,6 +13,7 @@ |
|
|
|
<StackPanel Orientation="Horizontal" Spacing="8"> |
|
|
|
<TextBlock Text="{Binding Type}"/> |
|
|
|
<TextBlock Text="{Binding Classes}"/> |
|
|
|
<TextBlock Foreground="Gray" Text="{Binding ElementName}"/> |
|
|
|
</StackPanel> |
|
|
|
</TreeDataTemplate> |
|
|
|
</TreeView.DataTemplates> |
|
|
|
|