Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyView Documentation Doesn't Reflect Reality #319

Open
realchrisparker opened this issue Sep 21, 2023 · 2 comments
Open

LazyView Documentation Doesn't Reflect Reality #319

realchrisparker opened this issue Sep 21, 2023 · 2 comments

Comments

@realchrisparker
Copy link

The documentation reads as if you can use the LazyView like any other view, but the sample reflects a different implementation.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@bijington
Copy link
Collaborator

You can use LazyView like a normal control however you need to supply the x:TypeArguments attribute to determine which type of view you will be setting as the content once loaded. I believe the examples create their own classes to avoid having to supply the x:TypeArguments.

We can provide some clearer explanation around this in the samples/docs though as it sounds like it might be unclear.

@realchrisparker
Copy link
Author

Hi @bijington

I made this post because the sample is the only way it appears to work. If you setup the lazyview like the documentation Visual Studio gives you the following error XLS0507 "Type 'LazyView' is not usable as an object element because it is not public or does not define a public parameterless constructor or a type converter."

Maybe I'm doing something wrong but the following code produces that error.
<toolkit:LazyView x:Name="LazyOrgGeneral" x:TypeArguments="viewsOrgPartials:OrgGeneralLazyView" />

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

No branches or pull requests

2 participants