eclipsed4utoo's Profile User Rating: *****

Reputation: 1531 Grandmaster
Group:
Alumni
Active Posts:
6,106 (2.24 per day)
Joined:
21-March 08
Profile Views:
105,869
Last Active:
User is offline Aug 15 2015 09:56 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Playstation
Your Car:
Mitsubishi
Dream Kudos:
1775
Expert In:
.NET

Latest Visitors

Icon   eclipsed4utoo says, don't take downvotes personal. You gave information/code that was either wrong or should have been better. Get over it.

Posts I've Made

  1. In Topic: Windows 8 App With Command Save Form MVVM

    Posted 4 Aug 2015

    Well, you don't really need the parameter. The instance of the ViewModel already has it's data set because of the binding. When I use bindings and a Command on a button, I don't actually use the CommandParameter. I just use the properties on the ViewModel in the command handler.

    Like...

    public void SaveUserCommand()
    {
        string userName = this.UserName;
        // or
        string userName = this.User.UserName;
    }
    
    
  2. In Topic: Windows 8 App With Command Save Form MVVM

    Posted 4 Aug 2015

    I haven't used command parameters all that often. However, it looks like you aren't passing the command parameter to the command binding.

    You have...

    SaveCommand = new RelayCommand(SaveUserCommand);
    
    


    and it should be something like...

    SaveCommand = new RelayCommand(parameter => SaveUserCommand(parameter));
    
    
  3. In Topic: Telerik vs. Xamarin vs. Appcelerator

    Posted 4 Aug 2015

    A little late, but here is my answer for Xamarin. It's the only one I've used of the three.

    If you are a C# developer and can afford $25/month, go with Xamarin. If you are going to support iOS, you will also need a Mac.

    Note: I have been a full-time Xamarin developer for more than 3 years, so I may be a little biased here.
  4. In Topic: Windows 8 App With Command Save Form MVVM

    Posted 4 Aug 2015

    See my updated post above.
  5. In Topic: Windows 8 App With Command Save Form MVVM

    Posted 4 Aug 2015

    Most likely, your problem is that you are binding to the properties of the model directly, without the Model implementing INotifyPropertyChanged.

    It's a toss up with how you want to proceed. You could implement INotifyPropertyChanged in your Model and that should work. However, to some, this would break the seperation of concerns with MVVM, as a Model shouldn't really be changing a View.

    Your other option is to put "duplicate" properties on the ViewModel that match the properties on the Model, then remove the "User." portion of the binding. This would bind to the properties on the ViewModel, allowing the VM to get the values from the view when Save is clicked.

    So a possible property on the ViewModel could look like...

    public string UserName
    {
    	get { return _userModel.UserName; }
    	set
    	{
    		_userModel.UserName = value;
    		NotifyPropertyChanged("UserName");
    	}
    }
    
    


    and the binding for the TextBox would be...

    <TextBox Text="{Binding UserName}" Height="40" Margin="13,1" Width="408"/>
    
    

My Information

Member Title:
Not Your Ordinary Programmer
Age:
33 years old
Birthday:
December 16, 1981
Gender:
Location:
Florence, SC
Full Name:
Ryan Alford
Years Programming:
6
Programming Languages:
C#, VB.Net, ASP.Net, Silverlight, WP7, Android, some JavaScript, MonoTouch, Objective-C

Contact Information

E-mail:
Private
Website URL:
Website URL  http://www.eclipsed4utoo.com/blog/
LinkedIn:
http://www.linkedin.com/in/eclipsed4utoo
Facebook:
http://www.facebook.com/eclipsed4utoo
Twitter:
eclipsed4utoo

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    atholon Icon

    23 Aug 2012 - 09:36
    Hey Ryan,
    Just wanted to thank you for your post in this thread: http://www.dreamincode.net/forums/topic/161952-textwriter-help/
    I'd been looking for a while about how to use the TextWriter with StreamWriter to append text.
  2. Photo

    trevster344 Icon

    07 Feb 2012 - 09:33
    I happen to agree with your personal message there, too many people take it personal.
  3. Photo

    MATTtheSEAHAWK Icon

    21 Apr 2011 - 16:13
    I saw this:
    http://gyazo.com/76ba9e1a382483093f2deac2173309de.png
    I made this:
    http://gyazo.com/9cefc500a3f96c441b8610ebcd60d760.png
    Congratulations Grand Master :)
  4. Photo

    Dogstopper Icon

    24 Jan 2011 - 21:00
    Totally didn't mean for that down vote. My finger slipped.
  5. Photo

    heyoman1 Icon

    28 Nov 2010 - 20:49
    Which site did you use to make your sig?
  6. Photo

    khan96 Icon

    31 Oct 2010 - 05:19
    i m using Import dll in c# and gave an aceess viloation error
  7. Photo

    khan96 Icon

    31 Oct 2010 - 05:19
    shuaib here
  8. Photo

    eclipsed4utoo Icon

    16 Sep 2010 - 04:40
    feeling very lucky today.
  9. Photo

    macosxnerd101 Icon

    16 Sep 2010 - 04:36
    W00t! 666 reputation. Aren't you feeling lucky, today?
  10. Photo

    eclipsed4utoo Icon

    27 Aug 2010 - 04:37
    @programmerjiwa
    I have no clue.
  11. Photo

    programmerjiwa Icon

    26 Aug 2010 - 20:14
    hi, how to change username in dreamincode...?
  12. Photo

    eclipsed4utoo Icon

    25 Aug 2010 - 13:43
    @Frinavale
    I think I know which one you are talking about...
    http://www.dreamincode.net/forums/topic/187628-redirect-website-in-content-holder/
  13. Photo

    Frinavale Icon

    25 Aug 2010 - 13:17
    :) thought about posting a link to it at the time...probably should have because now I can't find the thread. It doesn't matter anyways :)
  14. Photo

    eclipsed4utoo Icon

    25 Aug 2010 - 13:04
    @Finavale
    Thanks...though not sure which thread you are talking about.
  15. Photo

    Frinavale Icon

    25 Aug 2010 - 12:49
    I am really impressed with your ability to understand questions that are incomprehensible :)
  • (2 Pages)
  • +
  • 1
  • 2