Skip to content

Missing Visuals in binding for header row #263

@JanRajnoha

Description

@JanRajnoha

Description:

When i tried v1.4 preview i found out header row is expecting some Visuals. Stable version is okay and without XAML binding errors. Problem is with this added code, especially with image here.

Steps to Reproduce:

Create table view

my XAML is

<dg:TableView x:Name="MyTableView"
              Grid.Row="2"
              Margin="12"
              AlternateRowBackground="{StaticResource DataGridAlternateBackground}"
              IsReadOnly="True"
              SelectionMode="Single" 
              CanSortColumns="False"
              CornerButtonMode="None"
              CanFilterColumns="False"
              AutoGenerateColumns="False"
              ItemsSource="{Binding FilteredItems, UpdateSourceTrigger=PropertyChanged}">

Expected behavior:

No XAML Binding errors

Error from VS:

Error: BindingExpression path error: 'Visuals' property not found on 'Project.SomeViewModel'. BindingExpression: Path='Visuals' DataItem='Project.SomeViewModel'; target element is 'Microsoft.UI.Xaml.Controls.Image' (Name='DragHeaderImage'); target property is 'Source' (type 'ImageSource')

Environment:

  • Package Version: 1.4 preview
  • WinAppSDK Version: 1.8 latest stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions