PSC.Blazor.Components.ImageSelect 8.0.2

dotnet add package PSC.Blazor.Components.ImageSelect --version 8.0.2
NuGet\Install-Package PSC.Blazor.Components.ImageSelect -Version 8.0.2
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="PSC.Blazor.Components.ImageSelect" Version="8.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PSC.Blazor.Components.ImageSelect --version 8.0.2
#r "nuget: PSC.Blazor.Components.ImageSelect, 8.0.2"
#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 PSC.Blazor.Components.ImageSelect as a Cake Addin
#addin nuget:?package=PSC.Blazor.Components.ImageSelect&version=8.0.2

// Install PSC.Blazor.Components.ImageSelect as a Cake Tool
#tool nuget:?package=PSC.Blazor.Components.ImageSelect&version=8.0.2

ImageSelect from Blazor

This is a Blazor component to display a dropdown list with images based on ms-Dropdown by Marghoob Suleman. This component is built with NET8 for Blazor WebAssembly and Blazor Server.

Installation

Fist, you have to add the component from NuGet. Then, open your index.html or _Host and add at the end of the page the following CSS:

<link rel="stylesheet" href="_content/PSC.Blazor.Components.ImageSelect/css/dd.css" />
<link rel="stylesheet" href="_content/PSC.Blazor.Components.ImageSelect/css/flags.css" />

and then at the end of the file those scripts:

<script src="/_content/PSC.Blazor.Components.ImageSelect/js/dd.min.js"></script>
<script src="/_content/PSC.Blazor.Components.ImageSelect/js/imageselect.js" type="module"></script>

Open your _Imports.razor and add the following:

@using PSC.Blazor.Components.ImageSelect
@using PSC.Blazor.Components.ImageSelect.Models.Configuration

Add a new ImageSelect

Imaging you want to display a dropdown for selecting a language. This dropdown has to display the flag of the country and the name of the language.

ImageSelect with flags

When the user clicks on the arrow, the component displays the list of options with the flag and the name of the language.

ImageSelect dropdown

Here the code

<ImageSelect CssClass="@CSSClass" SelectedValueChanged="OnSelectedValueChange" Width="@Width">
    @if(ShowEmptyOption) {
        <Option Value="" DataTitle="@EmptyOptionText" Text="@EmptyOptionText" />
    }
    <Option Value="en" DataImageCss="flag gb" DataTitle="English" Text="English" />
    <Option Value="es" DataImageCss="flag es" DataTitle="Spanish" Text="Spanish" />
    <Option Value="pt" DataImageCss="flag pt" DataTitle="Portuguese" Text="Portuguese" />
    <Option Value="de" DataImageCss="flag de" DataTitle="German" Text="German" />
    <Option Value="fr" DataImageCss="flag fr" DataTitle="French" Text="French" />
    <Option Value="it" DataImageCss="flag it" DataTitle="Italian" Text="Italian" />
</ImageSelect>

@code {
    [Parameter] public string? CSSClass { get; set; }
    [Parameter] public string Width { get; set; } = "200px";
    [Parameter] public bool ShowEmptyOption { get; set; } = false;
    [Parameter] public string EmptyOptionText { get; set; } = "All";

    public void OnSelectedValueChange(string selectedValue)
    {
        var t = selectedValue;
    }
}

PureSourceCode.com

PureSourceCode.com is my personal blog where I publish posts about technologies and in particular source code and projects in .NET.

In the last few months, I created a lot of components for Blazor WebAssembly and Blazor Server.

My name is Enrico Rossini and you can contact me via:

Blazor Components

Component name Forum NuGet Website Description
Autocomplete for Blazor Forum NuGet badge Simple and flexible autocomplete type-ahead functionality for Blazor WebAssembly and Blazor Server
Browser Detect for Blazor Forum NuGet badge Demo Browser detect for Blazor WebAssembly and Blazor Server
ChartJs for Blazor Forum NuGet badge Demo Add beautiful graphs based on ChartJs in your Blazor application
Clippy for Blazor Forum NuGet badge Demo Do you miss Clippy? Here the implementation for Blazor
CodeSnipper for Blazor Forum NuGet badge Add code snippet in your Blazor pages for 196 programming languages with 243 styles
Copy To Clipboard Forum NuGet badge Add a button to copy text in the clipboard
DataTable for Blazor Forum NuGet badge Demo DataTable component for Blazor WebAssembly and Blazor Server
Icons and flags for Blazor Forum NuGet badge Library with a lot of SVG icons and SVG flags to use in your Razor pages
Markdown editor for Blazor Forum NuGet badge Demo This is a Markdown Editor for use in Blazor. It contains a live preview as well as an embeded help guide for users.
Modal dialog for Blazor Forum NuGet badge Simple Modal Dialog for Blazor WebAssembly
Modal windows for Blazor Forum NuGet badge Modal Windows for Blazor WebAssembly
Quill for Blazor Forum NuGet badge Quill Component is a custom reusable control that allows us to easily consume Quill and place multiple instances of it on a single page in our Blazor application
ScrollTabs NuGet badge Tabs with nice scroll (no scrollbar) and responsive
Segment for Blazor Forum NuGet badge This is a Segment component for Blazor Web Assembly and Blazor Server
Tabs for Blazor Forum NuGet badge This is a Tabs component for Blazor Web Assembly and Blazor Server
Timeline for Blazor Forum NuGet badge This is a new responsive timeline for Blazor Web Assembly and Blazor Server
Toast for Blazor Forum NuGet badge Toast notification for Blazor applications
Tours for Blazor Forum NuGet badge Guide your users in your Blazor applications
WorldMap for Blazor Forum NuGet badge Demo Show world maps with your data

C# libraries for .NET6

Component name Forum NuGet Description
PSC.Evaluator Forum NuGet badge PSC.Evaluator is a mathematical expressions evaluator library written in C#. Allows to evaluate mathematical, boolean, string and datetime expressions.
PSC.Extensions Forum NuGet badge A lot of functions for .NET5 in a NuGet package that you can download for free. We collected in this package functions for everyday work to help you with claim, strings, enums, date and time, expressions...

More examples and documentation

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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
8.0.2 87 4/24/2024
8.0.1 74 4/22/2024
8.0.0 90 4/11/2024
1.0.10 81 4/11/2024
1.0.8 247 10/25/2023
1.0.7 113 10/23/2023
1.0.6 118 10/17/2023
1.0.5 94 10/17/2023
1.0.4 91 10/16/2023
1.0.2 101 10/3/2023