Unplanned
Last Updated: 18 May 2017 10:52 by ADMIN
ADMIN
Boby
Created on: 18 May 2017 10:52
Category: RichTextBox
Type: Bug Report
0
RichTextBox: DocumentRuler.CreateHorizontalRuler and CreateVerticalRuler are not working when set in XAML
DocumentRuler.CreateHorizontalRuler and DocumentRulerCreateVerticalRuler properties are not always changing the visibility of the horizontal and vertical ruler when set to false. If the properties are set to false in XAML, the corresponding ruler parts are still visible.

The problem is that the values of the properties are reset internally during the controls creation, and after the layout mode of the document is changed.

Workaround: Set the properties in code behind, and reset them after layout mode change:

        public MainWindow()
        {
            InitializeComponent();

            this.ruler.CreateHorizontalRuler = false;
            this.radRichTextBox.DocumentLayoutModeChanged += (sender, e) => this.ruler.CreateHorizontalRuler = false;
        }
0 comments