Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 748445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:19:17+00:00 2026-05-14T14:19:17+00:00

I have a problem with a multibinding: <Canvas> <local:SPoint x:Name=sp Width=10 Height=10> <Canvas.Left><!– irrelevant

  • 0

I have a problem with a multibinding:

<Canvas>
 <local:SPoint x:Name="sp" Width="10" Height="10">
  <Canvas.Left><!-- irrelevant binding here --></Canvas.Left>
  <Canvas.Top>
   <MultiBinding Converter="{StaticResource myConverter}" Mode="TwoWay">
    <Binding ElementName="cp1" Path="(Canvas.Top)"/>
    <Binding ElementName="cp1" Path="Height"/>
    <Binding ElementName="cp2" Path="(Canvas.Top)"/>
    <Binding ElementName="cp2" Path="Height"/>
    <Binding ElementName="sp" Path="Height"/>
    <Binding ElementName="sp" Path="Slope" Mode="TwoWay"/>
   </MultiBinding>
  </Canvas.Top>
 </local:SPoint>
 <local:CPoint x:Name="cp1" Width="10" Height="10" Canvas.Left="20" Canvas.Top="150"/>
 <local:CPoint x:Name="cp2" Width="10" Height="10" Canvas.Left="100" Canvas.Top="20"/>
</Canvas>

In order to calculate the Canvas.Top value, myConverter needs all the bound values. This works great in Convert(). Going the other way, myConverter should ideally calculate the Slope value (Binding.DoNothing for the rest), but it needs the other values in addition to the Canvas.Top one passed to ConvertBack(). What is the right way to solve this?

I have tried making the binding OneWay and create an additional multibinding for local:SPoint.Slope, but that causes infinite recursion and stack overflow. I was thinking the ConverterParameter could be used, but it seems like it’s not possible to bind to it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:19:17+00:00Added an answer on May 14, 2026 at 2:19 pm

    The approach may not be the most elegant one but it does work around the limits of multi bindings and the fact that ConverterParameter is not a DependencyProperty.

    Make your converter derive from FrameworkContentElement. Define a number of DependencyProperty proprerties. You will need as many of them as there are values that you need on both ends of conversion.

    Since your converter normally sits in XAML resources, DataContext and ElementName bindings won’t work without some help from DataContextSpy and/or ElementSpy, depending on your particular binding needs.

    The oddity of this approach is that you will have two identical bindings, one in <MultiBinding> section of XAML and the other one in Resources where you define your converter. The former one is needed to trigger the MultiBinding while the latter one actually provides the value in ConvertBack direction.

    A downside is that resources are shared and thus if you need the same functional converter somewhere else on the page, you might need to declare a second one in your resources. This is only if two MultiBindings need different parameters. If parameters are shared, you may as well use the same resource. You might also try x:Shared="False" on the converter resource but I am not sure if that would work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with setting width and height of a movieclip. What i do
I have a problem with the MultiBinding. It seems the latest value of the
it seems that I have a problem with my multibinding. Scenario: I have a
I have problem witch change style border-left-color in next button, if main button is
i have problem with closing saveFileDialog. when i click'cancel' window appears once again. here
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names
I have problem with starting processes in impersonated context in ASP.NET 2.0. I am
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem with ActionLink. I'd like to pass to my ActionLink parameter for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.