IRONSOFTWAREHOME
客製化項目符號
using IronPPT;
using IronPPT.Models;
using IronPPT.Models.Styles;

// Create new PowerPoint presentation
var document = new PresentationDocument();

// Import image
Image image = new Image();
image.LoadFromFile("sample.png");

// Style the bullet point
var style = new ParagraphStyle()
{
    Bullet = new Bullet()
    {
        Picture = image,
        //BulletColor = Color.Blue,
        //FollowsDefaultTextSize = true
    },
};

var paragraph = new Paragraph();
paragraph.Style = style;
paragraph.AddText("Test Text");

document.Slides[0].AddParagraph(paragraph);

// Export PowerPoint presentation
document.Save("styledBullet.pptx");
Imports IronPPT
Imports IronPPT.Models
Imports IronPPT.Models.Styles

' Create new PowerPoint presentation
Dim document As New PresentationDocument()

' Import image
Dim image As New Image()
image.LoadFromFile("sample.png")

' Style the bullet point
Dim style = New ParagraphStyle() With {
    .Bullet = New Bullet() With {
        .Picture = image
        'BulletColor = Color.Blue,
        'FollowsDefaultTextSize = true
    }
}

Dim paragraph = New Paragraph()
paragraph.Style = style
paragraph.AddText("Test Text")

document.Slides(0).AddParagraph(paragraph)

' Export PowerPoint presentation
document.Save("styledBullet.pptx")
NuGet Download
PM > Install-Package IronPPT
客製化項目符號

客製化項目符號

在建立資訊簡報時,突出涉及的各方的具體重點通常是有益的。 段落有時可能包含太多資訊,使得項目符號成為更有效的替代方案。使用IronPPT,您可以輕鬆直觀地自訂和新增項目符號,讓您能夠有效地呈現和強調關鍵資訊,簡化整個過程,並消除手動新增的需求。

在此程式碼範例中,我們將快速展示如何在段落中新增帶有附加圖片的自訂項目符號。

五步驟自訂項目符號的新增指南

  • var style = new ParagraphStyle();
  • style.Bullet = new Bullet() { Picture = new Image("sample.png") };
  • var paragraph = new Paragraph();
  • paragraph.Style = style;
  • paragraph.AddText("測試文字");

程式碼說明

建立自訂項目符號是一個簡單的過程。 首先,我們需要初始化一個新的ParagraphStyle類,這將允許我們定義我們的項目符號的樣式。 接下來,我們將建立Bullet類的新實例。 在此範例中,我們將通過整合圖片來加強項目符號,這是透過修改Picture屬性並指派我們在之前步驟中載入的圖片來實現的。

一旦我們設定了Paragraph類。 這是我們應用剛建立的ParagraphStyle,完整的圖片增強項目符號的地方。 最後,為了完成,我們可以使用AddText方法向段落中新增文字,使我們能夠完全自訂項目符號並建立視覺吸引力的簡報。

按照我們的逐步指南學習如何管理簡報。
在GitHub上查看

準備好開始了嗎?

Nuget Downloads 6,070版本:2026.9剛剛發布

Key in blue circle

立即免費取得 30 天試用金鑰

Your trial license will be sent to your email address

無任何限制。100% 解鎖。無需信用卡。

bullet_checked無需信用卡或建立帳號無任何限制。100% 解鎖。無需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
預訂您的免費實時演示
Booking Badge

受到全球數百萬工程師的信任

Iron Software 的客戶標誌
獲取您的無義務諮詢
完成以下表格或發送電子郵件至sales@ironsoftware.com
您的詳細資訊將始終保密。
受到全球數百萬工程師的信任
Iron Software 的客戶標誌
立即獲取您的30天試用金鑰
無需信用卡或帳戶建立