Wrong error place

オープン
#65 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
desktop, tooling

調査の方向性

まず、Windows 11 24H2 で貼り付けた XAML を再現し、XAML Studio に表示されるエラー位置を記録します。貼り付けた markup が解析される箇所から診断の動作を追跡します。報告された位置が別の行ではなく、実際に問題のある markup を特定すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Describe the bug

If I try these code I get an error and it shows wrong place for it.

<Page
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid x:Name="ShadowCastGrid" Padding="20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Margin="0,0,0,20">
            <TextBlock>
                <Run FontSize="24" Foreground="#FFFC5185">Smart Fn Keys for Lenovo™</Run>
                <LineBreak />
                <Run x:Name="StatusRun" Text="Current status:" />
            </TextBlock>
            <Button
                x:Name="SwitchFnStatus"
                Margin="0,10,0,0"
                Click="SwitchFnStatus_Click"
                Content="Переключить статус" />
        </StackPanel>

        <Grid Grid.Row="1" Padding="12,10,12,10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150" />
                <ColumnDefinition Width="300" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="80" />
            </Grid.ColumnDefinitions>
            <TextBlock
                Grid.Column="0"
                FontWeight="Bold"
                Text="Имя процесса" />
            <TextBlock
                Grid.Column="1"
                Margin="10,0"
                FontWeight="Bold"
                Text="Заголовок" />
            <TextBlock
                Grid.Column="2"
                FontWeight="Bold"
                Text="Путь" />
            <TextBlock
                Grid.Column="3"
                HorizontalAlignment="Right"
                FontWeight="Bold"
                Text="Статус" />
        </Grid>

        <ListView
            x:Name="WindowsListView"
            Grid.Row="2"
            SelectionMode="None">
            <ListView.ItemTemplate>
                <DataTemplate x:DataType="local:WindowInfo">
                    <Grid Padding="0,4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="150" />
                            <ColumnDefinition Width="300" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="80" />
                        </Grid.ColumnDefinitions>

                        <StackPanel
                            Grid.Column="0"
                            VerticalAlignment="Center"
                            Orientation="Horizontal">
                            <Image
                                Width="16"
                                Height="16"
                                Margin="0,0,8,0"
                                Source="{x:Bind AppIcon}"
                                Stretch="Uniform" />
                            <TextBlock VerticalAlignment="Center" Text="{x:Bind ProcessName}" />
                        </StackPanel>
                        <TextBlock
                            Grid.Column="1"
                            Margin="10,0"
                            VerticalAlignment="Center"
                            Text="{x:Bind Title}"
                            TextTrimming="CharacterEllipsis" />
                        <TextBlock
                            Grid.Column="2"
                            VerticalAlignment="Center"
                            FontSize="12"
                            Foreground="Gray"
                            Text="{x:Bind FullPath}"
                            TextTrimming="CharacterEllipsis" />
                        <ToggleSwitch
                            Grid.Column="3"
                            MinWidth="0"
                            HorizontalAlignment="Right"
                            IsOn="{x:Bind IsActive, Mode=TwoWay}"
                            OffContent=""
                            OnContent=""
                            Toggled="WindowsListView_ToggleChanged" />
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
    </Grid>
</Page>
Steps to reproduce
1) Paste the code
Expected behavior

It shows correct place of error.

Screenshots
Image
Windows Build Number
  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Windows 11 22H2 (Build 22621)
  • Windows 11 23H2 (Build 22631)
  • Windows 11 24H2 (Build 26100)
  • Windows 11 25H2 (Build 26200)
  • Windows 11 26H1 (Build 28000)
  • Other (specify)
Other Windows Build number

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

主要言語
C#
スター
456
フォーク
48
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/XAMLStudio のほかの issue

dotnet/XAMLStudio の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。