After investigating the default control templates shipped by WPF, I conclude rules of thumb for creating the custom CoontrolTemplate. (The rules don’t necessarily apply on every single default control template of WPF, but I can say they work for most of them.)
1. use Border or Chrome as the outermost level of the custom control template, and set the Border/Chrome’s SnapsToDevicePixels to true
2. if the custom control template is supposed to contain ContentPresenter, ItemsPresenter or ScrollViewer, set the ContentPresenter/ItemsPresenter/ScrollViewer’s SnapsToDevicePixels to {TemplateBinding UIElement.SnapsToDevicePixels}. No matter how many levels stay between the outermost level and the ContentPresenter/ItemsPresenter/ScrollViewer, no need to set the SnapsToDevicePixels for them.
Exceptions:
1. No need to set SnapsToDevicePixels for custom control templates of Window, Frame and their subclasses. But it is also OK to set it.
2. ContentControl’s control template does not have a top level container working as layout, but only has a ContentPresenter. Anyway you do not need to customize a control template for ContentControl either.
3. Rules above don’t by default apply on ScrollViewer, ReaderPageViewer, FlowDocumentPageViewer, FlowDocumentScrollViewer, FlowDocumentReader, DocumentViewer and their subclasses. It is better to check their default control templates before starting to make the custom ones.
P.S.:











