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; }
public TrailsViewModel() { _trails = new Trail(); }