jQWidgets.Blazor
1.2.0
See the version list below for details.
dotnet add package jQWidgets.Blazor --version 1.2.0
NuGet\Install-Package jQWidgets.Blazor -Version 1.2.0
<PackageReference Include="jQWidgets.Blazor" Version="1.2.0" />
paket add jQWidgets.Blazor --version 1.2.0
#r "nuget: jQWidgets.Blazor, 1.2.0"
// Install jQWidgets.Blazor as a Cake Addin #addin nuget:?package=jQWidgets.Blazor&version=1.2.0 // Install jQWidgets.Blazor as a Cake Tool #tool nuget:?package=jQWidgets.Blazor&version=1.2.0
Blazor lets you build interactive web UIs using C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Blazor can run your client-side C# code directly in the browser, using WebAssembly. Because it's real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application.
Prerequisites .NET Core SDK - This includes everything you need to build and run Blazor WebAssembly apps.
Setup
- Install templates:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview9.19465.2
- Create a blazor application:
dotnet new blazorwasm -o jqwidgets-blazor-app
- Navigate to the application:
cd jqwidgets-blazor-app
- Add the jQWidgets.Blazor package:
dotnet add package jQWidgets.Blazor
- Open _Imports.razor and add the following at the bottom:
@using jQWidgets.Blazor.Components
- Open wwwroot/index.html and add the needed styles and scripts. For example if you are going to use JqxBarGauge, the file should look like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>jqwidgets-blazor-app</title>
<base href="/" />
<link href="_content/jQWidgets.Blazor/jqwidgets/styles/jqx.base.css">
</head>
<body>
<app>Loading...</app>
<script src="_content/jQWidgets.Blazor/jqwidgets/jqxcore.js"></script>
<script src="_content/jQWidgets.Blazor/jqwidgets/jqxdraw.js"></script>
<script src="_content/jQWidgets.Blazor/jqwidgets/jqxbargauge.js"></script>
<script src="_content/jQWidgets.Blazor/jqxBlazor.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
</body>
</html>
- Open Pages/Index.razor and replace the code as follows:
<JqxBarGauge
width=600 height=600 colorScheme="scheme02"
max="max" values="values" tooltip="tooltip">
</JqxBarGauge>
@code {
private int max = 150;
private double[] values = new double[4] { 102, 115, 130, 137 };
private IDictionary<string, bool> tooltip = new Dictionary<string, bool>()
{
{ "visible", true }
};
}
- Start the app and check the result:
dotnet watch run Events Methods & Properties
- Events Below is an example of listening to the JqxBarGauge onDrawEnd event and then doing something with the result:
<JqxBarGauge onDrawEnd="onDrawEnd"
width=600 height=600 values="values">
</JqxBarGauge>
@code {
private double[] values = new double[4] { 102, 115, 130, 137 };
private void onDrawEnd(IDictionary<string, object> e)
{
@* Do Something... *@
}
}
- Methods & Properties In order to use methods, first you need to make a reference to the component:
<JqxBarGauge @ref="myBarGauge"
width="350" height="350" values="values">
</JqxBarGauge>
@code {
JqxBarGauge myBarGauge;
private double[] values = new double[4] { 102, 115, 130, 137 };
protected override void OnAfterRender(bool firstRender)
{
if (firstRender)
{
double[] newValues = new double[4] { 10, 20, 30, 40 };
myBarGauge.val(newValues);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Components (>= 3.1.2)
- Microsoft.AspNetCore.Components.Web (>= 3.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.