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

PDF file

6 Answers 111 Views
Window
This is a migrated thread and some comments may be shown as answers.
al
Top achievements
Rank 1
al asked on 08 Jul 2009, 10:17 AM
Hi! i created a silverlight project displaying a radwindow when you click the button. the rad window will contain pdf file. but when you drag the window far left or any where far from its original location, the pdf file will be left where it was.

 private void Button_Click(object sender, RoutedEventArgs e)
        {
            RadWindow message = new RadWindow();
            Control CertificateWindow;

            CertificateWindow = new SilverlightControl1();

            message.Content = CertificateWindow;
            message.Header = "Certificate";
            message.WindowAnimation = WindowAnimation.OnShow;
            message.WindowState = WindowState.Normal;
            message.ResizeMode = ResizeMode.NoResize;
            message.WindowStartupLocation = WindowStartupLocation.CenterParent;
            message.PinMode = PinMode.NoPin;
            message.Show();
        }



<Grid x:Name="LayoutRoot" Background="White">
     <telerik:RadHtmlPlaceholder SourceUrl="AppArchGuide2.0.pdf"/>
 </Grid>



is there something i need to set first in the window properties....

6 Answers, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 08 Jul 2009, 10:58 AM
Hello Al,

There is nothing wrong with your implementation of RadWindow, the problems comes from the HtmlPlaceHolder you use to show the PDF document. We still have one limitation that we are trying to overcome, if you are integrating the HtmlPlaceHolder with RadWindow, you should Update the layout of the HtmlPlaceHolder every time the location of the RadWindow changes. If you open our online example at http://demos.telerik.com/silverlight/#HtmlPlaceholder/WindowIntegration you can notice that the RadWindow calls RadHtmlPlaceholder1.InvalidateArrange(); everytime it changes it's location: the complete callback method looks like this:

        void RadWindow1_LocationChanged(object sender, System.Windows.RoutedEventArgs e)
        {
            RadHtmlPlaceholder1.InvalidateArrange();
        }
Please get back to us if you have any further problems.

Kind regards,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
al
Top achievements
Rank 1
answered on 08 Jul 2009, 11:12 AM
i cant find the event LocationChanged? is this one available in your latest verssion? i'm using verssion 2009.1.312.1020.
0
Hristo Borisov
Telerik team
answered on 08 Jul 2009, 11:38 AM
Hi al,

Yes, it is part of our latest release. We always do encourage our clients to download and install the latest version of our products. If you have any problems using our latest version please get to back as soon as possible.

Best wishes,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
al
Top achievements
Rank 1
answered on 09 Jul 2009, 08:41 AM

Hi Hristo! One more thing! Can you show me how to assign the SourceUrl of the RadHtmlPlaceHolder programatically...
I have a code:

CertificateFile.SourceUrl = "file.pdf"

It wont work. I tried also this one:

 

Uri

 

xUri = new Uri("file.pdf");
CertificateFile.SourceUrl = xUri;

but still it dint work...

can you show me how?!

thanks...

 

0
Ivan
Telerik team
answered on 10 Jul 2009, 11:34 AM
Hello al,

Please preview the attached example. There are examples both with a relative path and an absolute path to a Pdf-file.

All the best,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
al
Top achievements
Rank 1
answered on 13 Jul 2009, 02:19 AM
HI Ivan! thanks.. that solves my problem...
Tags
Window
Asked by
al
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
al
Top achievements
Rank 1
Ivan
Telerik team
Share this question
or