-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to make list item numbers bold #260
Comments
You can see this: |
WordList wordList2 = document.AddList(WordListStyle.Headings111, false, 12); When I use this code to change the sizing I just get the error CS15101: No overload for method "AddList" takes 3 arguments. It appears it only takes one argument, which is the wordliststyle value? |
I guess it was never implemented... it was working as part of that PR, but never made to master. |
ok that's great! this means that we can just push this to Master and it will add this functionality right? |
yes and no, it was missing any tests so it was stale. Also if you look at XML level how Word does the changes it does it in different place, and there was question in for that as well, again - a reason why it was stale. And now PR owner deleted it... so we're starting from scratch. Also his PR only addressed the size of the style, not everything so there's more to it... |
Yes I would like to be able to make it bold. In Fact I only really need it to be bold and I'm not really bothered about the font size. Are you working on this/is there any way I could help this development. I am motivated to not have to rewrite my project in OpenXML haha. |
If look at OpenXMLSDK, the changes as shown here: Are done on the "numbering" side On the very first level, and the PR that was proposed was doing it similarly but for all levels, it was also not complete as it allowed to set it, but not really to manipulate it, or even check if it's set. It shouldn't be too hard to implement but I've been busy with other stuff. WordList class mostly has everything ready to add this. |
As part of this PR: I've added basic properties, you can play with it in that branch var paragraph = document.AddParagraph("This is 1st list - LowerLetterWithBracket");
paragraph.ParagraphAlignment = JustificationValues.Center;
WordList wordList1 = document.AddList(WordListStyle.LowerLetterWithBracket);
wordList1.Bold = true;
wordList1.FontSize = 16;
wordList1.Color = Color.DarkRed;
var listItem1 = wordList1.AddItem("Text 1");
listItem1.Bold = true;
listItem1.FontSize = 16;
listItem1.Color = Color.DarkRed;
wordList1.AddItem("Text 2", 1);
wordList1.AddItem("Text 3", 2);
paragraph = document.AddParagraph("This is 2nd list - LowerLetterWithDot");
paragraph.ParagraphAlignment = JustificationValues.Center;
paragraph.Bold = true;
paragraph.FontSize = 16;
paragraph.Color = Color.AliceBlue;
document.Save(openWord); |
var s1l2p1 = masterList.AddItem("Performance", 1).SetBold(true);
This code is giving the following output:
"1.2 Performance"
But I want to make the 1.2 bold as well. How do I achieve this?
The text was updated successfully, but these errors were encountered: