Class NoteTag

NoteTag class

Represents a note tag.

public sealed class NoteTag : IEquatable<NoteTag>, INoteTag

Properties

NameDescription
CompletedTime { get; }Gets or sets the completed time.
CreationTime { get; set; }Gets or sets the creation time.
FontColor { get; set; }Gets or sets the font color.
Highlight { get; set; }Gets or sets the highlight color.
Icon { get; set; }Gets or sets the icon.
Label { get; set; }Gets or sets the label text.
Status { get; }Gets or sets the status.

Methods

NameDescription
static CreateAwardRibbon(string)Creates a new note tag with AwardRibbon icon and specified label.
static CreateBinoculars(string)Creates a new note tag with Binoculars icon and specified label.
static CreateBlankPaperWithLines(string)Creates a new note tag with BlankPaperWithLines icon and specified label.
static CreateBlueCheckMark(string)Creates a new note tag with BlueCheckMark icon and specified label.
static CreateBlueCircle(string)Creates a new note tag with BlueCircle icon and specified label.
static CreateBlueCircle1(string)Creates a new note tag with BlueCircle1 icon and specified label.
static CreateBlueCircle2(string)Creates a new note tag with BlueCircle2 icon and specified label.
static CreateBlueCircle3(string)Creates a new note tag with BlueCircle3 icon and specified label.
static CreateBlueDownArrow(string)Creates a new note tag with BlueDownArrow icon and specified label.
static CreateBlueEightPointStar(string)Creates a new note tag with BlueEightPointStar icon and specified label.
static CreateBlueFollowUpFlag(string)Creates a new note tag with BlueFollowUpFlag icon and specified label.
static CreateBlueLeftArrow(string)Creates a new note tag with BlueLeftArrow icon and specified label.
static CreateBlueRightArrow(string)Creates a new note tag with BlueRightArrow icon and specified label.
static CreateBlueSolidTarget(string)Creates a new note tag with BlueSolidTarget icon and specified label.
static CreateBlueSquare(string)Creates a new note tag with BlueSquare icon and specified label.
static CreateBlueStar(string)Creates a new note tag with BlueStar icon and specified label.
static CreateBlueSun(string)Creates a new note tag with BlueSun icon and specified label.
static CreateBlueTarget(string)Creates a new note tag with BlueTarget icon and specified label.
static CreateBlueTriangle(string)Creates a new note tag with BlueTriangle icon and specified label.
static CreateBlueUmbrella(string)Creates a new note tag with BlueUmbrella icon and specified label.
static CreateBlueUpArrow(string)Creates a new note tag with BlueUpArrow icon and specified label.
static CreateBlueXNo(string)Creates a new note tag with BlueXNo icon and specified label.
static CreateBlueXWithDots(string)Creates a new note tag with BlueXWithDots icon and specified label.
static CreateCalendarDateWithClock(string)Creates a new note tag with CalendarDateWithClock icon and specified label.
static CreateCar(string)Creates a new note tag with Car icon and specified label.
static CreateClosedEnvelope(string)Creates a new note tag with ClosedEnvelope icon and specified label.
static CreateCloud(string)Creates a new note tag with Cloud icon and specified label.
static CreateCoinsWithWindowBackdrop(string)Creates a new note tag with CoinsWithWindowBackdrop icon and specified label.
static CreateCommentBubble(string)Creates a new note tag with CommentBubble icon and specified label.
static CreateContactInformation(string)Creates a new note tag with ContactInformation icon and specified label.
static CreateContactPersonOnCard(string)Creates a new note tag with ContactPersonOnCard icon and specified label.
static CreateDollarSign(string)Creates a new note tag with DollarSign icon and specified label.
static CreateEMailMessage(string)Creates a new note tag with EMailMessage icon and specified label.
static CreateFrowningFace(string)Creates a new note tag with FrowningFace icon and specified label.
static CreateGlobe(string)Creates a new note tag with Globe icon and specified label.
static CreateGreenCheckMark(string)Creates a new note tag with GreenCheckMark icon and specified label.
static CreateGreenCircle(string)Creates a new note tag with GreenCircle icon and specified label.
static CreateGreenCircle1(string)Creates a new note tag with GreenCircle1 icon and specified label.
static CreateGreenCircle2(string)Creates a new note tag with GreenCircle2 icon and specified label.
static CreateGreenCircle3(string)Creates a new note tag with GreenCircle3 icon and specified label.
static CreateGreenDownArrow(string)Creates a new note tag with GreenDownArrow icon and specified label.
static CreateGreenEightPointStar(string)Creates a new note tag with GreenEightPointStar icon and specified label.
static CreateGreenLeftArrow(string)Creates a new note tag with GreenLeftArrow icon and specified label.
static CreateGreenRightArrow(string)Creates a new note tag with GreenRightArrow icon and specified label.
static CreateGreenSolidArrow(string)Creates a new note tag with GreenSolidArrow icon and specified label.
static CreateGreenSquare(string)Creates a new note tag with GreenSquare icon and specified label.
static CreateGreenStar(string)Creates a new note tag with GreenStar icon and specified label.
static CreateGreenSun(string)Creates a new note tag with GreenSun icon and specified label.
static CreateGreenTarget(string)Creates a new note tag with GreenTarget icon and specified label.
static CreateGreenTriangle(string)Creates a new note tag with GreenTriangle icon and specified label.
static CreateGreenUmbrella(string)Creates a new note tag with GreenUmbrella icon and specified label.
static CreateGreenUpArrow(string)Creates a new note tag with GreenUpArrow icon and specified label.
static CreateGreenXNo(string)Creates a new note tag with GreenXNo icon and specified label.
static CreateGreenXWithDots(string)Creates a new note tag with GreenXWithDots icon and specified label.
static CreateHeart(string)Creates a new note tag with Heart icon and specified label.
static CreateHighPriority(string)Creates a new note tag with HighPriority icon and specified label.
static CreateHome(string)Creates a new note tag with Home icon and specified label.
static CreateHyperlinkGlobe(string)Creates a new note tag with HyperlinkGlobe icon and specified label.
static CreateInstantMessagingContactPerson(string)Creates a new note tag with InstantMessagingContactPerson icon and specified label.
static CreateLaptop(string)Creates a new note tag with Laptop icon and specified label.
static CreateLightBulb(string)Creates a new note tag with LightBulb icon and specified label.
static CreateLightningBolt(string)Creates a new note tag with LightningBolt icon and specified label.
static CreateMeeting(string)Creates a new note tag with Meeting icon and specified label.
static CreateMobilePhone(string)Creates a new note tag with MobilePhone icon and specified label.
static CreateMovieClip(string)Creates a new note tag with MovieClip icon and specified label.
static CreateMusicalNote(string)Creates a new note tag with MusicalNote icon and specified label.
static CreateNoIcon(string)Creates a new note tag without icon and with specified label.
static CreateNotebookWithClock(string)Creates a new note tag with NotebookWithClock icon and specified label.
static CreateOpenBook(string)Creates a new note tag with OpenBook icon and specified label.
static CreateOpenEnvelope(string)Creates a new note tag with OpenEnvelope icon and specified label.
static CreateOrangeSquare(string)Creates a new note tag with OrangeSquare icon and specified label.
static CreatePadlock(string)Creates a new note tag with Padlock icon and specified label.
static CreatePaperClip(string)Creates a new note tag with PaperClip icon and specified label.
static CreatePen(string)Creates a new note tag with Pen icon and specified label.
static CreatePersonWithExclamationMark(string)Creates a new note tag with PersonWithExclamationMark icon and specified label.
static CreatePinkSquare(string)Creates a new note tag with PinkSquare icon and specified label.
static CreatePlane(string)Creates a new note tag with Plane icon and specified label.
static CreatePresentationSlide(string)Creates a new note tag with PresentationSlide icon and specified label.
static CreatePushpin(string)Creates a new note tag with Pushpin icon and specified label.
static CreateQuestionBalloon(string)Creates a new note tag with QuestionBalloon icon and specified label.
static CreateQuestionMark(string)Creates a new note tag with QuestionMark icon and specified label.
static CreateQuotationMark(string)Creates a new note tag with QuotationMark icon and specified label.
static CreateRedSquare(string)Creates a new note tag with RedSquare icon and specified label.
static CreateReminderBell(string)Creates a new note tag with ReminderBell icon and specified label.
static CreateResearch(string)Creates a new note tag with Research icon and specified label.
static CreateRoseOnStem(string)Creates a new note tag with RoseOnStem icon and specified label.
static CreateScheduledTask(string)Creates a new note tag with ScheduledTask icon and specified label.
static CreateSmilingFace(string)Creates a new note tag with SmilingFace icon and specified label.
static CreateSunflower(string)Creates a new note tag with Sunflower icon and specified label.
static CreateTelephoneWithClock(string)Creates a new note tag with TelephoneWithClock icon and specified label.
static CreateTimeSensitive(string)Creates a new note tag with TimeSensitive icon and specified label.
static CreateTwoPeople(string)Creates a new note tag with TwoPeople icon and specified label.
static CreateYellowCheckMark(string)Creates a new note tag with YellowCheckMark icon and specified label.
static CreateYellowCircle(string)Creates a new note tag with YellowCircle icon and specified label.
static CreateYellowCircle1(string)Creates a new note tag with YellowCircle1 icon and specified label.
static CreateYellowCircle2(string)Creates a new note tag with YellowCircle2 icon and specified label.
static CreateYellowCircle3(string)Creates a new note tag with YellowCircle3 icon and specified label.
static CreateYellowDownArrow(string)Creates a new note tag with YellowDownArrow icon and specified label.
static CreateYellowEightPointStar(string)Creates a new note tag with YellowEightPointStar icon and specified label.
static CreateYellowKey(string)Creates a new note tag with YellowKey icon and specified label.
static CreateYellowLeftArrow(string)Creates a new note tag with YellowLeftArrow icon and specified label.
static CreateYellowRightArrow(string)Creates a new note tag with YellowRightArrow icon and specified label.
static CreateYellowSolidTarget(string)Creates a new note tag with YellowSolidTarget icon and specified label.
static CreateYellowSquare(string)Creates a new note tag with YellowSquare icon and specified label.
static CreateYellowStar(string)Creates a new note tag with YellowStar icon and specified label.
static CreateYellowSun(string)Creates a new note tag with YellowSun icon and specified label.
static CreateYellowTarget(string)Creates a new note tag with YellowTarget icon and specified label.
static CreateYellowTriangle(string)Creates a new note tag with YellowTriangle icon and specified label.
static CreateYellowUmbrella(string)Creates a new note tag with YellowUmbrella icon and specified label.
static CreateYellowUpArrow(string)Creates a new note tag with YellowUpArrow icon and specified label.
static CreateYellowX(string)Creates a new note tag with YellowX icon and specified label.
static CreateYellowXWithDots(string)Creates a new note tag with YellowXWithDots icon and specified label.
Equals(NoteTag)Determines whether the specified object is equal to the current object.
override Equals(object)Determines whether the specified object is equal to the current object.
override GetHashCode()Serves as a hash function for the type.

