SpectoLogic.Blazor.Controls 1.0.2-alpha

This is a prerelease version of SpectoLogic.Blazor.Controls.
dotnet add package SpectoLogic.Blazor.Controls --version 1.0.2-alpha
NuGet\Install-Package SpectoLogic.Blazor.Controls -Version 1.0.2-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.2-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.2-alpha
#r "nuget: SpectoLogic.Blazor.Controls, 1.0.2-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.2-alpha&prerelease

// Install SpectoLogic.Blazor.Controls as a Cake Tool
#tool nuget:?package=SpectoLogic.Blazor.Controls&version=1.0.2-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 "/"

<style>
    .spdropdown-selected{
        background-color : yellow
    }
</style>

@if (IsInitialized)
{
    <EditForm Model="model" OnSubmit="OnSubmit">
        <SPDropDown 
                    TItem="MenuItem" 
                    Enabled="@isEnabled" 
                    Data="@Items" 
                    @bind-Value="selected"
                    OnSelected="OnSelected"
                    CSSSelectedItem="spdropdown-selected">
            <ItemTemplate Context="dropDownContext">
                <img src="http://lorempixel.com/20/20/abstract/" />
                <label>@dropDownContext.Item1.Title</label>
            </ItemTemplate>
        </SPDropDown>
        <p>@selected?.Title</p>
        <InputCheckbox @bind-Value="isEnabled">Enable</InputCheckbox>
    </EditForm>
    <p>@statusLine</p>
}

@code
{
    public string model = string.Empty;
    private bool isEnabled = false;

    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;
    private string statusLine = string.Empty;

    public async Task OnSelected(MenuItem selectedItem)
    {
    }

    protected override void OnInitialized()
    {
        IsInitialized = true;
        selected = Items[2];
        StateHasChanged();
        base.OnInitialized();
    }

    public async Task OnSubmit()
    {
        statusLine = "Submitted!";
    }
}
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 1,153 7/2/2021
1.0.1-alpha 141 7/2/2021
1.0.0-alpha 172 6/30/2021

added
- Databinding on Value
- Enabled - Property (to enable/disable) control
- Customize Control with additional CSS Options

Source Code Release is planned for the next month after stableizing