Hi. I'm trying to figure out how to locate modify the attributes of a Hyperlink (e.g. NavigateUri) after it's been created. What's puzzling me is that it seems that you can create a HyperlinkInfo object and then insert it into the document, but there doesn't seem to be any way to get a HyperlinkInfo object back from the document. When I import my document from RTF and then save as xaml, I got the following results (at bottom.)
I know that there are ways to pull back start tags, inlines, and so forth, but none of those seem to correspond to an actual HyperlinkInfo object. Furthermore, I'm seeing two different kinds of Hyperlink information (one in the <FieldRangeStart...>xxxx</FieldRangeStart...> pair, and another in the <HyperlinkRangeStart...>xxxx</HyperlinkRangeStart> pair. It's not clear where I should make mods.
Also: In your InsertHyperlink demo, if I insert a Hyperlink and then come back to edit it, then in module InsertHyperlinkDialog.xaml.cs, the ShowDialog procedure on line 74 includes a parameter for "CurrentHyperLinkInfo as HyperlinkInfo". Indeed, if I break at that point, the information is there, having apparently been supplied by the editor. However, I cannot figure out how to get the same info independent of the editor.
Please explain how this all works. The xaml snippet I promised is as follows:
<t:FieldRangeStart AnnotationID="558">
<t:HyperlinkField DateTimeFormatting="" DisplayMode="Result" GeneralFormatting="" LocationInFile="" NavigateUri="hypercase:///cite_000031"
NumericFormatting="" Target="" />
</t:FieldRangeStart>
<t:HyperlinkRangeStart AnnotationID="559">
<t:HyperlinkInfo NavigateUri="hypercase:///cite_000031" />
</t:HyperlinkRangeStart>
<t:Span FontSize="16" FontStyle="Italic" StyleName="Hyperlink" Text="Ass’n of Am. Physicians and Surgeons Inc. v. Clinton" />
<t:Span FontSize="16" StyleName="Hyperlink" Text=", 997 F.2d 898, 909 (D.C. Cir. 1993)" />
<t:HyperlinkRangeEnd AnnotationID="559" />
<t:FieldRangeEnd AnnotationID="558" />
I know that there are ways to pull back start tags, inlines, and so forth, but none of those seem to correspond to an actual HyperlinkInfo object. Furthermore, I'm seeing two different kinds of Hyperlink information (one in the <FieldRangeStart...>xxxx</FieldRangeStart...> pair, and another in the <HyperlinkRangeStart...>xxxx</HyperlinkRangeStart> pair. It's not clear where I should make mods.
Also: In your InsertHyperlink demo, if I insert a Hyperlink and then come back to edit it, then in module InsertHyperlinkDialog.xaml.cs, the ShowDialog procedure on line 74 includes a parameter for "CurrentHyperLinkInfo as HyperlinkInfo". Indeed, if I break at that point, the information is there, having apparently been supplied by the editor. However, I cannot figure out how to get the same info independent of the editor.
Please explain how this all works. The xaml snippet I promised is as follows:
<t:FieldRangeStart AnnotationID="558">
<t:HyperlinkField DateTimeFormatting="" DisplayMode="Result" GeneralFormatting="" LocationInFile="" NavigateUri="hypercase:///cite_000031"
NumericFormatting="" Target="" />
</t:FieldRangeStart>
<t:HyperlinkRangeStart AnnotationID="559">
<t:HyperlinkInfo NavigateUri="hypercase:///cite_000031" />
</t:HyperlinkRangeStart>
<t:Span FontSize="16" FontStyle="Italic" StyleName="Hyperlink" Text="Ass’n of Am. Physicians and Surgeons Inc. v. Clinton" />
<t:Span FontSize="16" StyleName="Hyperlink" Text=", 997 F.2d 898, 909 (D.C. Cir. 1993)" />
<t:HyperlinkRangeEnd AnnotationID="559" />
<t:FieldRangeEnd AnnotationID="558" />