.NET WPF doesn't render a simple card
See original GitHub issue.NET WPF (haven’t tested HTML yet) fails to render this card:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"id": "3",
"text": "Container default style"
}
]
}
exception message:
System.ArgumentException
HResult=0x80070057
Message='3' is not a valid value for property 'Name'.
Source=WindowsBase
StackTrace:
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at AdaptiveCards.Rendering.Wpf.AdaptiveRenderContext.Render(AdaptiveTypedElement element)
at AdaptiveCards.Rendering.Wpf.AdaptiveContainerRenderer.AddContainerElements(Grid uiContainer, IList`1 elements, AdaptiveRenderContext context)
at AdaptiveCards.Rendering.Wpf.AdaptiveCardRenderer.RenderAdaptiveCardWrapper(AdaptiveCard card, AdaptiveRenderContext context)
at AdaptiveCards.Rendering.AdaptiveElementRenderers`2.<>c__DisplayClass1_0`1.<Set>b__0(AdaptiveTypedElement typedElement, TContext tContext)
at AdaptiveCards.Rendering.Wpf.AdaptiveRenderContext.Render(AdaptiveTypedElement element)
at AdaptiveCards.Rendering.Wpf.AdaptiveCardRenderer.RenderCard(AdaptiveCard card)
Aside from the exception itself, it’s noteworthy that we’re not converting the System.ArgumentException
to an AdaptiveException
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
Trying to display Cards using Images in WPF, why is it not ...
I've tried Using Images and Bitmap Images in WPF C# to dynamically change what images I am displaying in my project, it is...
Read more >FIX: You may experience several issues when you render ...
Fixes three issues that occur when you use Windows Presentation Foundation (WPF) to render graphics in a .NET Framework 3.5 SP1-based application.
Read more >Video Rendering Issues for WPF Windows - Rick Strahl
Apparently, the hardware rendering part is not properly implemented in WPF. Beside stability, disabling hardware rending also improves memory ...
Read more >What a very bad day at work taught me about building ...
I moved on to C# and .NET in 2006. I was a .NET MVP for 2009 and 2010 before switching to JavaScript, Node.js,...
Read more >.net WPF Visual Basic template - Developer Community
I'm not finding Visual Basic WPF (.Net 5) template. It will be availiable in the future ? I'm using VS 2019 16.8.1.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@andrewleader proposal may still be the best option, having a dictionary when rendering with all the ids and rendered items to handle all id’s , that way we don’t have to worry about changing the ids prefixing an underscore ‘_’ and we don’t have to deal with the ‘Name’ message and the impact on the client side
🎉
AdaptiveCards@2020.08
has been released which fixes this issue.🎉Handy links: