When importing from a .docx the RichTextBox is adding a blank line for each continuous section break. You can see this in the attached file - in the RichTextBox there is an extra line between sections that does not exist in the source word document.
Currently floating images specified using the VML shapes are imported as non-floating, for example:
<v:shape id="_x0000_s1026" type="#_x0000_t75" style="height:180.25pt;margin-left:62.25pt;margin-top:1.65pt;position:absolute;width:180.25pt;z-index:251658240" o:preferrelative="t">
<v:imagedata r:id="rId4" />
</v:shape>
Showing a document that contains a Table object without any TableRow inside leads to NullReferenceException.
Workaround: After importing the document, remove the tables that don't have content:
foreach (var table in document.EnumerateChildrenOfType<Table>())
{
if (table.Rows.Count < 1)
{
table.Parent.Children.Remove(table);
}
}
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'SolidColorBrush' (HashCode=63604780); target property is 'Color' (type 'Color')
This element specifies the presence of a symbol character at the current location in the run’s content. It is similar to the sym element and is used to add emojis to the document content. The symEx element is not defined in the Office Open XML specification but it is part of the extensions of MS Word to the Office Open XML.
Currently one can insert emojis by pressing "Ctrl + .". However, the emojis are inserted in black and white.
Incorrect behavior when setting the table cells padding
Steps to reproduce:
- Insert a table
- Open Table Properties
- Clear the value in the "Left" field
- Check "Same for all sides"
- Click OK
The document styles are not respected because of wrongly imported custom style name after copy-paste from MS Word and exported to HTML.
Workaround: avoid using styles with braces in their name.
To reproduce:
- Add a multilevel list to a document and export it to HTML
- Import the document again the list is changed and the values are not correct.
private bool SetLocation(Point location)
{
if (this.HorizontalOffset != location.X || this.VerticalOffset != location.Y)
{
this.HorizontalOffset = location.X;
this.VerticalOffset = location.Y;
return true;
}
// added the following 5 lines to trigger the popup to recalculate it's location
else
{
this.VerticalOffset++;
this.VerticalOffset--;
}
return false;
}
In localizing your demo code for a RichTextBox I noticed some size mode-related inconsistencies in icon placements in the various sorts of buttons:
In Size=large, generally the icon appears above the button text. In the split button the icon is centered over and partially obscures the text. Unacceptable!
In Size=medium, generally the icon appears to the left of the text. In the Split button it appears below the text. Either is fine but should be consistent.
Also, when Size=medium and icon beside text, in all buttons I would like to see more spacing between the icon and the text; there seems to be virtually none.