Forum Visual Studio

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Ugly code into pretty

FlegyFlegy Member ✭✭

Hello,

How can I write code from a picture using a loop?

VjezbaX is ImageButton

Answers

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    How can I write code from a picture using a loop?

    Try to use a foreach sentence to do the wrok in a loop.

    List<object> work = new List<object>();
    
    foreach (var item in work)
    {
        if (item.WorkouFinish)
        {
            ...
        }
    }
    
  • FlegyFlegy Member ✭✭
    edited June 2020

    Need be another way to access all ImageButtons with name Vjezba inside xaml using a loop

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    Need be another way to access all ImageButtons with name Vjezba inside xaml using a loop

    To access the properties of data class in the xaml, try to use data binding.

    Check the tutorial:
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/data-binding/

Sign In or Register to comment.