Microsoft® Surface® Live Stream Code Sample

ive Stream enables businesses to engage their customers face-to-face using the most recent and relevant Twitter™, Flickr®, and RSS newsfeeds.

C# (5.9 MB)
 
 
 
 
 
4.3 Star
(4)
6,625 times
Add to favorites
4/19/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<s:SurfaceUserControl x:Class="LiveStream.Controls.AdminIndicatorLight"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008">
  <Grid Width="8" Height="8" Margin="0,0,5,0">
  	<VisualStateManager.VisualStateGroups>
  		<VisualStateGroup x:Name="OnStates">
  			<VisualStateGroup.Transitions>
  				<VisualTransition GeneratedDuration="0:0:0.15"/>
  			</VisualStateGroup.Transitions>
  			<VisualState x:Name="OnState"/>
  			<VisualState x:Name="OffState">
  				<Storyboard>
  					<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ellipse">
  						<SplineColorKeyFrame KeyTime="0" Value="Red"/>
  					</ColorAnimationUsingKeyFrames>
  				</Storyboard>
  			</VisualState>
  		</VisualStateGroup>
  	</VisualStateManager.VisualStateGroups>
    <Ellipse x:Name="ellipse" Fill="#ABFF3F" />
  </Grid>
</s:SurfaceUserControl>