When you set the MaxOccurrences property there will be that many occurrences of the activity before the recurrence ends. The end date of the recurrence becomes based on this maximum number of occurrences, and the pattern describing when recurring activities must occur, instead of the EndDateUtc property (which is ignored). It is important to set the PeriodMultiple to its expected value prior to setting the MaxOccurrences value in order for a new EndDate to be calculated correctly.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2