Vectorlight News

  • Chat App Converted to HTML and JQuery
    Sep 08, 2011

    Converted from Silverlight to HTML and Javascript/JQuery is the Vectorlight Chat App. Login using your Vectorlight password to chat using your username and avatar.

  • HTML5 iPhone,Android Big Guns Tower Defense
    Jul 02, 2011

    Big Guns has made the leap from Windows Phone 7 (XNA) to HTML5 so you can now play it on your iPhone, Android and other HTML5 compatible devices.

  • HTML5 Games - Word Poppers and Batty
    Jun 04, 2011

    As the take-up of HTML5 quickens (74% of users currently have a browser capable of HTML5 Canvas) we present two more games for both your browser and mobile.

  • Big Guns Tower Defense on Windows Phone 7
    May 06, 2011

    Coming soon to Windows Phone 7 is an XNA port of the popular Vectorlight tower defense game Super Tower Defense. Whilst retaining many of the graphical and gameplay features of the original Silverlight game.

  • Wakacube WP7 Update
    Apr 26, 2011

    Released to the Windows Phone 7 marketplace today is Version 1.1 of Wakacube the 3D physics game of skill. Included in the update are more levels (30 in total) and new mode Wakatime which generates random crate structures to keep players entertained long after the levels have been completed.

  • Home Page News
jonny
jonny
Color Selector: change default set of colors Posted: May 03, 2010
 

Hi there folks,


I'm aiming to use the color selector in my application, but the default selection of colors does not match what my application needs. Ideally I want to have a selection of 16 bright colors and no option to select a custom color.

I have used the style setting given in a different thread to remove the custom color option, but I have not yet found a way to put my chosen colors into the control and reduce the number of colors displayed. Are either of these possible?


Thanks,


Jonny

 
 
dan
dan
RE: Color Selector: change default set of colors Posted: May 12, 2010
 

Hi Jonny,


You can add colors in code using the Set method:


private void SetupColors(ColorSelector picker)

{

    uint[] colors = new uint[] {

        0xFF000000, 0x00FFFFFF, 0xFF333300, 0xFF003300, 0xFF003366, 0xFF000080, 0xFF333399, 0xFF333333,

        0xFF800000, 0xFFFF6600, 0xFF808000, 0xFF008000, 0xFF008080, 0xFF0000FF, 0xFF666699, 0xFF808080,

        0xFFFF0000, 0xFFFF9900, 0xFF99CC00, 0xFF339966, 0xFF33CCCC, 0xFF3366FF, 0xFF800080, 0xFF999999,

        0xFFFF00FF, 0xFFFFCC00, 0xFFFFFF00, 0xFF00FF00, 0xFF00FFFF, 0xFF00CCFF, 0xFF993366, 0xFFC0C0C0,

        0xFFFF99CC, 0xFFFFCC99, 0xFFFFFF99, 0xFFCCFFCC, 0xFFCCFFFF, 0xFF99CCFF, 0xFFCC99FF, 0xFFFFFFFF

    };


    picker.Set(colors, false);

}


Thanks!

 
 
jonny
jonny
RE: Color Selector: change default set of colors Posted: May 20, 2010
 

Thanks Dan, much appreciated. Keep up the good work. :-)

 
 
gabs002
gabs002
RE: Color Selector: change default set of colors Posted: Jun 27, 2011
 

Hello,


I want to set "Black" as the color to start, but it's always transparent. How can I do this?

I already tried following, but nothing worked - it's always the transparent Color shown:

<liquid:ColorSelector x:Name="selectColor" Grid.Column="1" Grid.Row="2" Margin="104,1,6,6" ToolTipService.ToolTip="Foreground" SelectionChanged="selectColor_SelectionChanged" Selected="Black" />

selectColor.Selected = new Color() { A = 0, B = 0, G = 0, R = 0 };

selectColor.Select(Color.FromArgb(0,0,0,0));



Thanks, Gabi