Forum Xamarin.Forms

Can cancel or stop a Task?

ClawRageClawRage Member ✭✭
edited June 2019 in Xamarin.Forms

if I use a Task to run somethings ,can I cancel it some way?
maybe like:

int main()

async void CreatBox()
     for(int i=0:i<100;i++)
    StackLayout.Children.Add(new BoxView());

    private void _Button_A_Clicked(object sender, EventArgs e)
        //cancel <CreatBox>,no matter loop times

Best Answers


  • LeonLuLeonLu Member, Xamarin Team Xamurai

    @ClawRage Are there any updates for this issue? If the reply is helpful, please try to mark it as an answer, it will help others who have similar issue.

Sign In or Register to comment.