This is a migrated thread and some comments may be shown as answers.

Open pdf (or doc or ?) in Silverlight Application

3 Answers 186 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve Y
Top achievements
Rank 2
Steve Y asked on 02 Nov 2009, 01:51 PM
Hi,

I am investigating how feasable it is to convert a telerik asp.net/ajax application into a silverlight one. I really like the sl gridview and the in-place editing that this control offers. Plus, the tile control seems to be well suited to displaying related data in multiple grids with a grid per tile as the ux. The new sl native navigation looks fine (telerik, when will you offer a menu bar that interfaces into the ms navigation?).

One part of my app allows upload of files (pdf, word and image primarily) from a local pc and then download and display of those files from the server. It's been put together using the treeview control. I have a context menu which allows upload and then clicking on a leaf node in the treeview control will open a radwindow and display (for example) the pdf file which opens in adobe reader automatically if the user chooses open from the dialog or saves it to the pc if the user chooses save.

 I've worked out how to do most things in sl but my inexperience is showing when it comes to being able to display those files. I've seen that there is a save dialog in sl so I can get the file down to the pc again. But, I can't find how to open the file in a 'radwidow like' control.

I have two questions.

1. Is it possible to open the file in a native sl window?

2. If not, How can I open it in an asp.net window so I can use the normal asp.net functionality

3. (ok, I have a third). Is there a better way of doing it that I haven't thought about?

Thanks,
Steve

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 06 Nov 2009, 04:31 PM
Hi Steve,

We are sorry for the late response - we just released the Q3.

Actually you can try to open your Pdf files in the RadHtmlPlaceholder. Even more you can embed this html place holder inside the RadWindow. But please be aware the RadHtmlPlaceholder does not work in the OOB. You can find a Sample demo of the html-place-holder following these links:

We think that the document uploading is achievable task too. Please preview our RadUpload for Silverlight. About the uploading from a context menu - we are not ready with such upload mechanism but we will do our best to solve the case.

About the toolbar and the navigation - please tell us what is your deadline.

About all other things like downloading files and save them to local drive etc. We can continue with them in other more specific threads. This way we will focus better on the case.

One last point: to be able to attach files to your posts you should open a Support Ticket.

Looking forward to hear back from you.

Regards,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
tim David
Top achievements
Rank 1
answered on 12 Nov 2009, 09:07 AM
I need to put the PDF on SL,Using the Telerik HtmlPlaceHolder is OK,but if there are some controls can dock,The HtmlPlaceHolder cover the Docking controls.The following is my code.

<telerikDocking:RadDocking >
            <telerikDocking:RadDocking.DocumentHost>

                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadDocumentPane Header="documentHostHead" Title="Document">
       <telerikDocking:RadDocumentPane.Content>
        <telerik:RadHtmlPlaceholder HorizontalAlignment="Left"
                                SourceUrl="http://google.com"
                                x:Name="RadHtmlPlaceholder1" Visibility="Collapsed" />

       </telerikDocking:RadDocumentPane.Content>
      </telerikDocking:RadDocumentPane>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>

            </telerikDocking:RadDocking.DocumentHost> 
            
            <telerikDocking:RadSplitContainer InitialPosition="DockedBottom">
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane Header="ToolBar" IsPinned="True" Foreground="White" Background="#FF005EDA">
      <telerikDocking:RadPane.Content>
       <Grid>
        <Grid.RowDefinitions>
         <RowDefinition Height="30"/>
         <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Background="#FF005EDA" Orientation="Horizontal">
         <Button Width="100" Height="25" Content="Expand All" />
         <Button Width="100" Height="25" Content="Close All" />
         <Button Width="100" Height="25" Content="Next Comment" >
         <Button Width="100" Height="25" Content="Up Comment" >
         <Button Width="100" Height="25" Content="Show Comment" >
        </StackPanel>
       </Grid>
      </telerikDocking:RadPane.Content>
     </telerikDocking:RadPane>
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>
           
        </telerikDocking:RadDocking>

If I use the PDF uri instand of google page,I got the same problem,Can you deal with it sir!.I hope you  done it
finally things.Can you read my words?

0
Tihomir Petkov
Telerik team
answered on 18 Nov 2009, 07:37 PM
Hello Tim,

The RadHtmlPlaceholder control uses an IFRAME element that is positioned above the Silverlight plugin to render its content. This means that if it overlaps with another visual element in the Silverlight application, the HtmlPlaceholder will always be on top. There is now workaround for that at the moment. It will be possible to avoid this issue in Silverlight 4 (the beta is available today), but until then there is not much we can do to improve this scenario.

Will rendering a PDF in a RadWindow containing an HtmlPlaceholder work for you?

Greetings,
Tihomir Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Steve Y
Top achievements
Rank 2
Answers by
Ivan
Telerik team
tim David
Top achievements
Rank 1
Tihomir Petkov
Telerik team
Share this question
or