How to pass a value from .xaml file to .xaml.cs file?

MAJosephMAJoseph Member ✭✭
edited January 7 in Xamarin.Forms

Hi I'm very new to Xamarin. I try to make a simple project. Here I'm using some binding method. but I can't fetch the value from the .xaml file to .xaml.cs file.
Please help or give me any reference for this issue. I used a button.... from that I used button_Clicked event to fetch the data. But I don't know and I can't find the solution for fetch the data in entry field of .xaml file to .xaml.cs file.


Best Answer

  • MAJosephMAJoseph ✭✭
    Accepted Answer

    I've got the solution. It's same like


  • MAJosephMAJoseph Member ✭✭
    Accepted Answer

    I've got the solution. It's same like

  • jezhjezh Member, Xamarin Team Xamurai

    Congrats. Hope you have a good time in coding.

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    A design comment - for Forms you should really be using MVVM with bindings and commands. This avoids having to code things in the XAML.cs files, and cleanly separates the UI (in the View) from the business logic (in the ViewModel).

  • MAJosephMAJoseph Member ✭✭

    @JamesLavery Actually I can't understand what you said. But I heard about that words and I hope I'll learn and understand that. Thanks for the sugggestion.
    And also Thanks to @jezh

Sign In or Register to comment.