Freigeben über


Alive and kickin' [New Silverlight 4 Toolkit released with today's Silverlight 4 RTW!]

**

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments

  • Anonymous
    April 16, 2010
    Congrats on another release! Can't wait for the next developer release (including these bits) to show up!

  • Anonymous
    April 17, 2010
    "ApplicationThemeUri is a simple bool value" should be "IsApplicationTheme is a simple bool value" And thanks for the great toolkit.

  • Anonymous
    April 17, 2010
    The comment has been removed

  • Anonymous
    April 18, 2010
    Are you planning to make source code of System.Windows.Controls.Toolkit.Internals.dll available anytime soon? Some really great stuff like AnonymousObserver, ObservableExtensions, etc that used to be available in toolkit's sources has been moved there and left internal. What a cruelty.

  • Anonymous
    April 18, 2010
    Any chance a signed version of the new Testing Framework could be put together as a "last official" release for Silverlight 3.0?

  • Anonymous
    April 18, 2010
    vsi, As I explain in the post above, System.Windows.Controls.Toolkit.Internals.dll is the Toolkit's stand-in replacement for the official Reactive (Rx) assemblies - which are still available from the Rx team from the link I provide above. The source code for the Rx assemblies was never part of the Toolkit, so Toolkit users should be no worse off for this change. And, as I explain above, they should actually be better off by virtue of the additional freedom with regard to Rx versioning.

  • Anonymous
    April 18, 2010
    Staxmanade, There's no plan to do another Silverlight 3 Toolkit because Silverlight 4 is now available to everyone. Updated versions of the Unit Testing Framework for Silverlight 3 and Windows Phone 7 should be available from Jeff soon (via the link I give above). Is there a reason you'd need a signed version?

  • Anonymous
    April 18, 2010
    Any chance of getting an example of changing  themes for an entire application dynamically at runtime?

  • Anonymous
    April 18, 2010
    Delay, thanks for replying... though honestly, I fail to understand how users are going to be better off after a lot of useful helper functions and classes that have been part of the toolkit (not rx libraries) and that are still used all over toolkit have been made unavailable for the rest of the world. What is the point of including something into Rx assembly that is used exclusively by toolkit?

  • Anonymous
    April 19, 2010
    gagglefish, I've added it to my TODO list. :)

  • Anonymous
    April 19, 2010
    vsi, You're right that there were isolated cases where Toolkit code needed to be made internal because it referenced the internal Rx replacement assembly. That's the case for the Toolkit's implementation of ObservableExtensions (note that there's a same-named implementation of this class in Rx). You can still find the source for the Toolkit's version of this file (and any others) in the Silverlight 3 branch of the public source code: http://silverlight.codeplex.com/sourcecontrol/network/Show?projectName=Silverlight&changeSetId=47051#752260 AnonymousObserver looks to have been an internal Rx class (System.Reactive) all along, though I may be mistaken since I wasn't intimately involved in all of the Rx work. I'm sorry about any inconvenience here! Though please understand there was strong customer demand for us to make this change and we've done it in as minimally impactful a manner as we could. Thanks for your understanding!

  • Anonymous
    April 20, 2010
    ThemeUri can be changed dynamically by applications that allow users to change their themes "on the fly". Can ApplicationThemeUri be changed in the same way?  When I try to change it I get an error.

  • Anonymous
    April 21, 2010
    jsp3536, I've just re-verified that my test application for changing ApplicationThemeUri at runtime works correctly. My scenario starts with that property set in App.xaml (to ShinyRed), then in a Button's Click handler I call Theme.SetApplicationThemeUri(Application.Current, new Uri("...")) (to ShinyBlue) and the theme switches dynamically. If you're still having trouble with this, go ahead and contact me directly (via the "Email" link) and we'll troubleshoot. Alternatively, if you're not in a rush, I've already got a note on my TODO list to write a sample for this and hope to get to that soon.

  • Anonymous
    April 24, 2010
    Thanks for getting back with me. I will try it again.  I did have another problem. I noticed in my project when I had merged resource dictionaries in the app.xaml that the toolkit:Theme.ApplicationThemeUri set in the app.xaml would not apply the theme to my other xaml pages.  If I removed the merged dictionaries from the app.xaml then it would work.  The way I got it to work was to set the Theme.ApplicationThemeUri in the app.cs and I was able to keep my merged dictionaries in the app.xaml.

  • Anonymous
    April 24, 2010
    Hello, I'm the founder of the open source project StatLight. (Statlight.codeplex.com) I'd appreciate a signed version of the a Silverlight 3.0 toolkit testing library because of the hard reference my open source project takes on the Microsoft.Silverlight.Testing assembly. I'd also like to have one final release for the 3.0 runtime that my project could host as the performance benefits would be much appreciated. Hope this helps. Thanks

  • Anonymous
    April 24, 2010
    jsp3536, That seems odd... I'll try to have a look into the behavior you're seeing when I get a chance to do the targeted sample. But for now, it's great to hear you've got a workaround! Thanks for following up!

  • Anonymous
    April 24, 2010
    Staxmanade, Have you considered upgrading your project to Silverlight 4 now that it's available to everyone (and completely backward compatible)? If you do that, it sounds like you can switch to the latest Silverlight 4 Toolkit and have everything you need, right?

  • Anonymous
    April 25, 2010
    Originally I wanted to put out one final S.L. 3.0 release of StatLight, but now that I think about it, you're right. I shouldn't need to do that, as everyone out there should be upgraded to 4.0... Guess I have some work to do :) Thanks for your quick replys.

  • Anonymous
    April 27, 2010
    Any idea why the drag events do not fire with the drag and drop.  IS there a worK around?

  • Anonymous
    April 27, 2010
    laferrij, Sorry, I'm afraid I don't understand the question. Have you tried asking on the Silverlight Forums? http://forums.silverlight.net/

  • Anonymous
    May 03, 2010
    I have a custom UserControl that derives from another UserControl , which in turn derives from ContentControl. Everything on my control works fine BUT the new ContextMenu. I receive the following message when running the app: The attachable property 'ContextMenu' was not found in type 'ContextMenuService'. I have tried to attach the context menu to every single object of my user control without success. Any clues?

  • Anonymous
    May 03, 2010
    robsonfelix, Starting with VS 2010 and the April 2010 Silverlight 4 Toolkit, I created a new Silverlight Application project, added a reference to System.Windows.Controls.Input.Toolkit (which automatically pulls along a reference to System.Windows.Controls) and added the relevant XMLNS and XAML seen below to MainPage.xaml. That's all and it worked fine for me - could you please try what I've done? <UserControl x:Class="SilverlightApplication3.MainPage"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    mc:Ignorable="d"    d:DesignHeight="300" d:DesignWidth="400">    <toolkit:ContextMenuService.ContextMenu>        <toolkit:ContextMenu>            <toolkit:MenuItem Header="Sample MenuItem"/>        </toolkit:ContextMenu>    </toolkit:ContextMenuService.ContextMenu>    <Grid x:Name="LayoutRoot" Background="White">    </Grid> </UserControl>

  • Anonymous
    May 04, 2010
    Hi, Thanks for this useful post. I have a problem with ContextMenu. In my case MenuItems of context menu generates at run time .I am confused where to add my Command/EventToCommand of my MenuItems because I added EventTrigger to the root element of ItemTemplate which was a grid but the no event get fired. and this is true when I add EventTrigger to the Template of the Style and it does not work either. <toolkit:ContextMenuService.ContextMenu>                <toolkit:ContextMenu ItemsSource="{Binding FeaturesList}" ItemTemplate="{StaticResource DataTemplate_ContextMenu}" Style="{StaticResource ContextMenuStyle}" >                </toolkit:ContextMenu> </toolkit:ContextMenuService.ContextMenu> I clarify my question. When the MenuItems of a context menu generates at run time where can I define(in XAML) the command of MenuItems or MouseLeftButtonDown event of the MenuItems? Btw, Why Blend 4.0 RC does not show the ContextMenu Control in the element tree? This makes making Styling/Template harder. Thanks in advanced!

  • Anonymous
    May 05, 2010
    Ali110, When MenuItems are generated automatically as in your example, you can customize the MenuItem containers by providing a Style with a TargetType of MenuItem for the ItemContainerStyle property of the ContextMenu. This is the same as how things work for other ItemsControl-based classes like ListBox/ListBoxItem and TreeView/TreeViewItem. If you're going to use a Binding for one of the Setters (as it seems you will for setting the Command property), you're probably going to need to use my SetterValueBindingHelper class. You can read more about that and see some Silverlight-based examples here: http://blogs.msdn.com/delay/archive/2009/11/02/as-the-platform-evolves-so-do-the-workarounds-better-settervaluebindinghelper-makes-silverlight-setters-better-er.aspx By the way, attaching to the Click event of the MenuItem is probably better than using its MouseLeftButtonDown event - but Command is more flexible than either. :) Hope this helps!

  • Anonymous
    May 05, 2010
    Hi, I'm using your silverlight default style browser and there is no StackedBarSeries style even when I added the System.Windows.Controls.DataVisualization.Toolkit.dll Do you know why? Is there no Default style for the StackedBarSeries? Thanks

  • Anonymous
    May 05, 2010
    The comment has been removed

  • Anonymous
    May 06, 2010
    ozba, If a class doesn't set its DefaultStyleKey property to customize its default Style, then it uses the same default Style as its base class. In this case, the relevant base class is DefinitionSeries and the default Style for that class shows up in SilverlightDefaultStyleBrowser as you expect. I'm not sure there's a lot in there you'd want to customize, but the scenario should work just fine if you do. :)

  • Anonymous
    May 06, 2010
    Ali110, The DataContext of each of your MenuItems is an instance of the Feature class (because that's what's in FeaturesList which is the ContextMenu's ItemsSource). The Feature class does not expose a property named ActiveFeatureCommand (that's currently defined on the MainViewModel class), so the Command Binding you're trying to set up aren't finding anything to bind to. If you move ActiveFeatureCommand to the Feature class, things will work as you expect.

  • Anonymous
    May 06, 2010
    David, Thanks a lot for the help. It worked. :) Really appreciate it.

  • Anonymous
    May 11, 2010
    Thanks for the info!!!  I was looking everywhere for how to dynamically change a theme.  

  • Anonymous
    May 31, 2010
    Hi, Can you please tell me to chage the themes in SL4 dynamically through code. I have gone through all your above explenation expect this you have given all. Please tell me how it possible??? my mail ID: ashok.just4u@gmail.com

  • Anonymous
    June 01, 2010
    Ashok N, I'm planning to blog an example of dynamic theme changes soon - I just haven't gotten to it yet. I might get to it later this week if all goes well. Thanks for your patience! :)

  • Anonymous
    June 01, 2010
    Ashok N, Wow, it looks like I won't need to write that post after all! Laurent Duveau has just posted the following article which covers the scenario in more-or-less the same way I was going to: weblogs.asp.net/.../dynamically-apply-and-change-theme-with-the-silverlight-toolkit.aspx Hope that helps!

  • Anonymous
    June 07, 2010
    The comment has been removed

  • Anonymous
    June 08, 2010
    Mark, An implicit theme will automatically apply to any eligible element that matches its TargetType and is below its definition in the element tree. So if you're trying to theme one of the topmost elements, you need to be sure to add the implicit style somewhere above it - which is tricky for those topmost elements. What you might try is adding the implicit style to App.xaml instead, where it should automatically apply to just about everything. This behavior should all be the same as on WPF, so while it may not be working exactly as you expect, it is following some well-established rules. :)

  • Anonymous
    August 15, 2010
    Do we have any Spline charts and surface charts available in WPF Toolkit ?

  • Anonymous
    August 16, 2010
    Neelu, Not that I'm aware of - but if you write one and share it, I'd love to add it to my links collection: http://cesso.org/r/DVLinks :)

  • Anonymous
    December 29, 2010
    Powerful! That is what I want!

  • Anonymous
    June 14, 2011
    I'm trying to put my .xap file on a diet using Assembly Library Caching. Can you build System.Windows.Controls.Toolkit.Internals.dll so that they can be cached?

  • Anonymous
    June 15, 2011
    teyc, All it takes to enable Assembly Library Caching is an "extmap" file which you can create yourself. The MSDN article outlines the process and describes how to do so: msdn.microsoft.com/.../dd833069(VS.95).aspx The Silverlight Toolkit ships with extmap files for nearly all its assemblies (though it looks like the Internals one was overlooked), so you should be able to start with one of them for an even easier time. :) Hope this helps!

  • Anonymous
    November 01, 2011
    The comment has been removed

  • Anonymous
    November 01, 2011
    mike, This doesn't address all of your concerns, but you should have a "Sample Source Code" link under the "Microsoft Silverlight 4 Toolkit April 2010" folder in your Start Menu. Clicking it will open a folder with a ZIP file containing the complete (buildable) source code for all the samples and another with the complete source code for the Toolkit itself. If you're interested in more examples of charting, I've collected a bunch of useful links here: http://cesso.org/r/DVLinks Hope this helps.