Deepak Vasudevan
Top achievements
Rank 2
Deepak Vasudevan
asked on 04 Feb 2011, 07:08 PM
Dear Telerik Team,
I am trying to get the entire view of RadDocumentPane (Telerik.Windows.Control.RadDocumentPane) as a screenshot with the syntax like below:
WriteableBitmap bitmap = new WriteableBitmap(diagram, null);
where diagram is pane.content (pane being an instance of RadDocumentPane). The catch is that only whatever is visible gets saved. I would like the entire contents of RadDocumentPane should be captured into the WriteableBitmap.
Can you highlight and help please?
I am trying to get the entire view of RadDocumentPane (Telerik.Windows.Control.RadDocumentPane) as a screenshot with the syntax like below:
WriteableBitmap bitmap = new WriteableBitmap(diagram, null);
where diagram is pane.content (pane being an instance of RadDocumentPane). The catch is that only whatever is visible gets saved. I would like the entire contents of RadDocumentPane should be captured into the WriteableBitmap.
Can you highlight and help please?
7 Answers, 1 is accepted
0
Accepted
Hi Deepak,
George
the Telerik team
We will greatly appreciate a sample project of yours. It will definitely help us in further pinpointing and resolving the problem. Can you attach the sample project to this thread?
George
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Deepak Vasudevan
Top achievements
Rank 2
answered on 08 Mar 2011, 05:03 PM
Dear George,
I am unable to attach the sample project. The size is 5 mega bytes but your allowed attachment is 2 mega bytes. I am not also able to create a support ticket as it says:
Can you please help?
Deepak Vasudevan
I am unable to attach the sample project. The size is 5 mega bytes but your allowed attachment is 2 mega bytes. I am not also able to create a support ticket as it says:
We are sorry, but your support package is not active.
This is due to one of the following reasons:
- You are not the assigned licensed user for your purchase. To check the licensed user please go to Licensed Users List.
- Your 60 day trial support period has expired. If you would like to request a trial and support extension, please use the online Feedback form.
- The 1 year Support package associated with your developer license has expired. Please, visitRenewals and Upgrades for upgrade/renewal options.
You can still use the available online support resources to help you with your development.
Can you please help?
Deepak Vasudevan
0
Hi Deepak,
George
the Telerik team
Could you please send us a screenshots of what you want to achieve? It will shed some light on the problem.
George
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Deepak Vasudevan
Top achievements
Rank 2
answered on 12 Mar 2011, 12:01 AM
Dear George,
Please find the screenshot 1.png attached. You can find a textbox that sits within a RadDocumentPane. The textbox contains some text like
This is a long textbox that contains some sentences. Telerik RadDocumentPane is expected to catch the entire as JPeg.
For illustration I have given a text. In the actual scenario it contains various other elements and diagrams. The objective is that RadDocumentPane should give the entire RadDocumentPane as a WriteableBitMap whereas it just gives whatever is visible.
I have also sent the sample project with the subject "Unable to post support ticket" on 3/8 to sales@telerik.com and clientservice@telerik.com.
Pl. help...
Please find the screenshot 1.png attached. You can find a textbox that sits within a RadDocumentPane. The textbox contains some text like
This is a long textbox that contains some sentences. Telerik RadDocumentPane is expected to catch the entire as JPeg.
For illustration I have given a text. In the actual scenario it contains various other elements and diagrams. The objective is that RadDocumentPane should give the entire RadDocumentPane as a WriteableBitMap whereas it just gives whatever is visible.
I have also sent the sample project with the subject "Unable to post support ticket" on 3/8 to sales@telerik.com and clientservice@telerik.com.
Pl. help...
0
Hello Deepak,
George
the Telerik team
Thank you for sending us the project. I would suggest you to pass the content of the ScrollViewer as parameter. Please, refer to the following code snippet:
if
(DiagramPaneGroup.SelectedItem !=
null
)
{
RadDocumentPane pane = (RadDocumentPane)DiagramPaneGroup.SelectedItem;
if
(pane.Content
is
sample1)
{
sample1 content = (sample1)pane.Content;
var scrollViewer = content.ChildrenOfType<ScrollViewer>().FirstOrDefault();
if
(scrollViewer !=
null
)
{
var diagram = scrollViewer.Content
as
UIElement;
WriteableBitmap bitmap =
new
WriteableBitmap(diagram,
null
);
if
(bitmap !=
null
)
{
SaveFileDialog saveDlg =
new
SaveFileDialog
{
Filter = @
"JPEG Files (*.jpeg)|*.jpeg"
,
DefaultExt = @
".jpeg"
};
....
George
the Telerik team
0
Deepak Vasudevan
Top achievements
Rank 2
answered on 17 Mar 2011, 10:18 PM
Dear Telerik Team,
There was no effect. It still displayed only the area which was in the view (and not took the scroll). Things got worse. Now I am getting a reversing of the stylesheets.
Do you have a sample application that uses your snippet and demonstrates this workaround please?
Deepak Vasudevan
There was no effect. It still displayed only the area which was in the view (and not took the scroll). Things got worse. Now I am getting a reversing of the stylesheets.
Do you have a sample application that uses your snippet and demonstrates this workaround please?
Deepak Vasudevan
0
Hello Deepak,
George
the Telerik team
Attached you can find the modified example. I hope this helps.
George
the Telerik team