SilverlightShow: Accessing the full range of colors in procedural code Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples en-us SilverlightShow.net estoychev@completit.com (Emil Stoychev) Argotic Syndication Framework, http://www.codeplex.com/Argotic http://www.rssboard.org/rss-specification RE: Accessing the full range of colors in procedural code http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx#comment2339 Hi, <p>when I add your class in my silverlight-application, I can't compile it.</p> <p>Here I get an Error:</p> <p>  <div style="border: 1px solid #7f9db9; overflow: auto; background-color: white; line-height: 100% ! important; font-family: courier new; font-size: 11px;"> <table cellspacing="0" cellpadding="0" style="border-width: 0px; border-bottom: 0px solid #eeeeee; margin: 2px 0px; width: 99%; border-collapse: collapse; background-color: #ffffff;"> <col style="border-bottom: 1px solid #f7f7f7; font-family: courier new; font-size: 11px; padding-left: 10px; white-space: nowrap;" /> <tbody> <tr> <td><span style="font-size: 11px;"></span><span style="color: blue;">public</span><span style="font-size: 11px;"> </span><span style="color: blue;">static</span><span style="font-size: 11px;"> </span><span style="color: blue;">implicit</span><span style="font-size: 11px;"> </span><span style="color: blue;">operator</span><span style="font-size: 11px;"> Brush( ColorExtension color ) </span></td> </tr> <tr> <td style="background-color: #f7f7f7;">{ </td> </tr> <tr> <td>    <span style="color: blue;">return</span><span style="font-size: 11px;"> </span><span style="color: blue;">new</span><span style="font-size: 11px;"> SolidColorBrush( color );  </span><span style="color: green;">// Here I get an error</span><span style="font-size: 11px;"> </span></td> </tr> <tr> <td style="background-color: #f7f7f7;">} </td> </tr> </tbody> </table> </div> </p> <p> </p> <p>The Argument "ColorExtension" can not convert to "System.Windows.Media.Color".</p> <p>Thanks </p> ( Doug) http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx Thu, 10 Sep 2009 17:49:27 +0200 RE: Accessing the full range of colors in procedural code http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx#comment2338 Hi, <p>when I add your class in my silverlight-application, I can't compile it.</p> <p>Here I get an Error:</p> <p>  <div style="border: 1px solid #7f9db9; overflow: auto; background-color: white; line-height: 100% ! important; font-family: courier new; font-size: 11px;"> <table cellspacing="0" cellpadding="0" style="border-width: 0px; border-bottom: 0px solid #eeeeee; margin: 2px 0px; width: 99%; border-collapse: collapse; background-color: #ffffff;"> <col style="border-bottom: 1px solid #f7f7f7; font-family: courier new; font-size: 11px; padding-left: 10px; white-space: nowrap;" /> <tbody> <tr> <td><span style="font-size: 11px;"></span><span style="color: blue;">public</span><span style="font-size: 11px;"> </span><span style="color: blue;">static</span><span style="font-size: 11px;"> </span><span style="color: blue;">implicit</span><span style="font-size: 11px;"> </span><span style="color: blue;">operator</span><span style="font-size: 11px;"> Brush( ColorExtension color ) </span></td> </tr> <tr> <td style="background-color: #f7f7f7;">{ </td> </tr> <tr> <td>    <span style="color: blue;">return</span><span style="font-size: 11px;"> </span><span style="color: blue;">new</span><span style="font-size: 11px;"> SolidColorBrush( color );  </span><span style="color: green;">// Here I get an error</span><span style="font-size: 11px;"> </span></td> </tr> <tr> <td style="background-color: #f7f7f7;">} </td> </tr> </tbody> </table> </div> </p> <p> </p> <p>The Argument "ColorExtension" can not convert to "System.Windows.Media.Color".</p> <p>Thanks </p> ( Doug) http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx Thu, 10 Sep 2009 16:48:55 +0200 RE: Accessing the full range of colors in procedural code http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx#comment2276 Hi Scott <p>I read your article it is the same approach. I found the solution accidentally few weeks ago in the forum of Silverlight.net, but I lost the link. I will add a reference to your article, you defenitely add some more details. Thanks.</p> ( ppopadiyn) http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx Mon, 24 Aug 2009 17:26:18 +0200 RE: Accessing the full range of colors in procedural code http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx#comment2274 Just an fyi... I got this error message via a dialog when I posted the above comment: <p><em>Web.config registration missing!<br />  The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > Editor > Dialogs</em> </p> ( Scott Marlowe) http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx Mon, 24 Aug 2009 17:02:06 +0200 RE: Accessing the full range of colors in procedural code http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx#comment2273 I took a very similar approach in <a href="http://www.itscodingtime.com/post/Using-all-of-the-WPF-Colors-in-Silverlight.aspx">my solution to this problem</a>. ( Scott Marlowe) http://www.silverlightshow.net/items/Accessing-the-full-range-of-colors-in-procedural-code.aspx Mon, 24 Aug 2009 17:01:14 +0200