private void btnPreviewPane_CheckChanged(object sender, RoutedEventArgs e) {
if (isOnLoad) {
} else if (e.RoutedEvent.Name == "Checked") {
this.clPreview.Width = new GridLength((double)this.PreviewPaneWidth);
this.clPreviewSplitter.Width = new GridLength(1);
var selectedItem = _ShellListView.SelectedItems.FirstOrDefault();
if (selectedItem != null && selectedItem.IsFileSystem && _ShellListView.GetSelectedCount() == 1 && !selectedItem.IsFolder) {
this.Previewer.FileName = selectedItem.ParsingName;
}
Utilities.SetRegistryValue("PreviewPaneEnabled", 1);
this.IsPreviewPaneEnabled = true;
} else {
this.clPreview.Width = new GridLength(0);
this.clPreviewSplitter.Width = new GridLength(0);
this.Previewer.FileName = null;
Utilities.SetRegistryValue("PreviewPaneEnabled", 0);
this.IsPreviewPaneEnabled = false;
}
}