Skip to content

Wrong error place #65

@inoyakaigor

Description

@inoyakaigor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions