Skip to content
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

BulletedList Bullet style type #387

Closed
Methodicle opened this issue Oct 26, 2020 · 4 comments
Closed

BulletedList Bullet style type #387

Methodicle opened this issue Oct 26, 2020 · 4 comments

Comments

@Methodicle
Copy link

I've been using an app I developed that generated bulleted lists.
Up until today the bullets were a solid black point, I've changed no code but rebuilt my app today and now the bullets are hollow.

ex from:
• List Item 1
ex to:
o List Item 1

without changing any code at all:
var bulletedList = document.AddList("ListItem1", 1, ListItemType.Bulleted); document.AddListItem(bulletedList, "ListItem1", 1);

@XceedBoucherS
Copy link
Collaborator

Hi,
This is a normal behavior.
ListItems on level 0 have black dots.
ListItems on level 1 have white circles.
...
In your case, you set your listItems to be on level 1. Set them on level 0 and you will see black dots:

var bulletedList = document.AddList( "ListItem1", 0, ListItemType.Bulleted ); document.AddListItem( bulletedList, "ListItem1", 0 );

@Methodicle
Copy link
Author

@XceedBoucherS If that's the case is there a way to get a bulletlist indented with black dots?
It's odd that this was the behaviour previously and it suddenly changed after rebuilding.

@XceedBoucherS
Copy link
Collaborator

Hi,
I don't remember this behavior to have changed.
You can add an indentation to ListItems. Something like this could work:
`var document = DocX.Create( "doc.docx" );

  var bulletedList = document.AddList( "ListItem1", 0, ListItemType.Bulleted, null, false, false );
  bulletedList.Items[ 0 ].IndentationFirstLine = 36f;
  document.AddListItem( bulletedList, "ListItem1", 0 );

  document.InsertList( bulletedList );

  document.Save();`

@Methodicle
Copy link
Author

@XceedBoucherS Thanks a bunch 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants