added RearrangeDialog to samples/dialog