Skip to content

Commit b130859

Browse files
Working-with-SmartArts
1 parent 3b82298 commit b130859

File tree

48 files changed

+869
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+869
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35527.113 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Add-SmartArt-node", "Add-SmartArt-node\Add-SmartArt-node.csproj", "{0B596CB3-71A0-4F6B-A694-D585A92380DF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<RootNamespace>Add_SmartArt_node</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<None Update="Output\.gitkeep">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
</ItemGroup>
20+
21+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Syncfusion.DocIO;
2+
using Syncfusion.DocIO.DLS;
3+
using Syncfusion.Drawing;
4+
using Syncfusion.Office;
5+
6+
// Create a new Word document instance.
7+
WordDocument document = new WordDocument();
8+
// Add a new section to the document.
9+
IWSection section = document.AddSection();
10+
// Add a paragraph to the section.
11+
IWParagraph paragraph = section.AddParagraph();
12+
// Append a SmartArt object of type "Alternating Hexagons" to the paragraph with specified dimensions.
13+
WSmartArt smartArt = paragraph.AppendSmartArt(OfficeSmartArtType.AlternatingHexagons, 432, 252);
14+
// Add a new node to the SmartArt.
15+
IOfficeSmartArtNode newNode = smartArt.Nodes.Add();
16+
// Set text content for the newly added SmartArt node.
17+
newNode.TextBody.AddParagraph("New main node added.");
18+
//Creates file stream.
19+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
20+
{
21+
//Saves the Word document to file stream.
22+
document.Save(outputFileStream, FormatType.Docx);
23+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35527.113 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adding-nested-level-nodes", "Adding-nested-level-nodes\Adding-nested-level-nodes.csproj", "{0B596CB3-71A0-4F6B-A694-D585A92380DF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<RootNamespace>Adding_nested_level_nodes</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<None Update="Output\.gitkeep">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
</ItemGroup>
20+
21+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Syncfusion.DocIO;
2+
using Syncfusion.DocIO.DLS;
3+
using Syncfusion.Drawing;
4+
using Syncfusion.Office;
5+
6+
// Create a new Word document instance.
7+
WordDocument document = new WordDocument();
8+
// Add a new section to the document.
9+
IWSection section = document.AddSection();
10+
// Add a paragraph to the section.
11+
IWParagraph paragraph = section.AddParagraph();
12+
// Append a SmartArt object of type "Alternating Hexagons" to the paragraph with specified dimensions.
13+
WSmartArt smartArt = paragraph.AppendSmartArt(OfficeSmartArtType.AlternatingHexagons, 432, 252);
14+
// Add a new node to the SmartArt.
15+
IOfficeSmartArtNode newNode = smartArt.Nodes.Add();
16+
// Add a child node to the SmartArt node
17+
IOfficeSmartArtNode childNode = newNode.ChildNodes.Add();
18+
// Set a text to newly added child node.
19+
childNode.TextBody.AddParagraph("Child node of the existing node.");
20+
//Creates file stream.
21+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
22+
{
23+
//Saves the Word document to file stream.
24+
document.Save(outputFileStream, FormatType.Docx);
25+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35527.113 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Create-SmartArt-Matrix", "Create-SmartArt-Matrix\Create-SmartArt-Matrix.csproj", "{0B596CB3-71A0-4F6B-A694-D585A92380DF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{0B596CB3-71A0-4F6B-A694-D585A92380DF}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<RootNamespace>Create_SmartArt_Matrix</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<None Update="Output\.gitkeep">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
</ItemGroup>
20+
21+
</Project>

0 commit comments

Comments
 (0)