Example #1
0
        private StackLayout SetIconsToTrail(Trail trail)
        {
            var icons = new StackLayout
            {
                Orientation = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.FillAndExpand
            };

            if (trail.DogAllowed)
                icons.Children.Add(GenericsContent.CreateIcon("icon_white_dog_freindly.png"));

            if (trail.GoodForKids)
                icons.Children.Add(GenericsContent.CreateIcon("icon_white_good_for_kids.png"));

            if (!string.IsNullOrEmpty(trail.DurationType))
                icons.Children.Add(GenericsContent.CreateWhiteIconByType(trail.DurationType));

            if (!string.IsNullOrEmpty(trail.Type))
                icons.Children.Add(GenericsContent.CreateWhiteIconByType(trail.Type));

            return icons;
        }
Example #2
0
 public TrailsViewModel()
 {
     _trails = new Trail();
 }