committed by
GitHub
10 changed files with 88 additions and 84 deletions
@ -1,23 +1,24 @@ |
|||||
<UserControl xmlns="https://github.com/avaloniaui" |
<UserControl xmlns="https://github.com/avaloniaui" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
x:Class="Avalonia.Diagnostics.DevTools"> |
x:Class="Avalonia.Diagnostics.DevTools"> |
||||
<Grid RowDefinitions="Auto,*,Auto"> |
<Grid RowDefinitions="*,Auto" Margin="4"> |
||||
<TabStrip SelectedIndex="{Binding SelectedTab, Mode=TwoWay}"> |
|
||||
<TabStripItem Content="Logical Tree"/> |
|
||||
<TabStripItem Content="Visual Tree"/> |
|
||||
<TabStripItem Content="Events"/> |
|
||||
</TabStrip> |
|
||||
|
|
||||
<ContentControl Content="{Binding Content}" Grid.Row="1"/> |
<TabControl Grid.Row="0" Items="{Binding Tools}" SelectedItem="{Binding SelectedTool}"> |
||||
|
<TabControl.ItemTemplate> |
||||
<StackPanel Spacing="4" Orientation="Horizontal" Grid.Row="2"> |
<DataTemplate> |
||||
<TextBlock>Hold Ctrl+Shift over a control to inspect.</TextBlock> |
<TextBlock Text="{Binding Name}" /> |
||||
<Separator Width="8"/> |
</DataTemplate> |
||||
<TextBlock>Focused:</TextBlock> |
</TabControl.ItemTemplate> |
||||
<TextBlock Text="{Binding FocusedControl}"/> |
</TabControl> |
||||
<Separator Width="8"/> |
|
||||
<TextBlock>Pointer Over:</TextBlock> |
<StackPanel Grid.Row="1" Spacing="4" Orientation="Horizontal"> |
||||
<TextBlock Text="{Binding PointerOverElement}"/> |
<TextBlock>Hold Ctrl+Shift over a control to inspect.</TextBlock> |
||||
</StackPanel> |
<Separator Width="8" /> |
||||
</Grid> |
<TextBlock>Focused:</TextBlock> |
||||
|
<TextBlock Text="{Binding FocusedControl}" /> |
||||
|
<Separator Width="8" /> |
||||
|
<TextBlock>Pointer Over:</TextBlock> |
||||
|
<TextBlock Text="{Binding PointerOverElement}" /> |
||||
|
</StackPanel> |
||||
|
</Grid> |
||||
</UserControl> |
</UserControl> |
||||
|
|||||
@ -0,0 +1,16 @@ |
|||||
|
// Copyright (c) The Avalonia Project. All rights reserved.
|
||||
|
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
||||
|
|
||||
|
namespace Avalonia.Diagnostics.ViewModels |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// View model interface for tool showing up in DevTools
|
||||
|
/// </summary>
|
||||
|
public interface IDevToolViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Name of a tool.
|
||||
|
/// </summary>
|
||||
|
string Name { get; } |
||||
|
} |
||||
|
} |
||||
@ -1,4 +1,7 @@ |
|||||
using System; |
// Copyright (c) The Avalonia Project. All rights reserved.
|
||||
|
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
||||
|
|
||||
|
using System; |
||||
using System.ComponentModel; |
using System.ComponentModel; |
||||
using System.Reactive.Linq; |
using System.Reactive.Linq; |
||||
using System.Reflection; |
using System.Reflection; |
||||
Loading…
Reference in new issue