void captionManager_MarkerReached(IMarkerManager <CaptionRegion> markerManager, CaptionRegion region)
        {
            OnCaptionRegionReached(region);
            if (!regions.ContainsKey(region))
            {
#if HACK_XAMLTYPEINFO
                var children = region.Children as MediaMarkerCollection <TimedTextElement>;
#else
                var children = region.Children;
#endif
                var regionBlock = new CaptionBlockRegion();
                if (CaptionBlockRegionStyle != null)
                {
                    regionBlock.Style = CaptionBlockRegionStyle;
                }
                regionBlock.CaptionRegion  = region;
                regionBlock.CaptionManager = regionManagerFactory(children);
                regions.Add(region, regionBlock);
                CaptionsPresenterElement.Children.Add(regionBlock);
                regionBlock.ApplyTemplate();
                VisibleCaptions.Add(region);
            }
        }
        void captionManager_MarkerReached(IMarkerManager<CaptionRegion> markerManager, CaptionRegion region)
        {
            OnCaptionRegionReached(region);
            if (!regions.ContainsKey(region))
            {
#if HACK_XAMLTYPEINFO
                var children = region.Children as MediaMarkerCollection<TimedTextElement>;
#else
                var children = region.Children;
#endif
                var regionBlock = new CaptionBlockRegion();
                if (CaptionBlockRegionStyle != null) regionBlock.Style = CaptionBlockRegionStyle;
                regionBlock.CaptionRegion = region;
                regionBlock.CaptionManager = regionManagerFactory(children);
                regions.Add(region, regionBlock);
                CaptionsPresenterElement.Children.Add(regionBlock);
                regionBlock.ApplyTemplate();
                VisibleCaptions.Add(region);
            }
        }