HyperlinkInfo GetHyperlinkInfo(TextRun run) { RunIndex runIndex = run.GetRunIndex(); Field field = PieceTable.FindFieldByRunIndex(runIndex); System.Diagnostics.Debug.Assert(field != null); HyperlinkInfo hyperlinkInfo = null; if (PieceTable.HyperlinkInfos.TryGetHyperlinkInfo(field.Index, out hyperlinkInfo)) { return(hyperlinkInfo); } return(null); }