Drastic.AdaptiveCards
1.0.8
dotnet add package Drastic.AdaptiveCards --version 1.0.8
NuGet\Install-Package Drastic.AdaptiveCards -Version 1.0.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Drastic.AdaptiveCards" Version="1.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Drastic.AdaptiveCards --version 1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Drastic.AdaptiveCards, 1.0.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Drastic.AdaptiveCards as a Cake Addin #addin nuget:?package=Drastic.AdaptiveCards&version=1.0.8 // Install Drastic.AdaptiveCards as a Cake Tool #tool nuget:?package=Drastic.AdaptiveCards&version=1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Drastic.AdaptiveCards
Drastic.AdaptiveCards is an experimental binding for iOS and Catalyst of AdaptiveCards, Microsoft's framework for card based content.
How To
- Render the incoming JSON content with
ACOAdaptiveCard.FromJson()
- Render the content with
ACRRenderer.Render
- Place the resulting
UIView
into your existing page.
string jsonStr = @"{ ""type"": ""AdaptiveCard"", ""version"": ""1.0"", ""body"": [ { ""type"": ""Image"", ""url"": ""http://adaptivecards.io/content/adaptive-card-50.png"", ""horizontalAlignment"":""center"" }, { ""type"": ""TextBlock"", ""horizontalAlignment"":""center"", ""text"": ""Hello **Adaptive Cards!**"" } ], ""actions"": [ { ""type"": ""Action.OpenUrl"", ""title"": ""Learn more"", ""url"": ""http://adaptivecards.io"" }, { ""type"": ""Action.OpenUrl"", ""title"": ""GitHub"", ""url"": ""http://github.com/Microsoft/AdaptiveCards"" } ] }";
global::AdaptiveCards.ACOAdaptiveCardParseResult cardParseResult = global::AdaptiveCards.ACOAdaptiveCard.FromJson(jsonStr);
ACRRenderResult renderResult = null;
if (cardParseResult.IsValid)
{
renderResult = ACRRenderer.Render(cardParseResult.Card, null, 300);
var newView = renderResult.View;
this.View!.AddSubview(newView);
// Using
newView.MakeConstraints(make => {
make.Center.EqualTo(this.View);
});
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0-ios16.1 is compatible. net7.0-maccatalyst16.1 is compatible. net8.0-ios was computed. net8.0-maccatalyst was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0-ios16.1
- Drastic.FluentUI (>= 1.0.4)
-
net7.0-maccatalyst16.1
- Drastic.FluentUI (>= 1.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.8 | 283 | 3/21/2023 |