I have knocked up a sample of Rotating Video Picture Board in Silverlight 1.1 Alpha Refresh.
You can view a demo or download the source at http://www.chrishay.com/silverlight/rotatingvideopictureboard/
I have been a little lazy and not included a downloader, so you will probably want to hit F5 and refresh the page once the video has downloaded.
I will probably extend this in the future and turn it into a game of some sort.
Sunday, 29 July 2007
Yay Microsoft
I think everybody knows that Microsoft are one of the coolest companies around (with may'be exception to Innocent Smoothies).
I published an issue i was having Orcas last night and this morning i received a comment on the blog from the main web dude himself (Mr Scott Guthrie). He is proactively offering to get someone to look into it. This is very cool (especially since this a sunday morning).
I think this sort of attitude (and level of support), is what will make Microsoft and Silverlight absolutely dominate the world of web.
Go Microsoft, and Thanks
I published an issue i was having Orcas last night and this morning i received a comment on the blog from the main web dude himself (Mr Scott Guthrie). He is proactively offering to get someone to look into it. This is very cool (especially since this a sunday morning).
I think this sort of attitude (and level of support), is what will make Microsoft and Silverlight absolutely dominate the world of web.
Go Microsoft, and Thanks
Saturday, 28 July 2007
Orcas Beta 2 Bug: Don't have Intellisense on my own controls
For some reason i seem to be losing intellisense in orcas beta 2 for my own controls.
Not only do i not get intellisense for my control, but it also seems to break intellisense for everything else on that page
May'be I'm not doing something right but it's a little frustrating
Not only do i not get intellisense for my control, but it also seems to break intellisense for everything else on that page
May'be I'm not doing something right but it's a little frustrating
Inheriting a control from the Silverlight 1.1 Alpha Refresh Control Toolkit
I've just found a small bug in the ControlBase of the Silverlight 1.1 Alpha Refresh Silverlight UI Controls project.
I was attempting to create my own button which inherits ButtonBase. I used Button as an example and discovered the following problem.
If you create your new control outside of the SilverlightUIControl project, and use an embedded xaml file, unfortunately your button will not work.
This is because ControlBase will only look at resources in the Assembly in the SilverlightUIControls assembly.
I have implemented a workaround (messy code, but nonetheless it does the job). I have posted it below (all you need to do is replace the constructor in ControlBase).
I hope the guys at MS fix this:
I was attempting to create my own button which inherits ButtonBase. I used Button as an example and discovered the following problem.
If you create your new control outside of the SilverlightUIControl project, and use an embedded xaml file, unfortunately your button will not work.
This is because ControlBase will only look at resources in the Assembly in the SilverlightUIControls assembly.
I have implemented a workaround (messy code, but nonetheless it does the job). I have posted it below (all you need to do is replace the constructor in ControlBase).
I hope the guys at MS fix this:
public ControlBase()
{
//the control template must be in an embeded resource - find it
Stream resourceStream = null;
//if the assembly is built with VS there will be a prefix before
//the resource name we expect. The resource name will be at the
//end after a dot
string dotResource = '.' + ResourceName;
Assembly assembly = typeof(ControlBase).Assembly;
string[] names = assembly.GetManifestResourceNames();
bool found = false;
foreach (string name in names) {
if (name.Equals(ResourceName) || name.EndsWith(dotResource)) {
resourceStream = assembly.GetManifestResourceStream(name);
found = true;
break;
}
}
if (!found)
{
Assembly currentAssembly = this.GetType().Assembly;
string[] currentNames = currentAssembly.GetManifestResourceNames();
foreach (string name in currentNames)
{
if (name.Equals(ResourceName) || name.EndsWith(dotResource))
{
resourceStream = currentAssembly.GetManifestResourceStream(name);
found = true;
break;
}
}
}
Debug.Assert(resourceStream != null, "the resource template" + ResourceName + " not found");
StreamReader sr = new StreamReader(resourceStream);
string xaml = sr.ReadToEnd();
actualControl = InitializeFromXaml(xaml);
sr.Close();
Debug.Assert(actualControl != null, "failed to initialize the control");
base.Width = actualControl.Width;
base.Height = actualControl.Height;
Loaded += new EventHandler(OnLoaded);
}
Friday, 27 July 2007
New Release of Silverlight for Orcas Beta 2
New Release of Silverlight for Orcas Beta 2 will be released today according to the supreme god of web (Mr Scott Guthrie).
Labels:
orcas,
Silverlight,
Silverlight 1.1,
Visual Studio 2008
Thursday, 26 July 2007
Visual Studio 2008 (Orcas) Beta 2 available for download
Visual Studio 2008 (Orcas) Beta 2 is now available for download
Yay, go Microsoft!
It is now happily downloading on my machine ready for me to play with over the weekend.
As I said in my previous post, it is time to install it on my work machine (targeted at .NET Framework 3.0).
Yay, go Microsoft!
It is now happily downloading on my machine ready for me to play with over the weekend.
As I said in my previous post, it is time to install it on my work machine (targeted at .NET Framework 3.0).
Monday, 23 July 2007
Silverlight Color Table
Color Names in Silverlight map to the Unix X11 color list.
If you wish to see a bitmap of the color's you can click here
I thought it might be useful to have a XAML file which we can load in SilverlightPad, Blend or whatever you use to view each color in its rendered format.
Here is the XAML below:
If you wish to see a bitmap of the color's you can click here
I thought it might be useful to have a XAML file which we can load in SilverlightPad, Blend or whatever you use to view each color in its rendered format.
Here is the XAML below:
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="MainCanvas" Height="500" Width="500">
<Canvas>
<TextBlock Canvas.Top="0" Foreground="AliceBlue" Text="AliceBlue"/>
<TextBlock Canvas.Top="20" Foreground="AntiqueWhite" Text="AntiqueWhite"/>
<TextBlock Canvas.Top="40" Foreground="Aqua" Text="Aqua"/>
<TextBlock Canvas.Top="60" Foreground="AquaMarine" Text="AquaMarine"/>
<TextBlock Canvas.Top="80" Foreground="Azure" Text="Azure"/>
<TextBlock Canvas.Top="100" Foreground="Beige" Text="Beige"/>
<TextBlock Canvas.Top="120" Foreground="Bisque" Text="Bisque"/>
<TextBlock Canvas.Top="140" Foreground="Black" Text="Black"/>
<TextBlock Canvas.Top="160" Foreground="BlanchedAlmond" Text="BlanchedAlmond"/>
<TextBlock Canvas.Top="180" Foreground="Blue" Text="Blue"/>
<TextBlock Canvas.Top="200" Foreground="BlueViolet" Text="BlueViolet"/>
<TextBlock Canvas.Top="220" Foreground="Brown" Text="Brown"/>
<TextBlock Canvas.Top="240" Foreground="BurlyWood" Text="BurlyWood"/>
<TextBlock Canvas.Top="260" Foreground="CadetBlue" Text="CadetBlue"/>
<TextBlock Canvas.Top="280" Foreground="Chartreuse" Text="Chartreuse"/>
<TextBlock Canvas.Top="300" Foreground="Chocolate" Text="Chocolate"/>
<TextBlock Canvas.Top="320" Foreground="Coral" Text="Coral"/>
<TextBlock Canvas.Top="340" Foreground="CornflowerBlue" Text="CornflowerBlue"/>
<TextBlock Canvas.Top="360" Foreground="Cornsilk" Text="Cornsilk"/>
<TextBlock Canvas.Top="380" Foreground="Crimson" Text="Crimson"/>
<TextBlock Canvas.Top="400" Foreground="Cyan" Text="Cyan"/>
<TextBlock Canvas.Top="420" Foreground="DarkBlue" Text="DarkBlue"/>
<TextBlock Canvas.Top="440" Foreground="DarkCyan" Text="DarkCyan"/>
<TextBlock Canvas.Top="460" Foreground="DarkGoldenrod" Text="DarkGoldenrod"/>
<TextBlock Canvas.Top="480" Foreground="DarkGray" Text="DarkGray"/>
<TextBlock Canvas.Top="500" Foreground="DarkGreen" Text="DarkGreen"/>
<TextBlock Canvas.Top="520" Foreground="DarkKhaki" Text="DarkKhaki"/>
<TextBlock Canvas.Top="540" Foreground="DarkMagenta" Text="DarkMagenta"/>
<TextBlock Canvas.Top="560" Foreground="DarkOliveGreen" Text="DarkOliveGreen"/>
<TextBlock Canvas.Top="580" Foreground="DarkOrange" Text="DarkOrange"/>
<TextBlock Canvas.Top="600" Foreground="DarkOrchid" Text="DarkOrchid"/>
<TextBlock Canvas.Top="620" Foreground="DarkRed" Text="DarkRed"/>
<TextBlock Canvas.Top="640" Foreground="DarkSalmon" Text="DarkSalmon"/>
<TextBlock Canvas.Top="660" Foreground="DarkSeaGreen" Text="DarkSeaGreen"/>
<TextBlock Canvas.Top="680" Foreground="DarkSlateBlue" Text="DarkSlateBlue"/>
<TextBlock Canvas.Top="700" Foreground="DarkSlateGray" Text="DarkSlateGray"/>
</Canvas>
<Canvas Canvas.Left="150">
<TextBlock Canvas.Top="0" Foreground="DarkTurquoise" Text="DarkTurquoise"/>
<TextBlock Canvas.Top="20" Foreground="DarkViolet" Text="DarkViolet"/>
<TextBlock Canvas.Top="40" Foreground="DeepPink" Text="DeepPink"/>
<TextBlock Canvas.Top="60" Foreground="DeepSkyBlue" Text="DeepSkyBlue"/>
<TextBlock Canvas.Top="80" Foreground="DimGray" Text="DimGray"/>
<TextBlock Canvas.Top="100" Foreground="DodgerBlue" Text="DodgerBlue"/>
<TextBlock Canvas.Top="120" Foreground="Firebrick" Text="Firebrick"/>
<TextBlock Canvas.Top="140" Foreground="FloralWhite" Text="FloralWhite"/>
<TextBlock Canvas.Top="160" Foreground="ForestGreen" Text="ForestGreen"/>
<TextBlock Canvas.Top="180" Foreground="Fuchsia" Text="Fuchsia"/>
<TextBlock Canvas.Top="200" Foreground="Gainsboro" Text="Gainsboro"/>
<TextBlock Canvas.Top="220" Foreground="GhostWhite" Text="GhostWhite"/>
<TextBlock Canvas.Top="240" Foreground="Gold" Text="Gold"/>
<TextBlock Canvas.Top="260" Foreground="Goldenrod" Text="Goldenrod"/>
<TextBlock Canvas.Top="280" Foreground="Gray" Text="Gray"/>
<TextBlock Canvas.Top="300" Foreground="Green" Text="Green"/>
<TextBlock Canvas.Top="320" Foreground="GreenYellow" Text="GreenYellow"/>
<TextBlock Canvas.Top="340" Foreground="Honeydew" Text="Honeydew"/>
<TextBlock Canvas.Top="360" Foreground="HotPink" Text="HotPink"/>
<TextBlock Canvas.Top="380" Foreground="IndianRed" Text="IndianRed"/>
<TextBlock Canvas.Top="400" Foreground="Indigo" Text="Indigo"/>
<TextBlock Canvas.Top="420" Foreground="Ivory" Text="Ivory"/>
<TextBlock Canvas.Top="440" Foreground="Khaki" Text="Khaki"/>
<TextBlock Canvas.Top="460" Foreground="Lavender" Text="Lavender"/>
<TextBlock Canvas.Top="480" Foreground="LavenderBlush" Text="LavenderBlush"/>
<TextBlock Canvas.Top="500" Foreground="LawnGreen" Text="LawnGreen"/>
<TextBlock Canvas.Top="520" Foreground="LemonChiffon" Text="LemonChiffon"/>
<TextBlock Canvas.Top="540" Foreground="LightBlue" Text="LightBlue"/>
<TextBlock Canvas.Top="560" Foreground="LightCoral" Text="LightCoral"/>
<TextBlock Canvas.Top="580" Foreground="LightCyan" Text="LightCyan"/>
<TextBlock Canvas.Top="600" Foreground="LightGoldenrodYellow" Text="LightGoldenrodYellow"/>
<TextBlock Canvas.Top="620" Foreground="LightGray" Text="LightGray"/>
<TextBlock Canvas.Top="640" Foreground="LightGreen" Text="LightGreen"/>
<TextBlock Canvas.Top="660" Foreground="LightPink" Text="LightPink"/>
<TextBlock Canvas.Top="680" Foreground="LightSalmon" Text="LightSalmon"/>
</Canvas>
<Canvas Canvas.Left="300">
<TextBlock Canvas.Top="0" Foreground="LightSeaGreen" Text="LightSeaGreen"/>
<TextBlock Canvas.Top="20" Foreground="LightSkyBlue" Text="LightSkyBlue"/>
<TextBlock Canvas.Top="40" Foreground="LightSlateGray" Text="LightSlateGray"/>
<TextBlock Canvas.Top="60" Foreground="LightSteelBlue" Text="LightSteelBlue"/>
<TextBlock Canvas.Top="80" Foreground="LightYellow" Text="LightYellow"/>
<TextBlock Canvas.Top="100" Foreground="Lime" Text="Lime"/>
<TextBlock Canvas.Top="120" Foreground="LimeGreen" Text="LimeGreen"/>
<TextBlock Canvas.Top="140" Foreground="Linen" Text="Linen"/>
<TextBlock Canvas.Top="160" Foreground="Magenta" Text="Magenta"/>
<TextBlock Canvas.Top="180" Foreground="Maroon" Text="Maroon"/>
<TextBlock Canvas.Top="200" Foreground="MediumAquamarine" Text="MediumAquamarine"/>
<TextBlock Canvas.Top="220" Foreground="MediumBlue" Text="MediumBlue"/>
<TextBlock Canvas.Top="240" Foreground="MediumOrchid" Text="MediumOrchid"/>
<TextBlock Canvas.Top="260" Foreground="MediumPurple" Text="MediumPurple"/>
<TextBlock Canvas.Top="280" Foreground="MediumSeaGreen" Text="MediumSeaGreen"/>
<TextBlock Canvas.Top="300" Foreground="MediumSlateBlue" Text="MediumSlateBlue"/>
<TextBlock Canvas.Top="320" Foreground="MediumSpringGreen" Text="MediumSpringGreen"/>
<TextBlock Canvas.Top="340" Foreground="MediumTurquoise" Text="MediumTurquoise"/>
<TextBlock Canvas.Top="360" Foreground="MediumVioletRed" Text="MediumVioletRed"/>
<TextBlock Canvas.Top="380" Foreground="MidnightBlue" Text="MidnightBlue"/>
<TextBlock Canvas.Top="400" Foreground="MintCream" Text="MintCream"/>
<TextBlock Canvas.Top="420" Foreground="MistyRose" Text="MistyRose"/>
<TextBlock Canvas.Top="440" Foreground="Moccasin" Text="Moccasin"/>
<TextBlock Canvas.Top="460" Foreground="NavajoWhite" Text="NavajoWhite"/>
<TextBlock Canvas.Top="480" Foreground="Navy" Text="Navy"/>
<TextBlock Canvas.Top="500" Foreground="OldLace" Text="OldLace"/>
<TextBlock Canvas.Top="520" Foreground="Olive" Text="Olive"/>
<TextBlock Canvas.Top="540" Foreground="OliveDrab" Text="OliveDrab"/>
<TextBlock Canvas.Top="560" Foreground="Orange" Text="Orange"/>
<TextBlock Canvas.Top="580" Foreground="OrangeRed" Text="OrangeRed"/>
<TextBlock Canvas.Top="600" Foreground="Orchid" Text="Orchid"/>
<TextBlock Canvas.Top="620" Foreground="PaleGoldenrod" Text="PaleGoldenrod"/>
<TextBlock Canvas.Top="640" Foreground="PaleGreen" Text="PaleGreen"/>
<TextBlock Canvas.Top="660" Foreground="PaleTurquoise" Text="PaleTurquoise"/>
<TextBlock Canvas.Top="680" Foreground="PaleVioletRed" Text="PaleVioletRed"/>
</Canvas>
<Canvas Canvas.Left="450">
<TextBlock Canvas.Top="0" Foreground="PapayaWhip" Text="PapayaWhip"/>
<TextBlock Canvas.Top="20" Foreground="PeachPuff" Text="PeachPuff"/>
<TextBlock Canvas.Top="40" Foreground="Peru" Text="Peru"/>
<TextBlock Canvas.Top="60" Foreground="Pink" Text="Pink"/>
<TextBlock Canvas.Top="80" Foreground="Plum" Text="Plum"/>
<TextBlock Canvas.Top="100" Foreground="PowderBlue" Text="PowderBlue"/>
<TextBlock Canvas.Top="120" Foreground="Purple" Text="Purple"/>
<TextBlock Canvas.Top="140" Foreground="Red" Text="Red"/>
<TextBlock Canvas.Top="160" Foreground="RosyBrown" Text="RosyBrown"/>
<TextBlock Canvas.Top="180" Foreground="RoyalBlue" Text="RoyalBlue"/>
<TextBlock Canvas.Top="200" Foreground="SaddleBrown" Text="SaddleBrown"/>
<TextBlock Canvas.Top="220" Foreground="Salmon" Text="Salmon"/>
<TextBlock Canvas.Top="240" Foreground="SandyBrown" Text="SandyBrown"/>
<TextBlock Canvas.Top="260" Foreground="SeaGreen" Text="SeaGreen"/>
<TextBlock Canvas.Top="280" Foreground="SeaShell" Text="SeaShell"/>
<TextBlock Canvas.Top="300" Foreground="Sienna" Text="Sienna"/>
<TextBlock Canvas.Top="320" Foreground="Silver" Text="Silver"/>
<TextBlock Canvas.Top="340" Foreground="SkyBlue" Text="SkyBlue"/>
<TextBlock Canvas.Top="360" Foreground="SlateBlue" Text="SlateBlue"/>
<TextBlock Canvas.Top="380" Foreground="SlateGray" Text="SlateGray"/>
<TextBlock Canvas.Top="400" Foreground="Snow" Text="Snow"/>
<TextBlock Canvas.Top="420" Foreground="SpringGreen" Text="SpringGreen"/>
<TextBlock Canvas.Top="440" Foreground="SteelBlue" Text="SteelBlue"/>
<TextBlock Canvas.Top="460" Foreground="Tan" Text="Tan"/>
<TextBlock Canvas.Top="480" Foreground="Teal" Text="Teal"/>
<TextBlock Canvas.Top="500" Foreground="Thistle" Text="Thistle"/>
<TextBlock Canvas.Top="520" Foreground="Tomato" Text="Tomato"/>
<TextBlock Canvas.Top="540" Foreground="Transparent" Text="Transparent"/>
<TextBlock Canvas.Top="560" Foreground="Turquoise" Text="Turquoise"/>
<TextBlock Canvas.Top="580" Foreground="Violet" Text="Violet"/>
<TextBlock Canvas.Top="600" Foreground="Wheat" Text="Wheat"/>
<TextBlock Canvas.Top="620" Foreground="White" Text="White"/>
<TextBlock Canvas.Top="640" Foreground="WhiteSmoke" Text="WhiteSmoke"/>
<TextBlock Canvas.Top="660" Foreground="Yellow" Text="Yellow"/>
<TextBlock Canvas.Top="680" Foreground="YellowGreen" Text="YellowGreen"/>
</Canvas>
</Canvas>
Subscribe to:
Posts (Atom)