Skip to content

[Bug]: XAML completion gaps and wrong suggestions #358

Open

Description

Describe the bug

Completion problems found in the bug bash:

  • x:DataType, TargetType, SourcePageType only offer SDK types, not the project's own types.
  • {x:Bind local:Consts.Title} and helpers:Fmt.Join(...) get no completion, hover or definition.
  • First child of a ResourceDictionary gets no completion; x:String/x:Double/x:Int32/x:Boolean are never offered.
  • Abstract types (UIElement, FrameworkElement, Panel) are offered and ranked first.
  • Name is offered on an element that already has x:Name.
  • Converters, view models and other non-UIElement CLR types get no completion and no "Import" quick fix.
  • < inside an attribute value or after the root's closing tag returns 962 items.
  • {StaticResource } doesn't filter keys by the property's value type.

To Reproduce

  1. In a page, request completion in <DataTemplate x:DataType="|": no project view models.
  2. In a new ResourceDictionary, type < as the first child: empty list.
  3. Inside a StackPanel, type <: FrameworkElement and UIElement are first.
  4. Type <Button Content="a<|": full element list.

Expected behavior

Completion offers the project's types, the XAML primitives, and only constructible types, and returns nothing where no element can go.

Notes

Bug bash IDs: C-23, C-24, C-25, C-38, C-39, C-42 (completion part), C-46, C-50.

Screenshots

No response

OS Version and details

Windows 11 x64 (10.0.26200), VS Code 1.143.1, .NET SDK 10.0.403. Found in the XAML IntelliSense bug bash on 0.3.1-prerelease.456 (PR #276, f90df977).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions