public List <CompanionPlant> GetPlants()
        {
            var       items = new List <CompanionPlant>();
            XDocument doc   = XDocument.Load("http://zenfulneps.com/Data/CompanionPlants.xml");

            foreach (var plant in doc.Descendants("Plants"))
            {
                var item = new CompanionPlant();
                item.PlantId    = (string)plant.Element("PlantID");
                item.Plant      = (string)plant.Element("Plant");
                item.Companions = new List <string>();
                item.Companions = ((string)plant.Element("Companions"))
                                  .Replace(System.Environment.NewLine, string.Empty).Replace("         ", "  ").Trim().Split(',').ToList();
                if (item.Companions.Count == 1 && string.IsNullOrEmpty(item.Companions[0]))
                {
                    item.Companions[0] = "None";
                }
                if (item.Companions.Count == 0)
                {
                    item.Companions.Add("None");
                }
                item.Incompatibles = new List <string>();
                if (!string.IsNullOrEmpty((string)plant.Element("Incompatible")))
                {
                    item.Incompatibles = ((string)plant.Element("Incompatible"))
                                         .Replace(System.Environment.NewLine, string.Empty).Replace("         ", "  ").Trim().Split(',').ToList();
                }
                if (item.Incompatibles.Count == 1 && string.IsNullOrEmpty(item.Incompatibles[0]))
                {
                    item.Incompatibles[0] = "None";
                }
                if (item.Incompatibles.Count == 0)
                {
                    item.Incompatibles.Add("None");
                }
                item.Benefits = string.Empty;
                if (!string.IsNullOrEmpty((string)plant.Element("Benefits")))
                {
                    item.Benefits = ((string)plant.Element("Benefits")).Trim()
                                    .Replace(System.Environment.NewLine, string.Empty).Replace("         ", "  ");
                }
                item.Type         = ((string)plant.Element("Type")).Trim();
                item.PlantPicture = ((string)plant.Element("PlantPic")).Trim();
                if (!string.IsNullOrEmpty((string)plant.Element("Stars")))
                {
                    item.Rating = ((string)plant.Element("Stars")).Trim();
                }
                item.ScientificName = ((string)plant.Element("ScientificName")).Trim();
                items.Add(item);
            }
            return(items.OrderBy(o => o.Plant).ToList());
        }
        private void BindData(CompanionPlant plant)
        {
            var imageBitmap = Common.ImageHelper.GetImageBitmapFromURL(Common.ImageHelper.ImageLocation + plant.PlantPicture);

            _plantImageView.SetImageBitmap(imageBitmap);
            _plantNameTextView.Text           = plant.Plant;
            _plantscientificNameTextView.Text = plant.ScientificName;
            _companionsTextView.Text          = string.Join(",", plant.Companions);
            _incompatiblesTextView.Text       = string.Join(",", plant.Incompatibles);
            _benefitsTextView.Text            = string.Join(",", plant.Benefits);
            _typeTextView.Text = string.Join(",", plant.Type);
            if (string.IsNullOrEmpty(plant.PrevPlant))
            {
                _prevButton.Visibility = ViewStates.Invisible;
            }
            if (string.IsNullOrEmpty(plant.NextPlant))
            {
                _nextButton.Visibility = ViewStates.Invisible;
            }
        }