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 :)

  • LandLuLandLu Member, Xamarin Team Xamurai

    In Visual Studio 2019 you could click F12 to auto-generate the corresponding event for you.

  • MGDMGD Member ✭✭

    it doesnt seem to work in VS2019 on macbook pro,
    hopefully it will get worked out on future release of VS
    Thanks LandLu!!

  • MGDMGD Member ✭✭

    I was looking at some utube videos with VS on Mac and I dont think they have it working on Mac yet. It worked under Xamarin studio for Mac previously until it got sold to VS but not any more. (or not yet)

    Thank you LandLu

  • LandLuLandLu Member, Xamarin Team Xamurai

    VS for Mac lacks this feature.
    But we can use F12 to automatically generate events on Visual Studio 2019 for Windows. Different operations on different environments.

  • MGDMGD Member ✭✭

    yes, I so miss the VS for windows, its so rich in features and much better built,
    but had to get a new system as the emulators took so long and as a mac is needed anyway for the ios app dev, in the end decided to just a get a macbook pro,
    still think windows is much better and more user friendly,

    ..but us VS mac users will have to percevier to endevour as they say, lol
    have a good one LandLu

Sign In or Register to comment.