Examples

Shows how to add new image with tag.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();

// Create an object of the Document class
Document doc = new Document();

// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);

// Initialize Outline class object
Outline outline = new Outline(doc);

// Initialize OutlineElement class object
OutlineElement outlineElem = new OutlineElement(doc);

// Load an image
Aspose.Note.Image image = new Aspose.Note.Image(doc, dataDir + "icon.jpg");

// Insert image in the document node
outlineElem.AppendChildLast(image);
image.Tags.Add(NoteTag.CreateYellowStar());

// Add outline element node
outline.AppendChildLast(outlineElem);

// Add outline node
page.AppendChildLast(outline);

// Add page node
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "AddImageNodeWithTag_out.one";
doc.Save(dataDir);

Shows how to add new paragraph with tag.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();

// Create an object of the Document class
Document doc = new Document();

// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);

// Initialize Outline class object
Outline outline = new Outline(doc);

// Initialize OutlineElement class object
OutlineElement outlineElem = new OutlineElement(doc);
ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };
RichText text = new RichText(doc) { Text = "OneNote text.", ParagraphStyle = textStyle };
text.Tags.Add(NoteTag.CreateYellowStar());

// Add text node
outlineElem.AppendChildLast(text);

// Add outline element node
outline.AppendChildLast(outlineElem);

