Click here to Skip to main content
15,880,796 members
Articles / Desktop Programming / WPF

WPF Color Picker Construction Kit

Rate me:
Please Sign up or sign in to vote.
4.97/5 (59 votes)
26 Dec 2010CPOL9 min read 116K   7.7K   76  
A WPF color picker (like Adobe's) constructed in a modular fashion for easy modification.
<Window x:Class="ColorPickerControls.Dialogs.ColorPickerStandardWithAlphaDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Color Picker" Height="334" Width="480"    xmlns:Pickers="clr-namespace:ColorPickerControls.Pickers" WindowStyle="SingleBorderWindow" ResizeMode="NoResize">
    <Grid Background="#FFE8E8E8">
        <Grid.RowDefinitions>
            <RowDefinition Height="270" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <Pickers:ColorPickerStandardWithAlpha HorizontalAlignment="Left" x:Name="colorPickerFull" VerticalAlignment="Top" Margin="4,0,0,0"/>
        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="142,0,0,0">
        <Button Content="OK"  Height="23" HorizontalAlignment="Left" Margin="0,0,4,0" Name="btOk" VerticalAlignment="Top" Width="75" Click="btOk_Click" />
        <Button Content="Cancel" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="8,0,0,0" Name="btCancel" VerticalAlignment="Top" Width="75" Click="btCancel_Click" /></StackPanel>
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Written software for what seems like forever. I'm currenly infatuated with WPF. Hopefully my affections are returned.

Comments and Discussions