- July 25, 2010
- 4,024
- 1,420
- Home Country
- Germany
Hey,
I was playing a bit with the skinengine and tried just for fun to build something like a coverflow
But if I have this xaml code (in the HelloWorldPlugin, nothing changes on the code behind):
I'm getting tons of this error and the GUI freezes:
But if you delete the second Rectangle blog:
it will work. I also tried to copy the first rectangle, but had the same error...
Steps to reproduce:
use my HelloWorldPlugin (attached), start MP2 and klick on "HelloWorld". You will see that the gui freezes and you get tons of the error above =)
Attachment:
1. last two logfiles
2. my Plugin
If something is missing, let me know =)
I was playing a bit with the skinengine and tried just for fun to build something like a coverflow
But if I have this xaml code (in the HelloWorldPlugin, nothing changes on the code behind):
Code:
<DockPanel
xmlns="www.team-mediaportal.com/2008/mpf/directx"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Context="{Model Id=5726DA5A-70D5-458f-AF67-611293D97912}" LastChildFill="False">
<Label Content="This is the sample screen of the HelloWorld plugin" FontSize="40" DockPanel.Dock="Top" HorizontalAlignment="Center"/>
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="Press me" Style="{ThemeResource ButtonWideStyle}" Margin="10"
HorizontalAlignment="Right" VerticalAlignment="Center"
Command="{Command ChangeHelloWorldString}"/>
<Label Content="{Binding HelloString}" Margin="10"
HorizontalAlignment="Left" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel x:Name="coverFlow" DockPanel.Dock="Center" Orientation="Horizontal" Grid.Column="1" Grid.Row="0">
<StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="0">
<Rectangle Width="150" Height="150" Stroke="Black" Margin="0,0,0,0">
<Rectangle.Fill>
<VisualBrush>
<VisualBrush.Visual>
<Image x:Name="BackdropImageBackground" Stretch="Uniform" Source="cover.jpg"/>
</VisualBrush.Visual>
</VisualBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Width="150" Height="150" Stroke="Black" Margin="0,-25,0,0">
<Rectangle.Fill>
<VisualBrush>
<VisualBrush.Visual>
<Image x:Name="BackdropImageBackground" Stretch="Uniform" Source="cover.jpg"/>
</VisualBrush.Visual>
</VisualBrush>
</Rectangle.Fill>
<Rectangle.LayoutTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="-0.75"/>
</TransformGroup>
</Rectangle.LayoutTransform>
<Rectangle.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0.0" EndPoint="0.5,1.0">
<GradientStop Offset="0.0" Color="#00000000" />
<GradientStop Offset="1.0" Color="#A0000000" />
</LinearGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
<StackPanel.LayoutTransform>
<TransformGroup>
<SkewTransform CenterX="25" CenterY="25" AngleX="0" AngleY="45" />
</TransformGroup>
</StackPanel.LayoutTransform>
</StackPanel>
<!-- Front Cover -->
<StackPanel x:Name="FrontCover" Orientation="Vertical" Grid.Column="1" Grid.Row="0">
<Rectangle x:Name="FrontCoverRectangle" Width="150" Height="150" Stroke="Black" Margin="0,0,0,0">
<Rectangle.Fill>
<VisualBrush>
<VisualBrush.Visual>
<Image x:Name="FrontCoverImg" Stretch="Uniform" Source="cover.jpg"/>
</VisualBrush.Visual>
</VisualBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle x:Name="FrontCoverRectangle2" Width="150" Height="150" Stroke="Black" Margin="0,-25,0,0">
<Rectangle.Fill>
<VisualBrush>
<VisualBrush.Visual>
<Image x:Name="FrontCoverImg2" Stretch="Uniform" Source="cover.jpg"/>
</VisualBrush.Visual>
</VisualBrush>
</Rectangle.Fill>
<Rectangle.LayoutTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="-0.75"/>
</TransformGroup>
</Rectangle.LayoutTransform>
<Rectangle.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0.0" EndPoint="0.5,1.0">
<GradientStop Offset="0.0" Color="#00000000" />
<GradientStop Offset="1.0" Color="#A0000000" />
</LinearGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
</StackPanel>
</StackPanel>
</DockPanel>
I'm getting tons of this error and the GUI freezes:
[2011-01-21 16:12:06,516] [12885 ] [InputMgr ] [INFO ] - WorkflowManager: Screen 'home' successfully shown
[2011-01-21 16:12:06,516] [12885 ] [AMQ 'ScreenManager'] [DEBUG] - ScreenManager: Showing screen 'home'...
[2011-01-21 16:12:06,629] [12999 ] [DX Render] [DEBUG] - DirectX MainForm: Render thread stopped
[2011-01-21 16:12:06,689] [13059 ] [Main ] [DEBUG] - DirectX MainForm: Stoping render thread
[2011-01-21 16:12:06,689] [13059 ] [Main ] [DEBUG] - DirectX MainForm: Starting render thread
[2011-01-21 16:12:06,702] [13071 ] [DX Render] [WARN ] - GraphicsDevice: Lost DirectX device
SlimDX.Direct3D9.Direct3D9Exception: D3DERR_INVALIDCALL: Invalid call (-2005530516)
bei SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
bei SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
bei SlimDX.Result.Record[T](Int32 hr, Object dataKey, Object dataValue)
bei SlimDX.Direct3D9.Device.BeginScene()
bei MediaPortal.UI.SkinEngine.DirectX.GraphicsDevice.Render(Boolean doWaitForNextFame)
[2011-01-21 16:12:06,829] [13199 ] [DX Render] [DEBUG] - DirectX MainForm: Render thread stopped
[2011-01-21 16:12:06,907] [13276 ] [Main ] [DEBUG] - DirectX MainForm: Stoping render thread
[2011-01-21 16:12:06,907] [13276 ] [Main ] [DEBUG] - DirectX MainForm: Starting render thread
[2011-01-21 16:12:06,919] [13289 ] [DX Render] [WARN ] - GraphicsDevice: Lost DirectX device
SlimDX.Direct3D9.Direct3D9Exception: D3DERR_INVALIDCALL: Invalid call (-2005530516)
bei SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
bei SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
bei SlimDX.Result.Record[T](Int32 hr, Object dataKey, Object dataValue)
bei SlimDX.Direct3D9.Device.BeginScene()
bei MediaPortal.UI.SkinEngine.DirectX.GraphicsDevice.Render(Boolean doWaitForNextFame)
[2011-01-21 16:12:06,941] [13310 ] [DX Render] [DEBUG] - DirectX MainForm: Render thread stopped
[2011-01-21 16:12:07,019] [13389 ] [Main ] [DEBUG] - DirectX MainForm: Stoping render thread
[2011-01-21 16:12:07,019] [13389 ] [Main ] [DEBUG] - DirectX MainForm: Starting render thread
[2011-01-21 16:12:07,054] [13424 ] [DX Render] [WARN ] - GraphicsDevice: Lost DirectX device
etc....
But if you delete the second Rectangle blog:
Code:
<Rectangle x:Name="FrontCoverRectangle2"...... etc...
Steps to reproduce:
use my HelloWorldPlugin (attached), start MP2 and klick on "HelloWorld". You will see that the gui freezes and you get tons of the error above =)
Attachment:
1. last two logfiles
2. my Plugin
If something is missing, let me know =)