PDF file

7 posts, 0 answers
  1. al
    al avatar
    29 posts
    Member since:
    Dec 2008

    Posted 08 Jul 2009 Link to this post

    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....

  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 08 Jul 2009 Link to this post

    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.
  3. DevCraft banner
  4. al
    al avatar
    29 posts
    Member since:
    Dec 2008

    Posted 08 Jul 2009 Link to this post

    i cant find the event LocationChanged? is this one available in your latest verssion? i'm using verssion 2009.1.312.1020.
  5. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 08 Jul 2009 Link to this post

    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.
  6. al
    al avatar
    29 posts
    Member since:
    Dec 2008

    Posted 09 Jul 2009 Link to this post

    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...

     

  7. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 10 Jul 2009 Link to this post

    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.
  8. al
    al avatar
    29 posts
    Member since:
    Dec 2008

    Posted 12 Jul 2009 Link to this post

    HI Ivan! thanks.. that solves my problem...
Back to Top
DevCraft banner