ASP.NET MVC

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IHyperLink

    Show / Hide Table of Contents

    Interface IHyperLink

    Represents a hyperlink associated with a non-placeholder shape or text.

    Namespace: Syncfusion.Presentation
    Assembly: Syncfusion.Presentation.Base.dll
    Syntax
    public interface IHyperLink

    Properties

    Action

    Gets the type of action, the hyperlink will be perform when the specified shape or text is clicked. Read-only.

    Declaration
    HyperLinkType Action { get; }
    Property Value
    Type Description
    HyperLinkType

    The action.

    ScreenTip

    Gets or sets the screen tip text of a hyperlink.

    Declaration
    string ScreenTip { get; set; }
    Property Value
    Type Description
    System.String

    The text to be appeared in surface of hyperlink.

    Examples
    //Create a new presentation.
    IPresentation ppDoc = Presentation.Create();
    //Add a slide to the presentation.
    ISlide slide = ppDoc.Slides.Add(SlideLayoutType.Blank);
    //Add a rectangle to the slide
    slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100);
    //Adds paragraph into the shape
    IParagraph paragraph = shape.TextBody.AddParagraph();
    //Adds text to the TextPart
    paragraph.Text = "Google";
    //Set hyperlink to the TextPart
    IHyperLink hyperLink = paragraph.TextParts[0].SetHyperlink("https://www.google.com");
    //Set screen tip to the hyperlink
    hyperLink.ScreenTip = "This hyperlink navigates to Google site";
    //Save the presentation
    ppDoc.Save("Sample.pptx");
    //Close the presentation
    ppDoc.Close();
    'Create a new presentation.
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add a blank slide to the presentation.
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add a rectangle to the slide
    Dim shape As IShape = slide.Shapes.AddShape(AutoShapeType.Rectangle, 100, 100, 100, 100)
    'Set the rotation value to the shape instance.
    shape.Rotation = 300
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    TargetSlide

    Gets the target slide of the hyperlink.

    Declaration
    ISlide TargetSlide { get; }
    Property Value
    Type Description
    ISlide

    The target slide.

    Examples
    IPresentation presDoc = Presentation.Create();
    ISlide slide1 = presDoc.Slides.Add(SlideLayoutType.Blank);
    ISlide slide2 = presDoc.Slides.Add();
    ISlide slide3 = presDoc.Slides.Add();
    ISlide slide4 = presDoc.Slides.Add();
    IShape shape = slide1.Shapes.AddShape(AutoShapeType.Rectangle, 100, 20, 200, 100);
    shape.SetHyperlink("2");      
    ISlide slide = shape.Hyperlink.TargetSlide;
    //Save the presentation to the file system.
    presDoc.Save("Output.pptx");
    //Close the presentation
    presDoc.Close();

    Dim presDoc As IPresentation = Presentation.Create() Dim slide1 As ISlide = presDoc.Slides.Add(SlideLayoutType.Blank) Dim slide2 As ISlide = presDoc.Slides.Add() Dim slide3 As ISlide = presDoc.Slides.Add() Dim slide4 As ISlide = presDoc.Slides.Add() Dim shape As IShape = slide1.Shapes.AddShape(AutoShapeType.Rectangle, 100, 20, 200, 100) shape.SetHyperlink("2")
    Dim slide As ISlide = shape.Hyperlink.TargetSlide ’ Save the presentation to the file system. presDoc.Save("Output.pptx"); ‘ Close the presentation presDoc.Close();

    Url

    Gets the url address of the hyperlink. Read-only.

    Declaration
    string Url { get; }
    Property Value
    Type Description
    System.String

    The URL.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved