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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:14:55+00:00 2026-06-09T22:14:55+00:00

Got little confused with MVVM and user control events. I have a user control

  • 0

Got little confused with MVVM and user control events.

I have a user control in my view. It has two modes i.e. Read and Edit. (TextMode)

<Grid
        x:Name="LayoutRoot"
        Background="Transparent">


                <controls:MyUserControl 
                             Mode="{Binding Path=TextMode,Mode=TwoWay}"
                             Text="{Binding Path=ReportText,Mode=TwoWay}"

                </controls:MyUserControl>         

</Grid>

When TextMode changes to ‘Edit’ , i want to add a ‘Save’ button to the Phone Applicationbar, and when the Save button is clicked want to save the Text from user control. Also i want to disable Save button in the ‘Read’ view.
(ie.when TextMode is ‘Read’)

What is the right MVVM way to do this? I thought of two ways :

1) I was thinking exposing ModeChanged property on the user control and propagating it to the view, and then add the Save button. (But does that goes against MVVM way i.e. having code in code behind?).

2) Handling propertychanged of the dependancy property itself, and adding the save button, from the user control. (doesn’t seem right as application logic gets mixed in usercontrol)

How do i involve the view model in this?

What is a good way of doing such operations that will follow MVVM.

  • 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-06-09T22:14:57+00:00Added an answer on June 9, 2026 at 10:14 pm

    Take a look at the BindableApplicationBar in Phone7.Fx. It is a wrapper for the Application Bar that is more “MVVM-friendly”.

    http://blog.humann.info/post/2010/08/27/How-to-have-binding-on-the-ApplicationBar.aspx

    http://phone7.codeplex.com/

    http://bindableapplicationb.codeplex.com/

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

Sidebar

Related Questions

I'm new in Reporting services and got little confused. in the screen shot you
Got my little mechanize code: br.open('http://tumblr.com/customize'); print br.response().read() print br.form['edit_tumblelog[cname]'] # there definitely is
i`ve got a little problem with LINQ. I read out some information via XML-RPC.
I'm a little confused here. I read some of the earlier questions on https
I got confused a little wondering how to link my images to their urls
I'm a little confused here. I've got the following code: class Users { function
OK, I'm a little confused. It's probably just a triviality. I've got a function
Ive been doing some reading, and got a little confused. In Android development, is
I'm a little confused. Basically, I've got 16 span elements on my page which
I just read the wiki article about CRTP , and I'm a little confused

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.