// Add outline node
page.AppendChildLast(outline);

// Add page node
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "AddTextNodeWithTag_out.one";
doc.Save(dataDir);

Shows how to access details of a tag.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();

// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "TagFile.one");

// Get all RichText nodes
IList<RichText> nodes = oneFile.GetChildNodes<RichText>();

// Iterate through each node
foreach (RichText richText in nodes)
{
    var tags = richText.Tags.OfType<NoteTag>();
    if (tags.Any())
    {
        Console.WriteLine($"Text: {richText.Text}");
        foreach (var noteTag in tags)
        {
            // Retrieve properties
            Console.WriteLine($"    Completed Time: {noteTag.CompletedTime}");
            Console.WriteLine($"    Create Time: {noteTag.CreationTime}");
            Console.WriteLine($"    Font Color: {noteTag.FontColor}");
            Console.WriteLine($"    Status: {noteTag.Status}");
            Console.WriteLine($"    Label: {noteTag.Label}");
            Console.WriteLine($"    Icon: {noteTag.Icon}");
            Console.WriteLine($"    High Light: {noteTag.Highlight}");
        }
    }
}

Shows how to add new table with tag.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();

// Create an object of the Document class
Document doc = new Document();

// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);

// Initialize TableRow class object
TableRow row = new TableRow(doc);

