Step by Step: Program Microsoft SQL Server CE 2.0 Merge Replication Using .NET Compact Framework
In this exercise, you will use the .NET Compact Framework and SQL Server CE to configure merge replication, build an application user interface, subscribe to a SQL Server publication, modify and synchronize data, and resolve conflicts.
Read the 50 page MSDN article on the same.