You can do both.  You can add controls at runtime from code, you can load xaml from a database and bind against it, you can generate controls at runtime, save the resultant UI as a xaml string and then reload that.