Monday, August 10, 2009

How To Get Storyboard Current Status

Syntax
          StoryboardName.GetCurrentState

GetCurrentState Method enumeration values are
          Active    -  The current animation changes in direct relation to that of its parent.
          Filling    -  The animation continues and does not change in relation to that of its parent.
          Stopped  -  The animation is stopped.


How To Convert a string to TimeSpan

TimeSpan.Parse("00:00:00");

What's the difference between a member variable, and a local variable?

A member variable is a variable that belongs to an object, whereas a local variable belongs to the current scope.

class MoterVehicle{

  String licensePlate = "";     // member variable
  double speed;       = 0.0;    // member variable
  double maxSpeed;    = 123.45; // member variable
 
  boolean isSpeeding() {
    double excess;    // local variable
    excess = this.maxSpeed - this.speed;
    if (excess < 0) return true;
    else return false;
  }

}

Monday, August 3, 2009

Silverlight Alert Box

System.Windows.Browser.HtmlPage.Window.Invoke("Alert", "Testing");

How To Hide Legend In PieChar Silverlight

<UserControl x:Class="Charting.Pagee"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    xmlns:datavis="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows"
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">

        <charting:Chart Title="Legend Disabled">         

            <charting:Chart.LegendStyle>
                
                <Style TargetType="datavis:Legend">
                    
                    <Setter Property="Width" Value="0"/>
                    <Setter Property="Height" Value="0"/>
                    
                </Style>
                
            </charting:Chart.LegendStyle>
            
            <charting:Chart.Series>
                
                <charting:PieSeries  DependentValuePath="X" >                    
                    <charting:PieSeries.ItemsSource>
                        <PointCollection>
                            <Point X="1"/>
                            <Point X="2"/>
                            <Point X="3"/>
                            <Point X="4"/>
                        </PointCollection>
                    </charting:PieSeries.ItemsSource>
                </charting:PieSeries>
                
            </charting:Chart.Series>
            
        </charting:Chart>
    </Grid>
</UserControl>