Express yourself! Share your work with other members of the Expression Community.

Each contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.

Bureau Blue

Average Rating:  (5)
Description
Discussions (1)

  • CAUTION: Using this theme with Silverlight 4 and selecting the RIGHT ExpandDirection causes a memory leak!
    3 Posts | Last Post August 31, 2010
    • Using Silverlight 4, I have put a basic Expander on an empty page with no content whatsoever using this Bureau Blue theme.  If you indicate an Expand Direction of Down, Left, or Up; then you will not encounter any memory leak issues.  If you indicate an ExpandDirection of Right, you can watch the Task Manager slowly increase your memory usage for the Silverlight 4 application (which runs inside iexplorer.exe).  I am looking into whether an updated version exists for Silverlight 4, and if it does then I will make another post.
    • Even the latest April 2010 XAML file has the same issue.  I am researching and going to submit a bug to the Silverlight Codeplex site.  When I work out the solution, I will post once again.
    • The issue was caused by a value of one being assigned to one of the Duration properties for a ObjectAnimationUsingKeyFrames element.  If you set all of the ObjectAnimationUsingKeyFrames Duration properties to zero for this ExpandRight VisualState, then you will fix the memory leak.
      
      Below is the fixed XAML snippet that you can paste over the exising XAML into the Microsoft.Windows.Controls.Theming.BureauBlue.xaml file within the <Style TargetType="toolkit:Expander"> element:
      
      .
      .
      .
      <vsm:VisualState x:Name="ExpandRight">
          <Storyboard>
              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderRightHeaderTemplate}"/>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Column)">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
              </ObjectAnimationUsingKeyFrames>
              <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd1" Storyboard.TargetProperty="Width">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
              </ObjectAnimationUsingKeyFrames>
          </Storyboard>
      </vsm:VisualState>
      .
      .
      .
      
      I was using Silverlight 4 within IE8 on Windows 7 Enterprise x86.

Details

Rate it:
 
 
 
 
 
  • Share It:
    E-mail Twitter del.icio.us Digg Facebook
  • Add To Favorites
  • Published: 3/23/2009
  • Tags: Silverlight 2
  • License Information:
    This contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.