Are partial properties supposed to be able to marshal onto the UI thread? #1158
-
|
When I read this: as they allow the CsWinRT generators to correctly produce the necessary WinRT marshalling code However, if you don’t marshal the property changes manually then you get a COM exception. To me this makes the community toolkit generated property changes less useful than writing you own implementation that has in build handling of thread marshalling. Example below confirms that community toolkit property changes are not marshalled. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
This is completely expected, you're reading that paragraph wrong. "Marshalling" refers to "marshalling to native [Windows Runtime]", not "marshalling to the UI thread". You always have to do that yourself. I have a proposal to make this automatic in WinUI 3 but unfortunately it hasn't gone anywhere just yet. |
Beta Was this translation helpful? Give feedback.
This is completely expected, you're reading that paragraph wrong. "Marshalling" refers to "marshalling to native [Windows Runtime]", not "marshalling to the UI thread". You always have to do that yourself. I have a proposal to make this automatic in WinUI 3 but unfortunately it hasn't gone anywhere just yet.