Advanced Forum Search Results
-
Well, I figured out a solution. Instead of supplying a TargetName for each animation, if I instead use the static Storyboard method 'SetTarget' and just supply each 'myVisual' element as the target, everything works as expected. It still seems as if the code I posted above should work, but now it doesn't seem that ...
-
I have a situation where I am producing a large amount of visual elements on the fly that I want to be able to apply animations to. Since we have to supply a particular animation a "TargetName" I assumed I could just name each of my visuals using their HashCode to make each name unique. Each of the visuals is actually a ...
-
So I misspoke. Bindings are the wrong approach here, however the spirit of what I'm trying to do remains, which is to set the 'From' property of an animation to a property that exists on the UserControl in XAML. I understand why bindings wouldn't work as you can't call SetBinding on an animation object.
Unless I'm ...
-
I have a UserControl that defines a VisualState in XAML where I would like to bind the From and To properties of the DoubleAnimation to properties of the UserControl. Is this possible? I can create the Storyboard just fine in the code-behind, but I don't know if I can create those same bindings in the XAML of the ...
-
So, I have an almost identical problem to the one the original poster outlined. I was able to use your proposed solution with some minor adjustments for it to work in a ControlTemplate, and got it running. Now, however, I'd like to throw a wrench into this. What if I want to expose other properties on 'MyControl' that ...
-
Yes, this is the workaround I've decided to use. Thanks for the response!
-
Since no one has responded to the following thread in the Controls forum, http://silverlight.net/forums/t/20873.aspx, I figured I'd go ahead and report this behavior as a bug.
To summarize in Silverlight you are not able to bind the ItemsSource of an ItemsControl to a collection that is any type other than IEnumerable, including types that ...
-
So, after more playing with how to accomplish what I'm trying to do I've discovered a few things (with some co-workers help). If I name my ItemsControl in the template and harvest it in the code-behind file I can set it's ItemsSource directly to my collection and it will work as expected. Similarly, I can create a ...
-
Yes, I also discovered this solution. I just wanted to make sure this is "by design". While I see that you've at least documented the expected behavior in MSDN, could someone please explain to me why Silverlight is doing this? I have to assume it's to keep the size of the Silverlight run-time at a minimum, ...
-
The following works in WPF, and everything I've read leads me to believe this should work in Silverlight as well:
<controls:TestControl>
<controls:TestControl.Template>
...