SpectoLogic.Blazor.Controls 1.0.0-alpha

This is a prerelease version of SpectoLogic.Blazor.Controls.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SpectoLogic.Blazor.Controls --version 1.0.0-alpha                
NuGet\Install-Package SpectoLogic.Blazor.Controls -Version 1.0.0-alpha                
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="SpectoLogic.Blazor.Controls" Version="1.0.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SpectoLogic.Blazor.Controls --version 1.0.0-alpha                
#r "nuget: SpectoLogic.Blazor.Controls, 1.0.0-alpha"                
#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 SpectoLogic.Blazor.Controls as a Cake Addin
#addin nuget:?package=SpectoLogic.Blazor.Controls&version=1.0.0-alpha&prerelease

// Install SpectoLogic.Blazor.Controls as a Cake Tool
#tool nuget:?package=SpectoLogic.Blazor.Controls&version=1.0.0-alpha&prerelease                

Spectologic.Blazor.Controls

SPDropDown Control

_imports.razor

Add this line:

@using SpectoLogic.Blazor.Controls
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using Microsoft.JSInterop
@using SpectoLogic.Blazor.Controls

Usage Example:

public class MenuItem
{
    public string Title { get; set; }
}
Pages/Index.razor
@page "/"

@if (IsInitialized)
{
    <SPDropDown TItem="MenuItem" Data="@Items" OnSelected="OnSelected" CSSSelectedItem="background-color:orange">
        <ItemTemplate>
            <a href="#" title="@context.Item1.Title">
                <img src="http://lorempixel.com/20/20/abstract/" />
                @context.Item1.Title
            </a>
        </ItemTemplate>
    </SPDropDown>

    <p>@selected?.Title</p>
}

@code
{
    public bool IsInitialized = false;
    public List<MenuItem> Items { get; set; } = new List<MenuItem>()
    {
        new MenuItem() { Title="A" },
        new MenuItem() { Title="B" },
        new MenuItem() { Title="C" },
        new MenuItem() { Title="D" }
    };

    private MenuItem selected = null;

    public async Task OnSelected(MenuItem selectedItem)
    {
        selected = selectedItem;
    }

    protected override void OnInitialized()
    {
        IsInitialized = true;
        StateHasChanged();
        base.OnInitialized();
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2-alpha 3,074 7/2/2021
1.0.1-alpha 148 7/2/2021
1.0.0-alpha 178 6/30/2021