Installation- Install .NET Framework 4.0.
- Please note: The ColorBox control dependent on .NET Framework 4.0. So you must install .NET Framework 4.0 in order to use it.
- Download the ColorBox 1.1 binary
- Reference ColorBox.dll in your project
- Add a using statement (using ColorBox;) to the top of .cs files
- Add a new xmlns (xmlns:ncore="http://schemas.ncore.com/wpf/xaml/colorbox") to the top of XAML files
- Use the namespace prefix (in the above example, <ncore: ...>) in the body of your XAML
Usage (XAML)<Window x:Class="ColorBoxDemo.DemoWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Border Background="{Binding ElementName=CB, Path=Brush}" Grid.Column="0"/> <ncore:ColorBox x:Name="CB" Grid.Column="1"/> </Grid></Window>
| |