Hi Telerik Team,
we are using Telerik Version 2011 Q3 and we are using SL 4.
In our application we define an implicit Style for the RadTreeView:
The binded properties of the static resource TreeViewStrings can change and fire an property changed event, when the language of the application has changed (dynamic localization).
We compile our application for Silverlight 4. When the plugin for SL 5 is used, this style works fine. When the plugin for SL 4 is used, it causes an error and the application cannot be started. The error occurs during InitializeComponents in the App constructor:
Can you tell me whether this is a Silverlight bug or am I doing anything wrong?
When I set the TextDropAfterProperty (and the other three text properties) to a constant string in the Style, everything works fine.
I suppose this to be an SL 4 bug, because it works with the SL 5 plugin, but we have to use the SL 4 plugin (our customer uses it).
I found a solution which works, I am setting an attached property in the implicit style and in the OnPropertyChanged method of this attached property, I set the bindings to the TreeView properties, so I can handle this, but I want to know, what is the problem (SL bug, a mistake I do or what ever) because this is a complicated way to achieve the wished effect.
Thanks and Kind regards,
Li
we are using Telerik Version 2011 Q3 and we are using SL 4.
In our application we define an implicit Style for the RadTreeView:
<
Style
TargetType
=
"telerik:RadTreeView"
>
<
Setter
Property
=
"TextDropAfter"
Value
=
"{Binding Source={StaticResource TreeViewStrings}, Path=TreeViewDropAfter}"
></
Setter
>
<
Setter
Property
=
"TextDropBefore"
Value
=
"{Binding Source={StaticResource TreeViewStrings}, Path=TreeViewDropBefore}"
></
Setter
>
<
Setter
Property
=
"TextDropIn"
Value
=
"{Binding Source={StaticResource TreeViewStrings}, Path=TreeViewDropIn}"
></
Setter
>
<
Setter
Property
=
"TextDropRoot"
Value
=
"{Binding Source={StaticResource TreeViewStrings}, Path=TreeViewDropRoot}"
></
Setter
>
</
Style
>
The binded properties of the static resource TreeViewStrings can change and fire an property changed event, when the language of the application has changed (dynamic localization).
We compile our application for Silverlight 4. When the plugin for SL 5 is used, this style works fine. When the plugin for SL 4 is used, it causes an error and the application cannot be started. The error occurs during InitializeComponents in the App constructor:
System.Windows.Markup.XamlParseException occurred
Message=Das Festlegen von Eigenschaft '' hat eine Ausnahme ausgelöst. [Line: 9 Position: 44]
LineNumber=9
LinePosition=44
StackTrace:
bei System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
bei ACO.Portal.App.InitializeComponent()
bei ACO.Portal.App..ctor()
InnerException: System.NotSupportedException
Message=Die schreibgeschützte Eigenschaft '' kann nicht festgelegt werden.
StackTrace:
bei MS.Internal.XamlMemberInfo.SetValue(Object target, Object value)
bei MS.Internal.XamlManagedRuntimeRPInvokes.SetValue(XamlTypeToken inType, XamlQualifiedObject& inObj, XamlPropertyToken inProperty, XamlQualifiedObject& inValue)
InnerException:
Can you tell me whether this is a Silverlight bug or am I doing anything wrong?
When I set the TextDropAfterProperty (and the other three text properties) to a constant string in the Style, everything works fine.
I suppose this to be an SL 4 bug, because it works with the SL 5 plugin, but we have to use the SL 4 plugin (our customer uses it).
I found a solution which works, I am setting an attached property in the implicit style and in the OnPropertyChanged method of this attached property, I set the bindings to the TreeView properties, so I can handle this, but I want to know, what is the problem (SL bug, a mistake I do or what ever) because this is a complicated way to achieve the wished effect.
Thanks and Kind regards,
Li