Answer: It is very difficult to find a plant that will thrive in sun and shade both, and in all honesty I can't think of anything that will keep a dog in for any length of time. Establishing any new planting does take care and attention until the plants have grown a good sturdy root system. A weekly deep watering is more or less critical if it doesn't rain during that first season. BAsed on your criteria it sounds like a fence might be the better choice.
Q&A Library Searching Tips