Udara.Plugin.XFColorPickerControl 1.0.3

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

// Install Udara.Plugin.XFColorPickerControl as a Cake Tool
#tool nuget:?package=Udara.Plugin.XFColorPickerControl&version=1.0.3

How to?

Just install in your Xamarin.Forms .NET Standard project, and you're good go!

XAML Set up

xmlns:xfsegmentedcontrol="clr-namespace:Udara.Plugin.XFColorPickerControl;assembly=Udara.Plugin.XFColorPickerControl"
<xfColorPickerControl:ColorPicker
	x:Name="ColorPicker"
	ColorFlowDirection="Horizontal"
	ColorSpectrumStyle="TintToHueToShadeStyle"
	HeightRequest="200"
	HorizontalOptions="FillAndExpand"
	PickedColorChanged="ColorPicker_PickedColorChanged"
	PointerRingBorderUnits="0.3"
	PointerRingDiameterUnits="0.7"
	PointerRingPositionXUnits="0.6"
	PointerRingPositionYUnits="0.6">
	<xfColorPickerControl:ColorPicker.BaseColorList>
		<x:Array Type="{x:Type x:String}">
			
			<x:String>#ff0000</x:String>
			
			<x:String>#ffff00</x:String>
			
			<x:String>#00ff00</x:String>
			
			<x:String>#00ffff</x:String>
			
			<x:String>#0000ff</x:String>
			
			<x:String>#ff00ff</x:String>
			
			<x:String>#ff0000</x:String>
		</x:Array>
	</xfColorPickerControl:ColorPicker.BaseColorList>
</xfColorPickerControl:ColorPicker>

PickedColorChanged Event

private void ColorPicker_PickedColorChanged(object sender, Color colorPicked)
{
        // do whatever you want with the colorPicked value
}

Bindable Properties

ColorPicked:

Gets the Picked Color of the Color Picker.

XAML:

<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    ColorPicked={Binding UserPickedColor}
    ... >
</xfColorPickerControl:ColorPicker>

C#:

var colorPicked = ColorPicker.ColorPicked;

BaseColorList:

Change the available base Colors on the Color Spectrum, of the Color Picker. This will take a List of strings included with Color names or hex values which is held in an IEnumerable.

XML:
<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    ... >
    <xfColorPickerControl:ColorPicker.BaseColorList>
        <x:Array Type="{x:Type x:String}">
            
            <x:String>#ffff00</x:String>
            
            <x:String>#00ffff</x:String>
            
            <x:String>#ff00ff</x:String>
            
            <x:String>#ffff00</x:String>
        </x:Array>
    </xfColorPickerControl:ColorPicker.BaseColorList>
</xfColorPickerControl:ColorPicker>
C#:
ColorPicker.BaseColorList = new List<string>()
{
    "#00bfff",
    "#0040ff",
    "#8000ff",
    "#ff00ff",
    "#ff0000",
};

ColorFlowDirection:

Change the direction in which the Colors are flowing through on the Color Spectrum, of the Color Picker. This will allow you to set whether the Colors are flowing through from left to right, Horizontally or top to bottom, Vertically

XAML
<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    ColorFlowDirection="Horizontal"
    ... >
</xfColorPickerControl:ColorPicker>
C#:
ColorPicker.ColorFlowDirection =
    Udara.Plugin.XFColorPickerControl.ColorFlowDirection.Horizontal;

ColorSpectrumStyle:

Change the Color Spectrum gradient style, with the rendering combination of base colors (Hue), or lighter colors (Tint) or darker colors (Shade).

Available Styles:

  • HueOnlyStyle
  • HueToShadeStyle
  • ShadeToHueStyle
  • HueToTintStyle
  • TintToHueStyle
  • TintToHueToShadeStyle
  • ShadeToHueToTintStyle
XML:
<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    ColorSpectrumStyle="TintToHueToShadeStyle"
    ... >
</xfColorPickerControl:ColorPicker>
C#:
ColorPicker.ColorSpectrumStyle = 
    Udara.Plugin.XFColorPickerControl.ColorSpectrumStyle.TintToHueToShadeStyle;

PointerRingDiameterUnits:

Changes the Diameter size of the Pointer Ring on the Color Picker. It accepts values between 0 and 1, as a representation of numerical units which is compared to the 1/10th of the longest length of the Color Picker Canvas. By default this value is set to 0.6 units.

XML:
<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    PointerRingDiameterUnits="0.6"
    ...    >
</xfColorPickerControl:ColorPicker>
C#:
ColorPicker.PointerRingDiameterUnits = 0.6;

PointerRingBorderUnits:

Changes the Border Thickness size of the Pointer Ring on the Color Picker. It accepts values between 0 and 1, as a representation of numerical units which is calculated against the diameter of the Pointer Ring. By default this value is set to 0.3 units.

XML:
<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    PointerRingBorderUnits="0.3"
    ...    >
</xfColorPickerControl:ColorPicker>
C#:
ColorPicker.PointerRingBorderUnits = 0.3;

PointerRingPosition<X,Y>Units:

Changes the Pointer Ring’s position on the Color Picker Canvas programmatically. There are of two bindable properties PointerRingPositionXUnits and PointerRingPositionYUnits, which represents X and Y coordinates on the Color Picker Canvas. It accepts values between 0 and 1, as a presentation of numerical units which is calculated against the Color Picker Canvas’s actual pixel Width and Height. By default both the values are set to 0.5 units, which positions the Pointer Ring in the center of the Color Picker.

XML:
<xfColorPickerControl:ColorPicker
    x:Name="ColorPicker"
    PointerRingPositionXUnits="0.3"
    PointerRingPositionYUnits="0.7"
    ...    >
</xfColorPickerControl:ColorPicker>
C#:
ColorPicker.PointerRingPositionXUnits = 0.3;
ColorPicker.PointerRingPositionYUnits = 0.7;

Event Handler

Fires every time when the selected Color is changed

PickedColorChanged:

Gets the pickedColor, object type of Color

<controls:ColorPickerControl
        x:Name="ColorPicker"
        PickedColorChanged="ColorPicker_PickedColorChanged" />
C#:
ColorPicker.PickedColorChanged += ColorPicker_PickedColorChanged;
private void ColorPicker_PickedColorChanged(object sender, Color colorPicked)
{
    //Do whatever you want with the colorPicked value
}
Product 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. 
.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. 
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.3 4,803 3/15/2020
1.0.2 431 3/1/2020
1.0.1 652 2/28/2020

[1.0.0]
     Init release.
     [1.0.1]
     Fixes and nuget config.
     [1.0.2]
     Adding new features and bug fixes.
     [1.0.3]
     Adding a whole bunch of awesome new features some internal code refactoring.