-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from majorimi/dev/color
Updated Demo app.
- Loading branch information
Showing
11 changed files
with
166 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
demo/Blazor.Components.DemoApp/Components/ColorPicker.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<style> | ||
textarea { | ||
height: 150px !important; | ||
} | ||
</style> | ||
|
||
<h1>Html Color Picker control</h1> | ||
<p> | ||
Blazor components that renders a Blazor Color Picker control with color info. For usege see soruce code and docs on | ||
<a href="https://github.com/majorimi/blazor-components/blob/master/.github/docs/ColorPicker.md" target="_blank">Github</a>. | ||
<br /><strong>Majorsoft.Blazor.Components.ColorPicker</strong> package is available on <a href="https://www.nuget.org/packages/Majorsoft.Blazor.Components.ColorPicker" target="_blank">Nuget</a> | ||
</p> | ||
|
||
<div class="container-fluid p-3 mb-3 border rounded"> | ||
<h3>Html Color Picker raw container alone</h3> | ||
<p> | ||
This example shows the <strong>raw</strong> Color Picker container alone: HSL color slider and bilinear interpolated color selector area with optional Info section. | ||
</p> | ||
|
||
<div class="row pb-2"> | ||
<div class="col-12 col-lg-8 col-xl-5"> | ||
Show info area: <input class="mr-3" type="checkbox" @bind="_showInfo"/> | ||
</div> | ||
</div> | ||
|
||
<div class="row pb-2"> | ||
<div class="col-12"> | ||
<HslColorSelector | ||
SelectedColor="@_selectedColor" | ||
ShowInfoArea="_showInfo" | ||
HueSliderWidth="_sliderlWidth" | ||
HueAreaHeight="_panelHeight" | ||
HueAreaWidth="_panelWidth" | ||
OnColorChanged="ColorSelected"> | ||
</HslColorSelector> | ||
</div> | ||
</div> | ||
|
||
<div class="row pb-2"> | ||
<div class="col-12"> | ||
<label><strong>Events log</strong>:</label> | ||
<textarea @ref="_log" @bind="_logMessage" class="form-control w-100 logText" readonly></textarea> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
@using System.Drawing | ||
|
||
@code { | ||
private int _panelHeight = 250; | ||
private int _panelWidth = 450; | ||
private int _sliderlWidth = 450; | ||
private bool _showInfo = true; | ||
|
||
private System.Drawing.Color _selectedColor = System.Drawing.Color.FromArgb(66, 135, 245); | ||
|
||
private ElementReference _log; | ||
private string _logMessage; | ||
|
||
private async Task ColorSelected(Color color) | ||
{ | ||
_logMessage += $"Color Selected: {color} {Environment.NewLine}"; | ||
await _log.ScrollToEndAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h3>DragAndDrop</h3> | ||
|
||
@code { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@page "/colorpicker" | ||
|
||
<ColorPicker /> | ||
|
||
@code { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@page "/draganddrop" | ||
|
||
<DragAndDrop /> | ||
|
||
@code { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters