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

Question: How to convert WinRT.IInspectable to Windows.Foundation.Collections.IObservableVector? #977

Open
shelllet opened this issue Aug 27, 2021 · 3 comments
Assignees
Labels
authoring Related to authoring feature work bug Something isn't working pri-2 Non-critical bugs/acceptable workaround question Further information is requested
Milestone

Comments

@shelllet
Copy link

shelllet commented Aug 27, 2021

image

image

@shelllet shelllet added the question Further information is requested label Aug 27, 2021
@shelllet shelllet changed the title Question: How to convert to Windows.Foundation.Collections.IObservableVector from WinRT.IInspectable type? Question: How to convert WinRT.IInspectable to Windows.Foundation.Collections.IObservableVector? Aug 27, 2021
@angelazhangmsft
Copy link
Contributor

Hi @shelllet, do you have a repro/stack of the above code?

@shelllet
Copy link
Author

shelllet commented Sep 1, 2021

Hi @shelllet, do you have a repro/stack of the above code?

it's easy!,
https://github.com/shelllet/WinRT_IInspectable

@angelazhangmsft angelazhangmsft added the authoring Related to authoring feature work label Sep 1, 2021
@angelazhangmsft
Copy link
Contributor

Thanks! It looks like there is a workaround:

var listcast = (IObservableVector<int>)(object)(iis)

We will need to investigate why the direct As<> cast causes an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authoring Related to authoring feature work bug Something isn't working pri-2 Non-critical bugs/acceptable workaround question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants