개발자 도구

AlignmentGrid XAML 컨트롤

컨트롤 AlignmentGrid Control 을 정렬하는 데 도움이 되는 그리드를 표시하는 데 사용할 수 있습니다.

그리드의 단계 HorizontalStepVerticalStep 속성을 제어할 수 있습니다. 선 색은 속성으로 LineBrush 정의할 수 있습니다.

<!--  Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information.  -->
<Page x:Class="DeveloperToolsExperiment.Samples.AlignmentGridSample"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:developerTools="using:CommunityToolkit.WinUI.DeveloperTools"
      xmlns:local="using:DeveloperToolsExperiment.Samples"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">

    <Grid>
        <developerTools:AlignmentGrid HorizontalStep="{x:Bind HorizontalStep, Mode=OneWay}"
                                      Opacity="{x:Bind OpacitySetting, Mode=OneWay}"
                                      VerticalStep="{x:Bind VerticalStep, Mode=OneWay}" />
    </Grid>
</Page>
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using CommunityToolkit.WinUI.DeveloperTools;

namespace DeveloperToolsExperiment.Samples;

[ToolkitSampleNumericOption("OpacitySetting", 0.2, 0.1, 1.0, 0.1, false, Title = "Opacity")]
[ToolkitSampleNumericOption("HorizontalStep", 20, 5, 100, 1, false, Title = "HorizontalStep")]
[ToolkitSampleNumericOption("VerticalStep", 20, 5, 100, 1, false, Title = "VerticalStep")]

[ToolkitSample(id: nameof(AlignmentGridSample), "AlignmentGrid", description: $"A sample for showing how to create and use a {nameof(AlignmentGrid)}.")]
public sealed partial class AlignmentGridSample : Page
{
    public AlignmentGridSample()
    {
        this.InitializeComponent();
    }
}

FocusTracker

현재 FocusTracker Control 포커스가 있는 XAML 요소(있는 경우)에 대한 정보를 표시하는 데 사용할 수 있습니다.

FocusTracker는 현재 포커스가 있는 XAML 요소에 대한 다음 정보(사용 가능한 경우)를 표시합니다.

  • 이름
  • 유형
  • AutomationProperties.Name
  • 이름이 있는 계층 구조의 첫 번째 부모 이름
<!--  Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information.  -->
<Page x:Class="DeveloperToolsExperiment.Samples.FocusTrackerSample"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:developerTools="using:CommunityToolkit.WinUI.DeveloperTools"
      xmlns:local="using:DeveloperToolsExperiment.Samples"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">

    <StackPanel Spacing="12">
        <TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                   Style="{StaticResource CaptionTextBlockStyle}"
                   Text="Use the TAB key or mouse to set the focus on a UI element, and see the result in the Focus tracker below" />
        <developerTools:FocusTracker IsActive="{x:Bind IsActive, Mode=OneWay}" />
    </StackPanel>
</Page>
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using CommunityToolkit.WinUI.DeveloperTools;

namespace DeveloperToolsExperiment.Samples;

[ToolkitSampleBoolOption("IsActive", true, Title = "IsActive")]

[ToolkitSample(id: nameof(FocusTrackerSample), "FocusTracker", description: $"A sample for showing how to create and use a {nameof(FocusTracker)}.")]
public sealed partial class FocusTrackerSample : Page
{
    public FocusTrackerSample()
    {
        this.InitializeComponent();
    }
}