This is a migrated thread and some comments may be shown as answers.

RadPane header not multibindable

4 Answers 92 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Dwight
Top achievements
Rank 1
Dwight asked on 18 Feb 2014, 09:45 AM
Hi all,

I'm trying to bind a RadPane its header property to a multibinding with a specific converter on it.
That doesn't seem to work, could someone please explain why?

<code>
<telerik:RadPane>
   <telerik:RadPane.Header>
      <MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0} ({1})">
                                <Binding Path="{loc:Res Id=SomeHeaderId, Default='Signal explorer', ResourceSet={StaticResource LocalResourceSet}}" />
                                <Binding Path="{Binding SomeViewModel.SomeProperty}" />
      </MultiBinding>
   </telerik:RadPane.Header>
</telerik:RadPane>
</code>

Thnx in advance!

Kind regards,
Dwight

4 Answers, 1 is accepted

Sort by
0
Dwight
Top achievements
Rank 1
answered on 18 Feb 2014, 09:57 AM
Oh, forgot to add what exception is thrown:

A 'Binding' cannot be set on the 'Path' property of type 'Binding'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.
0
Accepted
Paul
Top achievements
Rank 1
answered on 18 Feb 2014, 12:34 PM
Dwight.

The path property on the Binding property of MultiBinding is not a DependencyProperty.  Typically one would do something like this:

<TextBlock Style="{StaticResource TopicItem}" >
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}, {1} {2}">
<Binding Path="City" />
<Binding Path="State" />
<Binding Path="Zipcode" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>

Where the Path="XXX" entries are not Bindings, but the name of the property to use in the binding.

Paul
0
Dwight
Top achievements
Rank 1
answered on 18 Feb 2014, 12:38 PM
Ouch, I feel like a moron :)
it struck me when I took a look at it again, just some dumb copy paste error and I was going to answer my own question here, but you beat me :)

Thnx anyway for answering!
0
Paul
Top achievements
Rank 1
answered on 18 Feb 2014, 12:49 PM
No problem.  I am always having face palm moments.  Glad to have helped.

Paul
Tags
Docking
Asked by
Dwight
Top achievements
Rank 1
Answers by
Dwight
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Share this question
or