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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:51:16+00:00 2026-05-18T06:51:16+00:00

I have a WPF control (ControlA) which references another control (ControlB) like so: <Grid>

  • 0

I have a WPF control (ControlA) which references another control (ControlB) like so:

<Grid>
    <controls:ControlB x:Name="ControlB"  />         
    <my:DataGrid 
        x:Name="dataGridBackup" 
        ItemsSource="{Binding}" 
        AutoGenerateColumns="False" >
        <my:DataGrid.Columns>
            <my:DataGridCheckBoxColumn 
                Header="Connectable" 
                Binding="{Binding Connectable}"  />
        </my:DataGrid.Columns>
    </my:DataGrid>
</Grid>

Now in ControlB I have a button and i want to bind the IsEnabled property to the Connectable column of my Grid on controlA.

I can get it working when i have the controls on the same page but not in the aboce scenario. I tried with

<Button 
    IsEnabled="{Binding ElementName=dataGridBackup, Path=SelectedItem.Connectable}">
</Button>
  • 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-18T06:51:16+00:00Added an answer on May 18, 2026 at 6:51 am

    Button inside ControlB has no normal way to know what’s outside the control ControlB. One possible solution is to add boolean dependency property to ControlB like IsConnectable. In XAML of control ControlA, bind the property to dataGridBackup with path, like you did. In XAML of control ControlB, bind the button’s IsEnabled property to IsConnectable of ControlB.

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

Sidebar

Related Questions

If you have a WPF control library which you wanted to license to developers,
I have a WPF Window which has a among other controls hosts a Frame.
I have a WPF control, that has a list of Investors, and in the
The WPF control WindowsFormsHost inherits from IDisposable. If I have a complex WPF visual
Each item in a WPF ListBox control seems to have a bit of left
Using WPF, I have a TreeView control that I want to set its ItemTemplate
So, I have a WindowsFormsHost control in my WPF app (hosting a Dundas Chart)
I have WPF ListBox which is bound to a ObservableCollection, when the collection changes,
I have a WPF application in VS 2008 with some web service references. For
I have a WPF project and I'm trying to setup a NAnt build script

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.