private void MarginSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { DocumentReader?.SetMargin(e.NewValue); if (_state != null) { _state.Margin = DocumentReader.FlowDocument.PagePadding; } }