सेक्शन

प्रेज़ेंटेशन सेक्शन्स को प्रोग्रामेटिकली प्रबंधित करने के उदाहरण—जोड़ना, एक्सेस करना, हटाना और उनका नाम बदलना, Aspose.Slides for .NET का उपयोग करके।

सेक्शन जोड़ें

एक सेक्शन बनाएं जो किसी विशिष्ट स्लाइड से शुरू होता है।

static void AddSection()
{
    using var presentation = new Presentation();
    var slide = presentation.Slides[0];

    // सेक्शन की शुरुआत को इंगित करने वाली स्लाइड निर्दिष्ट करें।
    presentation.Sections.AddSection("New Section", slide);
}

सेक्शन तक पहुँचें

प्रेज़ेंटेशन से सेक्शन की जानकारी पढ़ें।

static void AccessSection()
{
    using var presentation = new Presentation();
    var slide = presentation.Slides[0];

    presentation.Sections.AddSection("My Section", slide);

    // इंडेक्स द्वारा सेक्शन तक पहुँचें।
    var section = presentation.Sections[0];
    var sectionName = section.Name;
}

सेक्शन हटाएँ

पहले जोड़े गए सेक्शन को हटाएँ।

static void RemoveSection()
{
    using var presentation = new Presentation();
    var slide = presentation.Slides[0];

    var section = presentation.Sections.AddSection("Temporary Section", slide);

    // पहला सेक्शन हटाएँ।
    presentation.Sections.RemoveSection(section);
}

सेक्शन का नाम बदलें

मौजूदा सेक्शन का नाम बदलें।

static void RenameSection()
{
    using var presentation = new Presentation();
    var slide = presentation.Slides[0];

    presentation.Sections.AddSection("Old Name", slide);

    var section = presentation.Sections[0];
    section.Name = "New Name";
}