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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:38:05+00:00 2026-05-15T07:38:05+00:00

Hy guys! I am currently working on a little WPF project using MVVM via

  • 0

Hy guys!

I am currently working on a little WPF project using MVVM via the Onyx framework.

My currentview architecture is like this:

<DockPanel>
    <Menu DockPanel.Dock="Top" Background="#cecece">
        <!-- Menu -->
    </Menu>

    <Grid>
        <views:TranslationView x:Name="translationView" />
    </Grid>
</DockPanel>

The question that I now have is how to implement the relationship between the two viewmodels. I currently basically just have the TranslationView have its own ViewModel with no link to the parent ViewModel.

The problem is that I want to be able to open some file via the MainView and then parse the contents and display them in the TranslationView. Is there a recommended way to do this?

I thought about just using the TranslationViewModel as a property in the MainViewModel and then using it as DataContext for the TranslationView but it kinda seems to run against Onyx’s model to define the ViewModel through a type (not a object) reference.

  • 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-15T07:38:05+00:00Added an answer on May 15, 2026 at 7:38 am

    Onyx doesn’t have a “model to define the ViewModel through a type (not a object) reference”. The ViewModel attached property can be assigned an object reference. In fact, this property is an Object type and uses coercion to change a Type instance into an object instance of the specified Type. This is a convenience only. You’re free to just assign an object reference created in any way you want.

    Like most questions, there’s any number of ways to solve your problem. The solution you mention but dismissed because you thought it went against Onyx’s design is one that could work, but I’d hesitate to use, simply because it creates tighter coupling. Another solution would be to utilize the Event Agregator pattern to communicate between the views in a disconnected fashion. Or you could utilize a more service oriented approach. For example, I usually define an IApplication service that stands in where you’d normally access Application.Current in a tightly coupled design. You could provide a property on this service to hold the contents of the loaded file, and expose INotifyPropertyChanged on the service to allow the TranslationViewModel to know that the property was changed.

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

Sidebar

Related Questions

.Hi guys, i need a little help with a project that i'm currently working
Hey guys, Im working with wpf 3d, im currently writing a program that will
I'm currently working with a project using Hibernate + JPA. I don't recall exactly
I'm currently using Spring+Hibernate+MySQL for a project I'm working on. I realized that a
Hi friends currently i m working on a small business project. for this project
I'm currently using the ARKit ported by the http://iphonear.org guys, looping through a fetched
I'm currently working on a project where I need to print out a lesson
I am currently working on a project that is hosted at GoDaddy and it
I am currently working on a website and lately have been using GD with
I have an idea for a project that I am currently working on, I

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.