// Initialize TableCell class object
TableCell cell = new TableCell(doc);

// Insert cell content
cell.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Single cell."));

// Add cell to row node
row.AppendChildLast(cell);

// Initialize table node
Table table = new Table(doc)
              {
                  IsBordersVisible = true,
                  Columns = { new TableColumn { Width = 70 } }
              };

// Insert row node in table
table.AppendChildLast(row);

// Add tag to this table node
table.Tags.Add(NoteTag.CreateQuestionMark());

Outline outline = new Outline(doc);
OutlineElement outlineElem = new OutlineElement(doc);

// Add table node
outlineElem.AppendChildLast(table);

// Add outline elements
outline.AppendChildLast(outlineElem);
page.AppendChildLast(outline);
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "AddTableNodeWithTag_out.one";
doc.Save(dataDir);

Shows how to prepare a template for weekly meeting.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();

// Create an object of the Document class
var headerStyle = new ParagraphStyle() { FontName = "Calibri", FontSize = 16 };
var bodyStyle = new ParagraphStyle() { FontName = "Calibri", FontSize = 12 };

var d = new Document();
bool restartFlag = true;
var outline = d.AppendChildLast(new Page()
                                    {
                                        Title = new Title() { TitleText = new RichText() { Text = $"Weekly meeting {DateTime.Today:d}", ParagraphStyle = ParagraphStyle.Default } }
                                    })
               .AppendChildLast(new Outline() { VerticalOffset = 30, HorizontalOffset = 30 });

outline.AppendChildLast(new OutlineElement())
       .AppendChildLast(new RichText() { Text = "Important", ParagraphStyle = headerStyle });
foreach (var e in new[] { "First", "Second", "Third" })
{
    outline.AppendChildLast(new OutlineElement() { NumberList = CreateListNumberingStyle(bodyStyle, restartFlag) })
           .AppendChildLast(new RichText() { Text = e, ParagraphStyle = bodyStyle });
    restartFlag = false;
}

outline.AppendChildLast(new OutlineElement())
       .AppendChildLast(new RichText() { Text = "TO DO", ParagraphStyle = headerStyle, SpaceBefore = 15 });
restartFlag = true;
foreach (var e in new[] { "First", "Second", "Third" })
{
    outline.AppendChildLast(new OutlineElement() { NumberList = CreateListNumberingStyle(bodyStyle, restartFlag) })
           .AppendChildLast(new RichText() { Text = e, ParagraphStyle = bodyStyle, Tags = { NoteCheckBox.CreateBlueCheckBox() } });
    restartFlag = false;
}

d.Save(Path.Combine(dataDir, "meetingNotes.one"));

See Also