documentviewer

Disabling text selection in DocumentViewer

一个人想着一个人 提交于 2019-12-22 06:10:12
问题 Simple question. How do you disable the text selection of DocumentViewer in WPF? This is the feature where an XPS document is displayed by the viewer and then text can be highlighted via mouse. The highlighted text can also be copied but I have already disabled this. I just don't know how to disable the highlighting. Thanks! 回答1: We have solved this by overriding the ControlTemplate of the ScrollViewer embedded in the DocumentViewer control. Insert the Style below in "Window.Resources":

Databinding to DocumentViewer.Document Property

空扰寡人 提交于 2019-12-13 06:50:12
问题 I have a view that contains a DocumentViewer control and I have another class that has a property that exposes a FixedDocumentSequence and implements INotifyPropertyChanged. I am trying to databind the document property of the documentviewer to the FixedDocumentSequence property, when I run it the documentviewer does not load the FixedDocumentSequence. All ofthe other bindings in the view are working but not this one. Here are the code snippets any help would be appreciated, hopefully it is

ASP.Net HTML Document viewer [closed]

蹲街弑〆低调 提交于 2019-12-12 15:31:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . In my application, we store documents in Sharepoint and use asp.net application to display that. Which is the best editor to integrate and that would work on every browser post IE7? Does google docs provide api as I am looking for that kind of viewer for all type of files. Remember I am looking for html and not

How can I center my page in the document viewer?

落爺英雄遲暮 提交于 2019-12-11 03:08:49
问题 I'm using a document to show a user control. Some people from here helped me: How can I put an user control inside a document viewer? But the user control appers in the corner, and I'd like to print it, but a little bit more central. 回答1: Repeating my updated answer from the other question.. You can place the UserControl in a Grid which binds its Width/Height to the FixedPage ActualWidth/ActualHeight to achieve centering <DocumentViewer> <FixedDocument> <PageContent> <FixedPage> <Grid Width="

How can I put an user control inside a document viewer?

左心房为你撑大大i 提交于 2019-12-10 11:35:46
问题 Is it possible put an user control inside a doument viewer? If possible, how will it be that? 回答1: You can use the following.. Edit Added a Grid which binds its Width/Height to the FixedPage ActualWidth/ActualHeight to achieve centering <DocumentViewer> <FixedDocument> <PageContent> <FixedPage HorizontalAlignment="Center"> <Grid Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type FixedPage}}, Path=ActualWidth}" Height="{Binding RelativeSource={RelativeSource AncestorType={x

DocumentViewer to RichTextBox Binding Error

你。 提交于 2019-12-10 11:25:08
问题 I have an application with RichTextBox and DocumentViewer (placed in a TabControl), and I want to make something like "hot preview". I've binded DocumentViewer.Document property to RichTextBox.Document Binding: <DocumentViewer Document="{Binding Document, Converter={StaticResource FlowDocumentToPaginatorConverter}, ElementName=mainRTB, Mode=OneWay}" /> And this is Converter code: public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {

WPF DocumentViewer : Navigate using internal link not accurate on first click

家住魔仙堡 提交于 2019-12-08 08:47:06
问题 In WPF I have a DocumentViewer inside a Frame control. The DocumentViewer shows an XPS document generated with MS Word. The document contains a Table of Content to help navigate through the document. The DocumentViewer allows the user to click these links and navigate to the corresponding pages, as long as the DocumentViewer is placed in a control that allows for navigation (e.g. a Frame). When the user navigates for the first time, the DocumentViewer does not jump accurately to the linked

WPF - example of creating XPS document that is NOT from Visual

无人久伴 提交于 2019-12-08 04:54:54
问题 I'm looking for a reporting/printing solution that does not involve RDLC/SSRS. I'd like to use the DocumentViewer, which I know supports XPS. I have found plenty of examples that use Visual to XPS but I haven't found many examples where I can take an existing WPF page, with various controls like labels, listboxes, grids, etc and create that into an XPS document. Is there a code example out there that takes an entire XAML page and creates XPS? 回答1: It's not trivial, the basic problem here is

WPF DocumentViewer loses custom style after internal link use

烈酒焚心 提交于 2019-12-08 04:52:50
问题 Hi want to build a small application, that allows to navigate through filesystem and displays several documents. One type of document i want to show, is xps. DocumentViewer is doing well. In combination with a Frame the viewer can handle internal links (included in the xps documents.). For my Application i build a custom toolbar (zoom, page, fitsize ...), to have a one toolbar for every kind of document. So i needed to remove the toolbar of the documentViewer. Below is the code. <Style x:Key=

Any Embeddable Document Viewer

落爺英雄遲暮 提交于 2019-12-07 13:29:00
问题 I am looking to include a document viewer in my CakePHP application for uploaded docs. I want a viewer that supports Microsoft Word (.DOC and .DOCX), Microsoft PowerPoint (.PPT and .PPTX) and Adobe Portable Document Format (.PDF). I want my users to be able to view the documents, but not download it. Google document viewer is great, but users can just plug the URL into the address bar and download the document. Is there anyway I can share my docs with users just as readable docs? 回答1: First