Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Fix crash when opening a Content dialog at text scaling of 200% with content from an adaptive card #3020

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/DevHome.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards.ObjectModel.WinUI3" Version="2.0.0-beta" />
<PackageReference Include="AdaptiveCards.Rendering.WinUI3" Version="2.0.0-beta" />
<PackageReference Include="AdaptiveCards.Rendering.WinUI3" Version="2.1.0-beta" />
<PackageReference Include="AdaptiveCards.Templating" Version="1.5.0" />
<PackageReference Include="CommunityToolkit.Common" Version="8.2.2" />
<PackageReference Include="CommunityToolkit.Labs.WinUI.Shimmer" Version="0.1.230830" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ public ContentDialogWithNonInteractiveContent(DevHomeContentDialogContent conten
var renderer = await rendererService.GetRendererAsync();
renderer.HostConfig.ContainerStyles.Default.BackgroundColor = Microsoft.UI.Colors.Transparent;
var card = renderer.RenderAdaptiveCardFromJsonString(content.ContentDialogInternalAdaptiveCardJson?.Stringify() ?? string.Empty);
Content = card.FrameworkElement;
Content = new ScrollViewer
{
VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
Content = card.FrameworkElement,
};
SecondaryButtonText = content.SecondaryButtonText;
this.Focus(FocusState.Programmatic);
});
Expand Down
2 changes: 1 addition & 1 deletion src/DevHome.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<ItemGroup>
<!-- Temporarily duplicate the Adaptive Card from DevHome.Common -->
<PackageReference Include="AdaptiveCards.ObjectModel.WinUI3" Version="2.0.0-beta" GeneratePathProperty="true" />
<PackageReference Include="AdaptiveCards.Rendering.WinUI3" Version="2.0.0-beta" GeneratePathProperty="true" />
<PackageReference Include="AdaptiveCards.Rendering.WinUI3" Version="2.1.0-beta" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Internal.Windows.DevHome.Helpers" Version="1.0.20240311-x1907" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
Expand Down
Loading