The following sample demonstrates how to dynamically change properties of the Border element.
Decorator
Border
Panels Overview
Alignment, Margins, and Padding Overview