Layer.ToBitmap() is only available in Silverlight and doesn't exist in the WPF version.
It exists there only to enable certain printing scenarios that otherwise would be impossible in Silverlight. With WPF that limitation is not there, and you can instead generate a bitmap directly of the entire map (Map is a Visual).