visual studio 2019 MAC - program doesn't provide the event handler

MGDMGD Member ✭✭

​hi

I wonder if anyone can help,

I loaded visual studio 2019 MAC the latest stable version with all the options today on a Mac today with latest Xcode and latest Mac OS and I have two issues,

1- I create a new blank solution in Xamarin,

I add a button as below:

xcml file

<?xml version="1.0" encoding="utf-8" ?>

.cs code behind file

using System; using System.Collections.Generic;

using System.ComponentModel; using System.Linq;

using System.Text;

using System.Threading.Tasks; using Xamarin.Forms; namespace f

public partial class MainPage : ContentPage

{ public MainPage()

{ InitializeComponent();

}

} }

the problem is when is created the program doesn't provide the event handler, nor on if I create it, etc etc the (Intellisense) or the autocomplete or whatever doesn't work as above.

2- the second problem is that on a PC when you run the emulator and then do changes to the xcml file, you can always press refresh on the emulator and see the changes on the Mac I only see the stop button but there is no refresh to reload the app on the emulator,

please let me know if you want screen shots or what

can anyone advise

thank you

Answers

  • MGDMGD Member ✭✭

    sorry I think some of the code got deleted above, pls see images of what's happening, thanks

  • LandLuLandLu Member, Xamarin Team Xamurai

    the problem is when is created the program doesn't provide the event handler, nor on if I create it, etc etc the (Intellisense) or the autocomplete or whatever doesn't work as above.

    It seems VS for Mac lacks of this feature of Visual Studio 2019.
    You have to create an event manually in the cs file:

    public void MyHandler(object sender, EventArgs args)
    {
        // your code
    }
    

    Then this event name could be displayed in the XAML.

    2- the second problem is that on a PC when you run the emulator and then do changes to the xcml file, you can always press refresh on the emulator and see the changes on the Mac I only see the stop button but there is no refresh to reload the app on the emulator,

    I'm not sure if you are talking about the restart button in the Visual Studio 2019 on Windows.
    VS for Mac is another IDE on Mac machine it has its own appearance so it doesn't have the restart button. You can stop debugging and click the run button again to see the changes.

  • MGDMGD Member ✭✭

    hi LandLuud
    thank you for your response
    looks like neither work in Visual studio 2019
    hopefully in the future they will implement it
    have a good day :)

Sign In or Register to comment.