//// This code is part of Document Solutions for Word demos.// Copyright (c) MESCIUS inc. All rights reserved.//usingSystem;usingSystem.Drawing;usingGrapeCity.Documents.Word; namespaceDsWordWeb.Demos{// This demo shows how to associate hyperlink behavior with a shape in a DOCX.publicclassHyperlinkAction {publicGcWordDocumentCreateDocx() {var doc = newGcWordDocument(); var run = doc.Body.AddParagraph().AddRun();var shape = run.GetRange().Shapes.Add(200, 200, GeometryType.Pentagon); shape.Fill.Type = FillType.Solid; shape.Fill.SolidFill.RGB = Color.Coral; shape.Line.Width = 3; shape.Line.Fill.SolidFill.RGB = Color.CadetBlue; shape.AddTextFrame("This shape has HyperlinkOnClick and HyperlinkOnHover properties specified."); shape.Size.EffectExtent.AllEdges = 8; // HyperlinkOnClick properties: shape.HyperlinkOnClick.Address = newUri("https://www.google.com/maps", UriKind.RelativeOrAbsolute); shape.HyperlinkOnClick.ScreenTip = "Go to Google Maps"; shape.HyperlinkOnClick.HighlightClick = true; // HyperlinkOnHover properties: shape.HyperlinkOnHover.Address = newUri("https://www.google.com", UriKind.RelativeOrAbsolute); shape.HyperlinkOnHover.ScreenTip = "Just Google"; shape.HyperlinkOnHover.HighlightClick = true; // Done:return doc; } }}