private void FocusReader() { if (Data.ShowReader && _focus) { ReaderControl.Focus(FocusState.Programmatic); } }
/// <summary> /// Creates a new instance of the OutlineToggleButtonControl /// </summary> /// <param name="reader">The ReaderControl that is the target of the outline toggling</param> public OutlineToggleButtonControl(ReaderControl reader) { InitializeComponent(); this.DataContext = reader; expandedImage = new BitmapImage(new Uri("/ReaderControl;component/Resources/section_expanded.png", UriKind.Relative)); collapsedImage = new BitmapImage(new Uri("/ReaderControl;component/Resources/section_collapsed.png", UriKind.Relative)); if (reader.ShowSideWindow) { this.NavigationToggleImage.Source = expandedImage; this.ToolTipTextBlock.Text = "Hide outline navigation"; } else { this.NavigationToggleImage.Source = collapsedImage; this.ToolTipTextBlock.Text = "Show outline navigation"; } }
/// <summary> /// Creates a new instance of FitModeControl /// </summary> public FitModeControl(ReaderControl readerContorl) { // Required to initialize variables InitializeComponent(); this.DataContext = readerContorl; }
/// <summary> /// Creates a new instance of OpenLocalFileButtonControl /// </summary> /// <param name="documentViewer"></param> public OpenLocalFileButtonControl(ReaderControl documentViewer) { InitializeComponent(); this._documentViewer = documentViewer; }