You might want to display text in a cell at a particular angle for optimal display. You can rotate the text at different angles in C1FlexSheet to display text at a certain angle. To rotate text in a cell, use C1FlexSheet.SetCellAngle method.
To provide option to rotate cell data at a certain angle, follow the given steps:
XAML |
Copy Code
|
---|---|
<ComboBox x:Name="cmbRotate" SelectedIndex="0" Margin="3" ToolTipService.ToolTip="Text Rotate" SelectionChanged="cmbRotate_SelectionChanged"> <ComboBox.Items> <ComboBoxItem Content="0 degree" /> <ComboBoxItem Content="45 degree" /> <ComboBoxItem Content="90 degree" /> <ComboBoxItem Content="135 degree" /> <ComboBoxItem Content="180 degree" /> </ComboBox.Items> </ComboBox> |
The given code allows you to rotate the cell data at 45, 90, 135, and 180 degree angles. You can customize the code and add the angle at which you want your data to be displayed.
On selecting an angle to rotate text, say 45 degree angle, the output appears similar to the following: