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

  • Home
  • SEARCH
  • 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 782785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:26:26+00:00 2026-05-14T20:26:26+00:00

FindAncestor RelativeSource only supports ‘Self’ and ‘TemplatedParent’, but I have to bind the width

  • 0

FindAncestor RelativeSource only supports ‘Self’ and ‘TemplatedParent’,
but I have to bind the width of a popup to the width of the page.

Giving the page a name causes problems because sometimes it will
throw exceptions saying a control with that name is already present in the visual tree.

<Popup IsOpen="True"
       Width="{Binding ElementName=BordPage, Path=Width}"
       Height="{Binding ElementName=BordPage, Path=Height}">

Background information:

I’m using a SL4 navigation based application here. BordPage is a navigation page,
which I’m using multiple times within the application. So giving it a name in the page itself is not really a good idea,
but I don’t know how else I can bind to the width and height of the page.

What I’m trying to do is have a black border (with opacity 0.8) cover the entire screen,
(including the controls of the MainPage). Then on top of that I want to display some other controls.

Since the application is touch controlled, providing the user with a ComboBox to select a value doesn’t really work wel. Instead I want to show this black overlay window with a listbox taking up most of the screen so the user can simply touch the value he wants with a single click.

Update: I just realized I can use the ChildWindow class to do this.
But my original question remains.

  • 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-14T20:26:27+00:00Added an answer on May 14, 2026 at 8:26 pm

    My general solution for this problem is by writing a custom behavior. It’s not a pure XAML solution but it gives you a lot more flexibility.

    Create a behavior that searches up the VisualTree to find the right item and then have it set the width of the Popup correctly.

    It may be a little more complicated than a straight binding but it avoids all the naming issues.

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

Sidebar

Related Questions

No related questions found

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.