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 1089859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:17:23+00:00 2026-05-16T23:17:23+00:00

Can I combine 2 elements in one biding? <Canvas> <Ellipse Fill=Black x:Name=dot1 Width=16 Height=16

  • 0

Can I combine 2 elements in one biding?

<Canvas>
    <Ellipse Fill="Black" x:Name="dot1" Width="16" Height="16" Canvas.Left="124" Canvas.Top="133"/>
    <Ellipse Fill="Black" x:Name="dot2" Width="16" Height="16" Canvas.Left="221" Canvas.Top="40"/>
    <Line Stroke="Black" x:Name="line1" 
          X1="{Binding ElementName=dot1, Path=(Canvas.Left)}" 
          Y1="{Binding ElementName=dot1, Path=(Canvas.Top)}"

          X2="{Binding ElementName=dot2, Path=(Canvas.Left)}" 
          Y2="{Binding ElementName=dot2, Path=(Canvas.Top)}"
          />
</Canvas>

I need not only to bind the Line Start and End Points to the dots Left and Right, but the addition of (Left + Width / 2) and (Top + Height / 2) (centers).

Is that possible?

  • 1 1 Answer
  • 2 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-16T23:17:24+00:00Added an answer on May 16, 2026 at 11:17 pm

    Yes, use a MultiBinding and implement the formula in a IMultiValueConverter.

    Edit:

    Something like this where only X1 uses the MultiBindingand the rest are unchanged.

    <Canvas>
        <Ellipse Fill="Black" x:Name="dot1" Width="16" Height="16" Canvas.Left="124" Canvas.Top="133"/>
        <Ellipse Fill="Black" x:Name="dot2" Width="16" Height="16" Canvas.Left="221" Canvas.Top="40"/>
        <Line Stroke="Black" x:Name="line1" 
        Y1="{Binding ElementName=dot1, Path=(Canvas.Top)}"
    
        X2="{Binding ElementName=dot2, Path=(Canvas.Left)}" 
        Y2="{Binding ElementName=dot2, Path=(Canvas.Top)}">
            <Line.X1>
                <MultiBinding Converter="{StaticResource myMultiValueConverter}">
                    <Binding Path="(Canvas.Top)"/>
                    <Binding Path="(Canvas.Left)"/>
                </MultiBinding>
            </Line.X1>
        </Line>
    </Canvas>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How I can combine multiple form elements to one validator? I have address information
Is there any way I can combine list of expressions into one? I have
I noticed that I can't combine --traditional options with the other one letter other
I know I can combine tables with sql queries, but that's not what I
I want to define some basic styles that I can combine. Let's say I
I saw that even by writing separate commands, we can combine two different types
Can I combine code that uses System.Drawing.Bitmap together with other code in a program
Can I combine these 2 SQL statements? Currently running 2 queries. Trying to tighten
How can I combine this two selectors: $(td.listas select:last option:selected) This doesn't work! What
How can you combine two windows in Screen? I have two windows such that

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.