Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
733
Xamwebhtmlviewer shows html outside of child window
posted

I attached a screenshot to show what I mean.  Basically when I try to show any html page in the xamwebhtmlviewer, even though the control is inside a canvas on a child window, the actual html shows up outside the window.  When I move the mouse to the top of the child window, the html suddenly snaps back inside the child window.  Here is the xaml.  In the codebehind all I do is set the SourceURI property.

<controls:ChildWindow x:Class="Comdata.PdfViewer"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="824" Height="824"
           Title="PdfViewer"  xmlns:ig="http://infragistics.com/Controls">
    <Canvas Name="panMain">
        <Button x:Name="OKButton" Content="OK" Width="75" Height="23" HorizontalAlignment="Right" Canvas.Left="731" Canvas.Top="0" />
        <ig:XamWebHtmlViewer Canvas.Left="0" Canvas.Top="29" Name="htmlView" Width="806" Height="760" />
    </Canvas>
</controls:ChildWindow>

Parents
  • 760
    posted

    Hello,

    The XamHtmlViewer control listens for the LayoutUpdated event of the container control (ChildWindow in your case) in order to reposition itself. The ChildWindow control doesn't behave like the other layout controls - Grid and StackPanel, it doesn't fire LayoutUpdated to its children. When you move your mouse to the top of the ChildWindow , LayoutUpdated event is fired and the XamHtmlViewer is updated.

    Instead using the ChildWindow you can use our XamDialogWindow, which was designed to work with our XamHtmlViewer.

    Regards,

     Doychin Dochev

Reply Children