Click here to Skip to main content
15,887,596 members
Home / Discussions / WPF
   

WPF

 
QuestionVS 2012 Start Page Problem Pin
Kevin Marois19-Mar-15 10:29
professionalKevin Marois19-Mar-15 10:29 
AnswerRe: VS 2012 Start Page Problem Pin
Afzaal Ahmad Zeeshan25-Mar-15 3:54
professionalAfzaal Ahmad Zeeshan25-Mar-15 3:54 
GeneralRe: VS 2012 Start Page Problem Pin
Kevin Marois25-Mar-15 4:00
professionalKevin Marois25-Mar-15 4:00 
QuestionHow to display a PDF file in WPF form Pin
Kandepu Rajesh19-Mar-15 6:19
Kandepu Rajesh19-Mar-15 6:19 
AnswerRe: How to display a PDF file in WPF form Pin
Gerry Schmitz20-Mar-15 13:28
mveGerry Schmitz20-Mar-15 13:28 
GeneralRe: How to display a PDF file in WPF form Pin
Kandepu Rajesh25-Mar-15 11:53
Kandepu Rajesh25-Mar-15 11:53 
GeneralRe: How to display a PDF file in WPF form Pin
Gerry Schmitz25-Mar-15 12:05
mveGerry Schmitz25-Mar-15 12:05 
QuestionHow would you create a virtual TextEditor? Pin
HerrGilbert10-Mar-15 8:04
professionalHerrGilbert10-Mar-15 8:04 
Hi folks,

for some weeks now, I'm getting my head around an interesting problem: I'd like to display a text file of several gigs, and let it be editable.

Now - how would you do that? All standard approaches fail, because they rely on the file being fully loaded into RAM, which is impossible with several gigabytes of data. So, I thought I'll create a CustomControl. Basically, I've derived a Control from the Control class, which embeds a FrameworkElement in it's Generic.xaml. This FrameworkElement has a VisualCollection. Now, I hand over a Stream to this control. The Stream must be seekable and writable, otherwise you will encounter an exception. So far, I do the following: I read a chunk of data from the Stream, draw that using FormattedText on a DrawingContext, retrieved by a DrawingVisual. For scrolling, I simply adjust the offset of the FormattedText-function. To achieve seamless scrolling (which is needed, so you can scroll from one buffer chunk to the next without a visible gap), I have a function which calculates the amount of text that fits precisely into a rectangle (e.g. the Window's viewport), so that the rest of the current buffer, together with the next buffer, can be printed on the next rectangle.

But, for the sake of it, I can't find out how I would do standard editing functionality. Because, for the scrollbar and this "chunking" to work, one needs to precompute the needed amount of text to fill the rectangle, which changes when editing the text.

tl;dr:
Do you have a smart concept on hand, together with WPF and C#, to create a TextEditor, which is capable of editing gigabytes of text?
AnswerRe: How would you create a virtual TextEditor? Pin
Mycroft Holmes10-Mar-15 13:10
professionalMycroft Holmes10-Mar-15 13:10 
GeneralRe: How would you create a virtual TextEditor? Pin
HerrGilbert10-Mar-15 13:47
professionalHerrGilbert10-Mar-15 13:47 
GeneralRe: How would you create a virtual TextEditor? Pin
Mycroft Holmes10-Mar-15 14:14
professionalMycroft Holmes10-Mar-15 14:14 
GeneralRe: How would you create a virtual TextEditor? Pin
HerrGilbert10-Mar-15 20:07
professionalHerrGilbert10-Mar-15 20:07 
SuggestionRe: How would you create a virtual TextEditor? Pin
Richard Deeming11-Mar-15 3:09
mveRichard Deeming11-Mar-15 3:09 
GeneralRe: How would you create a virtual TextEditor? Pin
HerrGilbert11-Mar-15 7:07
professionalHerrGilbert11-Mar-15 7:07 
AnswerRe: How would you create a virtual TextEditor? Pin
Philippe Mori19-Mar-15 7:06
Philippe Mori19-Mar-15 7:06 
GeneralRe: How would you create a virtual TextEditor? Pin
HerrGilbert25-Mar-15 0:19
professionalHerrGilbert25-Mar-15 0:19 
QuestionWPF Drawing an Image on a Rotated Canvas Pin
bontempi29-Mar-15 12:43
bontempi29-Mar-15 12:43 
QuestionRegarding WPF Pin
Member 1146122218-Feb-15 3:36
Member 1146122218-Feb-15 3:36 
AnswerRe: Regarding WPF Pin
Pete O'Hanlon18-Feb-15 4:44
mvePete O'Hanlon18-Feb-15 4:44 
AnswerRe: Regarding WPF Pin
Abhinav S21-Feb-15 18:03
Abhinav S21-Feb-15 18:03 
AnswerRe: Regarding WPF Pin
Subramanyam Shankar17-Mar-15 1:01
professionalSubramanyam Shankar17-Mar-15 1:01 
AnswerRe: Regarding WPF Pin
Elegantly Wasted24-Mar-15 23:06
Elegantly Wasted24-Mar-15 23:06 
QuestionChanging a Label Content of Page 2 from Page in WPF Pin
Vimalsoft(Pty) Ltd17-Feb-15 2:04
professionalVimalsoft(Pty) Ltd17-Feb-15 2:04 
QuestionHow to call from Nested UserControl another UserControl Pin
LAPEC16-Feb-15 10:44
LAPEC16-Feb-15 10:44 
Answer[REPOST]: How to call from Nested UserControl another UserControl Pin
Richard Deeming16-Feb-15 11:12
mveRichard Deeming16-Feb-15 11:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.