dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.04k stars 1.17k forks source link

Feature ASK: Implement IList on PageContentCollection and DocumentReferenceCollection #966

Open grubioe opened 5 years ago

grubioe commented 5 years ago

Copied from VSO: 776611

This comes from user feedback: https://developercommunity.visualstudio.com/content/problem/418015/fixeddocument-pagecontent-bug.html image

REPRO: In a WPF project in Visual Studio, construct a file like in the following screenshot:

RESULT: The content of FixedDocument is always shown as an error.

EXPECT: No error squiggles or error messages

spadapet commented 1 year ago

There is new user feedback about this issue:

So it would be nice to get this real fix into WPF rather than have the Visual Studio WPF designer work around it.

miloush commented 1 year ago

@grubioe The code works at runtime, so it sounds more like the designer is not up to spec.

For the record, the errors are: image

The Pages property indeed does not have a setter, but it comes with

https://github.com/dotnet/wpf/blob/11ff3862bdfb0a4a85961aa43faae2496efb5d78/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/FixedDocument.cs#L587

How come this is not respected? docs (unless the error is misleading)

spadapet commented 1 year ago

Thanks, I created a task to look at fixing this in the WPF designer.