Note that there are some explanatory texts on larger screens.

plurals
  1. PO3d object not rendered
    primarykey
    data
    text
    <p>I have a WPF application that has a main window. In that I have a frame, the frame content is a page.</p> <p>Now in page is 4 viewport3D that contain Viewport2DVisual3D and in that I have image element.</p> <p><strong>Problem :</strong> on some PCs my application runs well but on some PCs my application doesn't render viewport3d or it doesn't render the frame. Dunno but it doesn't show anything in main window.</p> <p>The problem occurs on an Acer laptop <a href="http://www.acer.co.uk/ac/en/GB/content/model/LX.RAZ02.097" rel="nofollow noreferrer">Model</a>.</p> <p>Rendered : <img src="https://i.stack.imgur.com/s7KKm.jpg" alt="True Image"></p> <p>Not Rendered : <img src="https://i.stack.imgur.com/r9rOy.jpg" alt="enter image description here"></p> <p>EDIT: This issue occurred again when I placed the frame in a grid. (I show this page in a frame, that frame is the main content of my window: when I place the frame in a grid it didn't show objects) Seems This Occure on laptop with shared graphics</p> <p>EDIT 2: </p> <pre><code>&lt;Page x:Class="MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Page_Loaded_1" x:Name="myMainPage" FlowDirection="RightToLeft" &gt; &lt;Page.Resources&gt; &lt;Style TargetType="ContentControl" x:Key="MenuItemsStyle"&gt; &lt;Setter Property="Background" Value="Transparent"/&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate&gt; &lt;Viewport3D VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ClipToBounds="False"&gt; &lt;Viewport3D.Camera&gt; &lt;PerspectiveCamera x:Name="myCam" FieldOfView="90" Position="{Binding ElementName=myMainWindow, Path=CameraHeight}" NearPlaneDistance="1" FarPlaneDistance="10"/&gt; &lt;/Viewport3D.Camera&gt; &lt;ModelVisual3D&gt; &lt;ModelVisual3D.Content&gt; &lt;Model3DGroup&gt; &lt;DirectionalLight Color="#FFFFFFFF" Direction="0,0,-1"/&gt; &lt;/Model3DGroup&gt; &lt;/ModelVisual3D.Content&gt; &lt;/ModelVisual3D&gt; &lt;Viewport2DVisual3D x:Name="V2d3d"&gt; &lt;Viewport2DVisual3D.Transform&gt; &lt;Transform3DGroup&gt; &lt;RotateTransform3D &gt; &lt;RotateTransform3D.Rotation&gt; &lt;AxisAngleRotation3D Axis="0,1,0" Angle="0" x:Name="aar3D"/&gt; &lt;/RotateTransform3D.Rotation&gt; &lt;/RotateTransform3D&gt; &lt;/Transform3DGroup&gt; &lt;/Viewport2DVisual3D.Transform&gt; &lt;Viewport2DVisual3D.Material&gt; &lt;DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" Brush="White"/&gt; &lt;/Viewport2DVisual3D.Material&gt; &lt;Viewport2DVisual3D.Geometry&gt; &lt;MeshGeometry3D Positions="{Binding ElementName=myMainWindow, Path=MeshPosions}" TextureCoordinates="0,0 0,1 1,1 1,0" TriangleIndices="0 1 2 0 2 3"/&gt; &lt;/Viewport2DVisual3D.Geometry&gt; &lt;Border Name="mainBorder" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"&gt; &lt;Border.Style&gt; &lt;Style TargetType="Border"&gt; &lt;Setter Property="BorderThickness" Value="1.2"/&gt; &lt;Setter Property="Background" &gt; &lt;Setter.Value&gt; &lt;SolidColorBrush Color="Transparent"/&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Setter Property="BorderBrush" &gt; &lt;Setter.Value&gt; &lt;SolidColorBrush Color="Transparent"/&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/Border.Style&gt; &lt;ContentPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Content="{TemplateBinding ContentControl.Content}"&gt; &lt;ContentPresenter.Triggers&gt; &lt;EventTrigger RoutedEvent="ContentPresenter.MouseLeftButtonDown"&gt; // Axis Animation &lt;/EventTrigger&gt; &lt;/ContentPresenter.Triggers&gt; &lt;/ContentPresenter&gt; &lt;/Border&gt; &lt;/Viewport2DVisual3D&gt; &lt;/Viewport3D&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Style.Triggers&gt; &lt;EventTrigger RoutedEvent="ContentControl.MouseLeftButtonDown" &gt; //Axis Animation &lt;/EventTrigger&gt; &lt;EventTrigger RoutedEvent="ContentControl.MouseEnter"&gt; //ScaleAnimation &lt;/EventTrigger&gt; &lt;EventTrigger RoutedEvent="ContentControl.MouseLeave"&gt; //ScaleAnimation &lt;/EventTrigger&gt; &lt;/Style.Triggers&gt; &lt;/Style&gt; &lt;/Page.Resources&gt; &lt;Page.Triggers&gt; &lt;EventTrigger RoutedEvent="Loaded"&gt; //Load Object Scale And Fade In &lt;/EventTrigger&gt; &lt;/Page.Triggers&gt; &lt;Grid Name="MainGrid"&gt; &lt;Canvas Name="MainCanvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" FlowDirection="LeftToRight"&gt; &lt;ContentControl Opacity="0" Name="MenuItem1" Style="{StaticResource MenuItemsStyle}" MouseDown="MenuItem1_MouseDown" Panel.ZIndex="1" &gt; &lt;Image Source="/IsargaranProject;component/Images/isargari.jpg"/&gt; &lt;ContentControl.RenderTransform&gt; &lt;ScaleTransform ScaleX="0.7" ScaleY="0.7" x:Name="MenuItem1ST"/&gt; &lt;/ContentControl.RenderTransform&gt; &lt;/ContentControl&gt; &lt;/Canvas&gt; &lt;/Grid&gt; &lt;/Page&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload