The separation of the UI and style (controltemplate) on the custom controls of WPF/Silverlight is agreed by a common convention, where the role is templatepart. You can refer to the following links:
Custom Controls in WPF (3) customcontrol (lower): http://www.cnblogs.com/zhouyinhui/archive/2007/12/01/979715.html
Smooth animations, at the window level: http://pavanpodila.spaces.live.com/blog/cns! 9c9e888164859398! 634. Entry
How to create controls using controltemplate: http://msdn.microsoft.com/zh-cn/library/cc964292 (vs.95). aspx
Navigable grid in Silverlight 2, supporting page navigation for list controls such as DataGrid: http://www.codeproject.com/KB/silverlight/NavigableGrid.aspx
Understand templated control in Silverlight 2.0: http://silverlight.cn/index.php? Q = node/597
Templatepartattribute usage of Silverlight: http://www.cnblogs.com/think8848/archive/2008/12/07/1349575.html