home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
General
MP2 Skin rendering engine
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Baboonanza" data-source="post: 688883" data-attributes="member: 101901"><p>Hello!</p><p></p><p>Out of curiosity, how are you positioning the control off the screen?</p><p></p><p>My method would be to apply a RenderTransform to the control to 'push' it off-screen, then apply a storyboard to this to make it slide on. Here is Home.xml modified so that the Date/Time labels slide on:</p><p></p><p>[CODE]<?xml version="1.0" encoding="utf-8"?></p><p><Include</p><p> xmlns="www.team-mediaportal.com/2008/mpf/directx"</p><p> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"</p><p> Source="screens\master_menu.xaml"</p><p> ></p><p> <Include.Resources></p><p></p><p> <!-- Header --></p><p> <ResourceWrapper x:Key="Header_Text" Resource="[Home.Title]"/></p><p></p><p> <Storyboard x:Key="SlidingTextStoryBoard" FillBehavior="HoldEnd"></p><p> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" FillBehavior="HoldEnd" Storyboard.TargetName="SlideControl" Storyboard.TargetProperty="RenderTransform.Children[0].Y"></p><p> <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/></p><p> </DoubleAnimationUsingKeyFrames></p><p> </Storyboard></p><p></p><p> <!-- Contents --></p><p> <ResourceWrapper x:Key="Contents_Element"></p><p> <DockPanel LastChildFill="False"></p><p> <DockPanel.Resources></p><p> <Model x:Key="TimeModel" Id="E821B1C8-0666-4339-8027-AA45A4F6F107"/></p><p> </DockPanel.Resources></p><p> <StackPanel x:Name="SlideControl" Orientation="Vertical" DockPanel.Dock="Bottom"</p><p> HorizontalAlignment="Center" VerticalAlignment="Center"></p><p> <StackPanel.RenderTransform></p><p> <TransformGroup></p><p> <TranslateTransform Y="150"/></p><p> </TransformGroup></p><p> </StackPanel.RenderTransform></p><p> <Label x:Name="Date" FontSize="{ThemeResource DateTimeFontSize}"</p><p> HorizontalAlignment="Center"</p><p> Content="{Binding Source={StaticResource TimeModel}, Path=CurrentDate}" /></p><p> <Label x:Name="Time" FontSize="{ThemeResource DateTimeFontSize}"</p><p> HorizontalAlignment="Center"</p><p> Content="{Binding Source={StaticResource TimeModel}, Path=CurrentTime}" /></p><p> <StackPanel.Triggers></p><p> <Trigger Property="IsVisible" Value="True"></p><p> <Trigger.EnterActions></p><p> <BeginStoryboard x:Name="Visible_BeginStoryboard" Storyboard="{ThemeResource SlidingTextStoryBoard}"</p><p> HandoffBehavior="TemporaryReplace"/></p><p> </Trigger.EnterActions></p><p> </Trigger></p><p> </StackPanel.Triggers></p><p> </StackPanel></p><p> </DockPanel></p><p> </ResourceWrapper></p><p></p><p> </Include.Resources></p><p></Include>[/CODE]</p></blockquote><p></p>
[QUOTE="Baboonanza, post: 688883, member: 101901"] Hello! Out of curiosity, how are you positioning the control off the screen? My method would be to apply a RenderTransform to the control to 'push' it off-screen, then apply a storyboard to this to make it slide on. Here is Home.xml modified so that the Date/Time labels slide on: [CODE]<?xml version="1.0" encoding="utf-8"?> <Include xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Source="screens\master_menu.xaml" > <Include.Resources> <!-- Header --> <ResourceWrapper x:Key="Header_Text" Resource="[Home.Title]"/> <Storyboard x:Key="SlidingTextStoryBoard" FillBehavior="HoldEnd"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" FillBehavior="HoldEnd" Storyboard.TargetName="SlideControl" Storyboard.TargetProperty="RenderTransform.Children[0].Y"> <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/> </DoubleAnimationUsingKeyFrames> </Storyboard> <!-- Contents --> <ResourceWrapper x:Key="Contents_Element"> <DockPanel LastChildFill="False"> <DockPanel.Resources> <Model x:Key="TimeModel" Id="E821B1C8-0666-4339-8027-AA45A4F6F107"/> </DockPanel.Resources> <StackPanel x:Name="SlideControl" Orientation="Vertical" DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel.RenderTransform> <TransformGroup> <TranslateTransform Y="150"/> </TransformGroup> </StackPanel.RenderTransform> <Label x:Name="Date" FontSize="{ThemeResource DateTimeFontSize}" HorizontalAlignment="Center" Content="{Binding Source={StaticResource TimeModel}, Path=CurrentDate}" /> <Label x:Name="Time" FontSize="{ThemeResource DateTimeFontSize}" HorizontalAlignment="Center" Content="{Binding Source={StaticResource TimeModel}, Path=CurrentTime}" /> <StackPanel.Triggers> <Trigger Property="IsVisible" Value="True"> <Trigger.EnterActions> <BeginStoryboard x:Name="Visible_BeginStoryboard" Storyboard="{ThemeResource SlidingTextStoryBoard}" HandoffBehavior="TemporaryReplace"/> </Trigger.EnterActions> </Trigger> </StackPanel.Triggers> </StackPanel> </DockPanel> </ResourceWrapper> </Include.Resources> </Include>[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
General
MP2 Skin rendering engine
Contact us
RSS
Top
Bottom