You can't resist something without focusing your attention on it. And whatever you focus on expands in your experience. (Think about it...)
So the way to end the unwanted behavior of a child (without resorting to violence) is to stop trying to end it!
Instead, look for ways to think differently about the behavior, until you feel your resistance softening.
You might think, "I can understand how he feels," or "She's finding her way," or "It's not the end of the world," or even, "It's okay for me to resist this... but I feel better when I let it go."
The less you resist, the more creative you can be, and the more you can inspire a change rather than having to force one.