To rotate the layout based on the suggested orientation
+
DEBUG actionGeneration ActionStartOrEndAnnotation
--- a/src/FingersDance.ActionFactory/ActionGenerator.cs Fri Oct 09 11:33:35 2009 +0200
+++ b/src/FingersDance.ActionFactory/ActionGenerator.cs Sun Oct 11 20:34:56 2009 +0200
@@ -17,7 +17,7 @@
actionDict.Add("ActionOpenMedia", typeof(FingersDance.Actions.ActionOpenMedia));
actionDict.Add("ActionStopMedia", typeof(FingersDance.Actions.ActionStopMedia));
- actionDict.Add("ActionStartOrEndAnnotation", typeof(FingersDance.Actions.ActionStartOrEndAnnotation));
+ //actionDict.Add("ActionStartOrEndAnnotation", typeof(FingersDance.Actions.ActionStartOrEndAnnotation));
actionDict.Add("ActionAddAnnotation", typeof(FingersDance.Actions.ActionAddAnnotation));
}
--- a/src/FingersDance.Actions/FingersDance.Actions.csproj Fri Oct 09 11:33:35 2009 +0200
+++ b/src/FingersDance.Actions/FingersDance.Actions.csproj Sun Oct 11 20:34:56 2009 +0200
@@ -82,7 +82,6 @@
<Compile Include="ActionOpenMedia.cs" />
<Compile Include="ActionPlayMedia.cs" />
<Compile Include="ActionShowMessage.cs" />
- <Compile Include="ActionStartOrEndAnnotation.cs" />
<Compile Include="ActionStopMedia.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
--- a/src/FingersDance/FingersDance.csproj Fri Oct 09 11:33:35 2009 +0200
+++ b/src/FingersDance/FingersDance.csproj Sun Oct 11 20:34:56 2009 +0200
@@ -183,6 +183,10 @@
<Project>{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}</Project>
<Name>FingersDance.Control.UserPanel</Name>
</ProjectReference>
+ <ProjectReference Include="..\FingersDance.ViewModel\FingersDance.ViewModels.csproj">
+ <Project>{E81BB080-0598-43AC-90CE-54D6570C4E9E}</Project>
+ <Name>FingersDance.ViewModels</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
--- a/src/FingersDance/MainSurfaceWindow.xaml Fri Oct 09 11:33:35 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml Sun Oct 11 20:34:56 2009 +0200
@@ -126,7 +126,7 @@
</Style>
</s:SurfaceWindow.Resources>
- <Grid x:Name="MainGrid" Width="1024" Height="768" >
+ <Grid x:Name="MainGrid" Width="1024" Height="768" Loaded="MainGrid_Loaded" >
<Grid.Background>
<LinearGradientBrush EndPoint="0.505,0.985" StartPoint="0.505,-0.015">
<GradientStop Color="#FF000000" Offset="0"/>
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs Fri Oct 09 11:33:35 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Sun Oct 11 20:34:56 2009 +0200
@@ -85,6 +85,26 @@
/// <summary>
+ /// CopyTo rotate the layout based on the suggested orientation
+ /// </summary>
+ /// <param name="e"></param>
+ private void MainGrid_Loaded(object sender, RoutedEventArgs e)
+ {
+ if (ApplicationLauncher.InitialOrientation == UserOrientation.Top)
+ {
+ // Rotate the main canvas by 180 degrees.
+ this.MainGrid.LayoutTransform = new RotateTransform(180.0);
+ }
+ else
+ {
+ // Remove the rotate transform on the main canvas.
+ this.MainGrid.LayoutTransform = null;
+ }
+ // Dismiss the loading screen.
+ ApplicationLauncher.SignalApplicationLoadComplete();
+ }
+
+ /// <summary>
/// Occurs when the window is about to close.
/// </summary>
/// <param name="e"></param>