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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:32:09+00:00 2026-05-18T09:32:09+00:00

Greetings I have a Main Window which will hold multiple User Controls. I will

  • 0

Greetings

I have a Main Window which will hold multiple User Controls. I will give you a better view with an example picture:
example

    <!--Player 1-->
    <local:ucRaces x:Name="ucRacesP1" Width="78" Height="33" Visibility="Hidden" />
    <Image Name="imageRacePlayer1" Height="27" Width="27" />

    <!--Player 2-->
    <local:ucRaces x:Name="ucRacesP2" Width="78" Height="33" Visibility="Hidden" />
    <Image Name="imageRacePlayer2" Height="27" Width="27" />
  • UC3 and UC4 are the same User Control
  • UC3 has been given the name ucRacesP1 (Hidden by default)
  • UC4 has been given the name ucRacesP2 (Hidden by default)
  • Depending on which button is pressed on the image one of these controls becomes visible.

Now what I want to do is, when a person selects a value in UC3 the properties for player1 need to be set. When a value gets selected in UC4 I need the properties for player2 to be set. I was thinking to do this with properties but when searching for Properties and WPF I stumbled upon Dependency Properties. Which started to confuse me a bit, would I need to use normal Properties or these Dependency Properties.

  • How can I know if I have to set the player1 values or the player2 values (this depends from which UserControl sends the data)?

  • How would I save these values best for the entire application?

  • Is putting the User Controls on hidden at the start (due to positioning) the best way or is there a better alternative?

Thank you for your time reading my question(s)!

  • 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-18T09:32:10+00:00Added an answer on May 18, 2026 at 9:32 am

    i think , your statring point is

    Depending on which button is pressed on the image one of these controls becomes visible

    1- There are certain buttons on the image and user can click on the image.

    2- You can make use of ICommand interface to exceute the specific command in UI i.e. if user press Palyer1 , you cna execute Player1Command if user presses Player2 , you can execute Player2Command.

    3- There may be the duplication of code in player1 and player2 but don’t worry about it , you can always refactor the code first thing is to dispatch the command to the respective command handler.

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

Sidebar

Related Questions

Greetings, Problem: I have a main view, that already is associated with a xib
Greetings. I have an 2-D array of size [N][N] which will represent a rectangular
Greetings, I have to following problem. I have a WCF Service which runs under
Greetings - I have a SharePoint 2010 server running with the User Profile service
Greetings, I have a problem in my application I'm building in. To give the
Greetings, I have a particular object which can be constructed from a file, as
Greetings I have an ajax call which: Gets an xml file of posts Populates
Greetings - I have a table of Articles and a table of Categories. An
Greetings I have a program that creates multiples instances of a class, runs the
Greetings! I have a Repeater control that's using an XmlDataSource control. <asp:FormView id=myFormView runat=server

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.