Skaffa Visio Shape Inherit Chars
Contents
[
Hide
]
Hämta ärvda teckensnittsdata för en Visio-form
Visio-formerna kan ärva den överordnade stilen och huvudformen. Utvecklare kan hämta eller ställa in ärvte teckensnittsdata för en Visio-form. Egenskapen InheritLine, exponerad avForm klass, innehåller linjeformateringsvärdena för formen som ärvs av den överordnade stilen och huvudformen.
Hämta ärvt teckensnittsdataprogrammeringsexempel
Följande kodavsnitt hämtar formens ärvda teckensnittsdata. Kontrollera denna exempelkod:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_Shapes(); | |
// Call a Diagram class constructor to load the VSDX diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
// Get page by name | |
Page page = diagram.Pages.GetPage("Page-3"); | |
foreach (Aspose.Diagram.Shape shape in page.Shapes) | |
{ | |
Aspose.Diagram.Char ch = shape.InheritChars.GetChar(0); | |
Console.WriteLine(ch.Style.Value); | |
Console.WriteLine(ch.Color.Value); | |
Console.WriteLine(ch.FontName.Value); | |
Console.WriteLine(ch.Size.Value); | |
Console.WriteLine(ch.Case.Value); | |
Console.WriteLine(ch.IsUnderline); | |
Console.WriteLine(ch.IsItalic); | |
Console.WriteLine(ch.IsStrikethrough); | |
Console.WriteLine(ch.IsDoubleStrikethrough); | |
Console.WriteLine(ch.IsSubscript); | |
Console.WriteLine(ch.IsSuperscript); | |
} |