Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

color picker wpf

System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog();
 if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
 {
      YourBtn.Background = new SolidColorBrush(Color.FromArgb(colorDialog.Color.A, colorDialog.Color.R, colorDialog.Color.G, colorDialog.Color.B));
      ColorName = colorDialog.Color.Name.ToLower();
 }
Comment

WPF color picker

// install Extended.Wpf.Toolkit

xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"

<xctk:ColorPicker Name="ClrPcker_Background" SelectedColorChanged="ClrPcker_Background_SelectedColorChanged"></xctk:ColorPicker>

private void ClrPcker_Background_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs<Color> e)
{
    TextBox.Text = "#" + ClrPcker_Background.SelectedColor.R.ToString() + ClrPcker_Background.SelectedColor.G.ToString() + ClrPcker_Background.SelectedColor.B.ToString();
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: jarray to list c# 
Csharp :: using serial port in c# 
Csharp :: C# How to write Hello World 
Csharp :: c# combine list of bool 
Csharp :: .net core check if user is logged in 
Csharp :: how to get the current time in milliseconds .net 
Csharp :: c sharp stream to byte array 
Csharp :: stop a thread c# 
Csharp :: C# .net core convert string to enum 
Csharp :: unity normalize float 
Csharp :: know to which direction Vector.MoveTowards is moving unity 2D 
Csharp :: triangle minimum path sum c# 
Csharp :: .net Core Return File like File Server 
Csharp :: c# dictionary loop key value 
Csharp :: print content of array c# 
Csharp :: accessing form controls from another class c# 
Csharp :: listview item click c# 
Csharp :: unity cos 
Csharp :: c# md5 
Csharp :: how to make panel scrollable c# 
Csharp :: how to instantiate a gameobject 
Csharp :: c# entity framework group by 
Csharp :: c# how to sort a list 
Csharp :: unity c# check how many of an object exists 
Csharp :: movetowards unity 
Csharp :: how to see image from website in wpf 
Csharp :: c# optional parameters 
Csharp :: unity play sound effect 
Csharp :: raycasting in unity 
Csharp :: project mongodb c# 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =