Advanced Forum Search Results
-
I thought with the addition of DP -> DP binding and to SL3, it would be possible to use BindingOperations.SetBinding() to databind two dependency objects together. The method itself accepts a DependencyObject as the target parameter. However it throws an exception unless the binding target is a FrameworkElement or ...
-
I agree, it'd be useful to unseal the Thumb class. In my case I wanted to make a multi-value slider control, so the thumb should have some simple selected visual states to indicate which value is editing. This would be trivial to do if Thumb were subclassable. Is there any reason that class needs to be sealed? Can this ...
-
Hey,
Silverlight runs in the browser but you can use the HyperlinkButton instead of a normal button to go to a new page. Just set its NavigateUrl to wherever you need it to go.
-
Hi Mog Liang,
Yes it can be set that way but _only_ if the collection is null. In the Sample class, if you comment out the line in its constructor then it works, but if you leave it in you get the exception. This is why I think it's a bug, since it doesn't try to replace the collection.
-
Thanks Mog. It's nice to know this is resolved in SL3 (unfortunately I'm stuck with SL2 for now!).
Cheers.
-
True, his post did leave that out but you can try it for yourself. I made a quick test with a viewmodel (INotifyPropertyChanged implemented) and you still can't bind the property, which is when I checked what RowDefinition/ColumnDefinition subclass from. Classes that don't derive from FrameworkElement can't be data bound, ...
-
RowDefinition and ColumnDefinition both directly subclass DependencyObject, but the SetBinding method is defined in FrameworkElement. So I don't think you can use the binding system to set its value. I suppose in Silverlight 3 you can since the data binding system is changing, but not Silverlight 2.
-
SharpGIS,
Thanks for the suggestion. Just to be sure I added the missing overrides from TypeConverter (CanConvertTo and ConvertTo) but none of them are hit. It makes sense since the XAML parser is converting the attribute into the collection and not the other way around.
The only calls to the converter are what you'd ...
-
Hi Davide,
Thanks for answering. I realize it works in code, and will work around this some other way. However it still is a bug that should be addressed as it prevents you from using it in a control template like I'm doing.
-
I was hoping someone could point out to me if I'm doing something wrong here. I'm trying to create a SL2 control which will have a collection of objects, so I made my own collection (subclassing from ObservableCollection) and everything works fine.The problem is that I'd like the collection to be an empty collection by default ...