Ajout des projets: Menu , UserPanel et TimeLine
+ debut de travail sur le Projet Control Menu
+ .hgignore
--- a/.hgignore Thu Jul 16 22:52:01 2009 +0200
+++ b/.hgignore Wed Jul 29 00:55:57 2009 +0200
@@ -12,3 +12,9 @@
glob:src/FingersDance.Control.Player/bin/*
glob:src/FingersDance/FingersDance.suo
glob:src/FingersDance/FingersDance.sln.cache
+glob:src/FingersDance.Control.Menu/bin/*
+glob:src/FingersDance.Control.Menu/obj/*
+glob:src/FingersDance.Control.UserPanel/obj/*
+glob:src/FingersDance.Control.UserPanel/bin/*
+glob:src/FingersDance.Control.TimeLine/bin/*
+glob:src/FingersDance.Control.TimeLine/obj/*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/App.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,13 @@
+<Application x:Class="FingersDance.Control.Menu.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ StartupUri="SurfaceMenuTest.xaml"
+ >
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/Microsoft.Surface.Presentation.Generic;v1.0.0.0;31bf3856ad364e35;component/themes\generic.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/App.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace FingersDance.Control.Menu
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : Application
+ {
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/FingersDance.Control.Menu.csproj Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,126 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}</ProjectGuid>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <RootNamespace>FingersDance.Control.Menu</RootNamespace>
+ <AssemblyName>FingersDance.Control.Menu</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <WarningLevel>4</WarningLevel>
+ <OutputType>winexe</OutputType>
+ <Install>true</Install>
+ <InstallFrom>Web</InstallFrom>
+ <UpdateEnabled>true</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>false</MapFileExtensions>
+ <ApplicationVersion>1.0.0.*</ApplicationVersion>
+ <IsWebBootstrapper>true</IsWebBootstrapper>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <PublishUrl>Publish\</PublishUrl>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <Optimize>true</Optimize>
+ <OutputPath>.\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="Microsoft.Surface" />
+ <Reference Include="Microsoft.Surface.Presentation" />
+ <Reference Include="Microsoft.Surface.Presentation.Generic" />
+ <Page Include="Simple Styles.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="UserControlMenu.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Compile Include="UserControlMenu.xaml.cs">
+ <DependentUpon>UserControlMenu.xaml</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <SubType>Designer</SubType>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ <DependentUpon>Settings.settings</DependentUpon>
+ </Compile>
+ <Compile Include="SurfaceMenuTest.xaml.cs">
+ <DependentUpon>SurfaceMenuTest.xaml</DependentUpon>
+ </Compile>
+ <AppDesigner Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\icon.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Resources\iconPreview.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Resource Include="FingersDance.Control.Menu.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\WindowBackground.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="SurfaceMenuTest.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/FingersDance.Control.Menu.xml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<!--
+This file contains the information needed to install your application
+with the Surface Shell. Please refer to the documentation for deployment
+instructions.
+-->
+<ss:ApplicationInfo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ss="http://schemas.microsoft.com/Surface/2007/ApplicationMetadata">
+ <Application>
+ <Title>FingersDance.Control.Menu</Title>
+ <Description>FingersDance.Control.Menu</Description>
+ <ExecutableFile>FingersDance.Control.Menu.exe</ExecutableFile>
+ <Arguments></Arguments>
+ <IconImageFile>Resources\icon.png</IconImageFile>
+ <Preview>
+ <PreviewImageFile>Resources\iconPreview.png</PreviewImageFile>
+ </Preview>
+ <Tags>
+ <!--
+ If your application uses tagged objects, please uncomment this section to register the tags with the Shell.
+ You can register ByteTag(s), IdentityTag(s) or both by using the appropriate instructions below.
+ -->
+ <!--
+ To register ByteTags:
+ 1. Please uncomment the Byte Tag Element below.
+ 2. Replace "C0" below with the value of your Byte Tag (in hexadecimal format). Repeat this section (this element and its children) for other Byte Tags
+ 3. Please remove the Launch element if you do not want to register the tag with Object Routing.
+ -->
+ <!--
+ <ByteTag Value="C0">
+ <Actions>
+ <Launch />
+ </Actions>
+ </ByteTag>
+ -->
+ <!--
+ To register IdentityTags:
+ 1. Please uncomment the Identity Tag Element below.
+ 2. Replace "0000000000000000" below with the series of your Identity Tag (in hexadecimal format). Repeat this section (this element and its children) for other Identity Tags
+ 3. Please remove the Launch element if you do not want to register the tag with Object Routing.
+ -->
+ <!--
+ <IdentityTag Series="0000000000000000">
+ <Actions>
+ <Launch />
+ </Actions>
+ </IdentityTag>
+ -->
+ </Tags>
+ </Application>
+
+ <!--
+ Uncomment this section and comment out the Application element above
+ if you are creating an Attract Mode Application.
+ -->
+ <!--
+ <AttractApplication>
+ <ExecutableFile>FingersDance.Control.Menu.exe</ExecutableFile>
+ <Arguments></Arguments>
+ </AttractApplication>
+ -->
+</ss:ApplicationInfo>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/Properties/AssemblyInfo.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,62 @@
+#region Using directives
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Resources;
+using System.Globalization;
+using System.Windows;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("FingersDance.Control.Menu")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FingersDance.Control.Menu")]
+[assembly: AssemblyCopyright("Copyright @ 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+// Specifies the location in which theme dictionaries are stored for types in an assembly.
+[assembly: ThemeInfo(
+ // Specifies the location of system theme-specific resource dictionaries for this project.
+ // The default setting in this project is "None" since this default project does not
+ // include these user-defined theme files:
+ // Themes\Aero.NormalColor.xaml
+ // Themes\Classic.xaml
+ // Themes\Luna.Homestead.xaml
+ // Themes\Luna.Metallic.xaml
+ // Themes\Luna.NormalColor.xaml
+ // Themes\Royale.NormalColor.xaml
+ ResourceDictionaryLocation.None,
+
+ // Specifies the location of the system non-theme specific resource dictionary:
+ // Themes\generic.xaml
+ ResourceDictionaryLocation.SourceAssembly)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/Properties/Resources.Designer.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,72 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace FingersDance.Control.Menu.Properties
+{
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if (object.ReferenceEquals(resourceMan, null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFAppTemplate.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/Properties/Resources.resx Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/Properties/Settings.Designer.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace FingersDance.Control.Menu.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/Properties/Settings.settings Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='iso-8859-1'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
\ No newline at end of file
Binary file src/FingersDance.Control.Menu/Resources/WindowBackground.jpg has changed
Binary file src/FingersDance.Control.Menu/Resources/icon.png has changed
Binary file src/FingersDance.Control.Menu/Resources/iconPreview.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/Simple Styles.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,1121 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
+
+ <!-- SimpleStyles.XAML defines a set of control styles which are simplified starting points for creating your own controls -->
+
+ <!-- Brushes : These are used to define the color for background, foreground, selection, enabled etc of all controls
+ If you want to change the color of a control you can just chnage the brush; if you want to add a new shape or change arrangement then also edit the template -->
+
+ <!-- NormalBrush is used as the Background for SimpleButton, SimpleRepeatButton -->
+ <LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#EEE" Offset="0.0"/>
+ <GradientStop Color="#CCC" Offset="1.0"/>
+ </LinearGradientBrush>
+ <LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#CCC" Offset="0.0"/>
+ <GradientStop Color="#444" Offset="1.0"/>
+ </LinearGradientBrush>
+
+ <!-- LightBrush is used for content areas such as Menu, Tab Control background -->
+ <LinearGradientBrush x:Key="LightBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#FFF" Offset="0.0"/>
+ <GradientStop Color="#EEE" Offset="1.0"/>
+ </LinearGradientBrush>
+
+ <!-- MouseOverBrush is used for MouseOver in Button, Radio Button, CheckBox -->
+ <LinearGradientBrush x:Key="MouseOverBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#FFF" Offset="0.0"/>
+ <GradientStop Color="#AAA" Offset="1.0"/>
+ </LinearGradientBrush>
+
+ <!-- PressedBrush is used for Pressed in Button, Radio Button, CheckBox -->
+ <LinearGradientBrush x:Key="PressedBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#BBB" Offset="0.0"/>
+ <GradientStop Color="#EEE" Offset="0.1"/>
+ <GradientStop Color="#EEE" Offset="0.9"/>
+ <GradientStop Color="#FFF" Offset="1.0"/>
+ </LinearGradientBrush>
+ <LinearGradientBrush x:Key="PressedBorderBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#444" Offset="0.0"/>
+ <GradientStop Color="#888" Offset="1.0"/>
+ </LinearGradientBrush>
+
+ <!-- SelectedBackgroundBrush is used for the Selected item in ListBoxItem, ComboBoxItem-->
+ <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD"/>
+
+ <!-- Disabled Brushes are used for the Disabled look of each control -->
+ <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
+ <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE"/>
+ <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA"/>
+
+ <!-- Used for background of ScrollViewer, TreeView, ListBox, Expander, TextBox, Tab Control -->
+ <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF"/>
+
+ <!-- DefaultedBorderBrush is used to show KeyBoardFocus -->
+ <LinearGradientBrush x:Key="DefaultedBorderBrush" EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#777" Offset="0.0"/>
+ <GradientStop Color="#000" Offset="1.0"/>
+ </LinearGradientBrush>
+
+ <SolidColorBrush x:Key="SolidBorderBrush" Color="#888"/>
+ <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA"/>
+ <SolidColorBrush x:Key="LightColorBrush" Color="#DDD"/>
+
+ <!-- Used for Checkmark, Radio button, TreeViewItem, Expander ToggleButton glyphs -->
+ <SolidColorBrush x:Key="GlyphBrush" Color="#444"/>
+
+
+ <!-- Style and Template pairs are used to define each control Part -->
+ <!-- The Style provides default values on the control; the Template gives the elements for each control -->
+
+ <!-- SimpleButtonFocusVisual is used to show keyboard focus around a SimpleButton control -->
+ <Style x:Key="SimpleButtonFocusVisual">
+ <Setter Property="Control.Template">
+ <Setter.Value>
+ <ControlTemplate>
+ <Border>
+ <Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Button - This control sets brushes on each state. Note that these brushes must be listed above since they are static resources -->
+ <Style x:Key="SimpleButton" TargetType="{x:Type Button}" BasedOn="{x:Null}">
+ <Setter Property="FocusVisualStyle" Value="{DynamicResource SimpleButtonFocusVisual}"/>
+ <Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+
+ <!-- We use Grid as a root because it is easy to add more elements to customize the button -->
+ <Grid x:Name="Grid">
+ <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>
+
+ <!-- Content Presenter is where the text content etc is placed by the control -->
+ <!-- The bindings are useful so that the control can be parameterized without editing the template -->
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
+ </Grid>
+
+ <!--Each state sets a brush on the Border in the template -->
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsKeyboardFocused" Value="true">
+ <Setter Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="true"/>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="RadioButtonFocusVisual">
+ <Setter Property="Control.Template">
+ <Setter.Value>
+ <ControlTemplate>
+ <Border>
+ <Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="CheckBoxFocusVisual">
+ <Setter Property="Control.Template">
+ <Setter.Value>
+ <ControlTemplate>
+ <Border>
+ <Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple CheckBox -->
+ <Style x:Key="SimpleCheckBox" TargetType="{x:Type CheckBox}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}"/>
+ <Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type CheckBox}">
+
+ <!-- BulletDecorator is used to provide baseline alignment between the checkmark and the Content -->
+ <BulletDecorator Background="Transparent">
+ <BulletDecorator.Bullet>
+ <Grid Width="13" Height="13">
+ <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
+ <Path x:Name="CheckMark" Stroke="{DynamicResource GlyphBrush}" StrokeThickness="2" SnapsToDevicePixels="False" Data="M 0 0 L 13 13 M 0 13 L 13 0"/>
+ </Grid>
+ </BulletDecorator.Bullet>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
+ </BulletDecorator>
+
+ <!-- This uses Visibility to hide and show the CheckMark on IsChecked -->
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsChecked" Value="false">
+ <Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark"/>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Radio Button -->
+ <Style x:Key="SimpleRadioButton" TargetType="{x:Type RadioButton}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="FocusVisualStyle" Value="{DynamicResource RadioButtonFocusVisual}"/>
+ <Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type RadioButton}">
+
+ <!-- BulletDecorator is used to provide baseline alignment between the checkmark and the Content -->
+ <BulletDecorator Background="Transparent">
+ <BulletDecorator.Bullet>
+ <Grid Width="13" Height="13">
+ <Ellipse x:Name="Ellipse_Border" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
+ <Ellipse Margin="4" x:Name="CheckMark" Fill="{DynamicResource GlyphBrush}"/>
+ </Grid>
+ </BulletDecorator.Bullet>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
+ </BulletDecorator>
+
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsChecked" Value="false">
+ <Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark"/>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Ellipse_Border"/>
+ </Trigger>
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Ellipse_Border"/>
+ <Setter Property="Stroke" Value="{DynamicResource GlyphBrush}" TargetName="Ellipse_Border"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Ellipse_Border"/>
+ <Setter Property="Stroke" Value="#40000000" TargetName="Ellipse_Border"/>
+ <Setter Property="Foreground" Value="#80000000"/>
+ </Trigger>
+
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Repeat Button - This is used by Simple ScrollBar for the up and down buttons -->
+ <Style x:Key="SimpleRepeatButton" d:IsControlPart="True" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
+ <Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type RepeatButton}">
+ <Grid>
+ <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
+ <ContentPresenter HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsKeyboardFocused" Value="true">
+ <Setter Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Thumb - The Thumb is the draggable part of the Scrollbar -->
+ <Style x:Key="SimpleThumbStyle" d:IsControlPart="True" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Thumb}">
+ <Grid Margin="0,0,0,0" x:Name="Grid">
+ <Rectangle HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="2" RadiusY="2" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsMouseOver" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False"/>
+ <Trigger Property="IsDragging" Value="True"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ScrollRepeatButton Style - This RepeatButton is used above and below the Thumb in the Scrollbar. They are set to transparent si that they do not show over the scrollbar -->
+ <Style x:Key="SimpleScrollRepeatButtonStyle" d:IsControlPart="True" TargetType="{x:Type RepeatButton}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="IsTabStop" Value="false"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type RepeatButton}">
+ <Grid>
+ <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ScrollBar This makes use of SimpleThumb, SimpleRepeatButton and SimpleScrollRepeatButton -->
+
+ <Style x:Key="SimpleScrollBar" TargetType="{x:Type ScrollBar}">
+ <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ScrollBar}">
+ <Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Background="{TemplateBinding Background}">
+ <Grid.RowDefinitions>
+ <RowDefinition MaxHeight="18"/>
+ <RowDefinition Height="0.00001*"/>
+ <RowDefinition MaxHeight="18"/>
+ </Grid.RowDefinitions>
+
+ <RepeatButton x:Name="DecreaseRepeat" Style="{DynamicResource SimpleRepeatButton}" Command="ScrollBar.LineUpCommand">
+ <Grid>
+ <Path x:Name="DecreaseArrow" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" Data="M 0 4 L 8 4 L 4 0 Z"/>
+ </Grid>
+ </RepeatButton>
+
+ <!-- Track is a special layout container which sizes the thumb and the repeat button which do jump scrolling either side of it -->
+ <Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
+ <Track.Thumb>
+ <Thumb Style="{DynamicResource SimpleThumbStyle}"/>
+ </Track.Thumb>
+ <Track.IncreaseRepeatButton>
+ <RepeatButton x:Name="PageUp" Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="ScrollBar.PageDownCommand"/>
+ </Track.IncreaseRepeatButton>
+ <Track.DecreaseRepeatButton>
+ <RepeatButton x:Name="PageDown" Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="ScrollBar.PageUpCommand"/>
+ </Track.DecreaseRepeatButton>
+ </Track>
+
+ <RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Style="{DynamicResource SimpleRepeatButton}" Command="ScrollBar.LineDownCommand">
+ <Grid>
+ <Path x:Name="IncreaseArrow" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" Data="M 0 0 L 4 4 L 8 0 Z"/>
+ </Grid>
+ </RepeatButton>
+ </Grid>
+
+ <!-- This uses a single template for ScrollBar and rotate it to be Horizontal
+ It also changes the commands so that the it does Left and Right instead of Up and Down Commands -->
+ <ControlTemplate.Triggers>
+ <Trigger Property="Orientation" Value="Horizontal">
+
+ <!-- Rotate the ScrollBar from Vertical to Horizontal -->
+ <Setter Property="LayoutTransform" TargetName="GridRoot">
+ <Setter.Value>
+ <RotateTransform Angle="-90"/>
+ </Setter.Value>
+ </Setter>
+
+ <!-- Track is bound to Orientation internally, so we need to rotate it back to Vertical -->
+ <Setter TargetName="PART_Track" Property="Orientation" Value="Vertical"/>
+
+ <!-- Change the commands to do Horizontal commands -->
+ <Setter Property="Command" Value="ScrollBar.LineLeftCommand" TargetName="DecreaseRepeat"/>
+ <Setter Property="Command" Value="ScrollBar.LineRightCommand" TargetName="IncreaseRepeat"/>
+ <Setter Property="Command" Value="ScrollBar.PageLeftCommand" TargetName="PageDown"/>
+ <Setter Property="Command" Value="ScrollBar.PageRightCommand" TargetName="PageUp"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ScrollViewer
+ ScrollViewer is a Grid control which has a ContentPresenter and a Horizontal and Vertical ScrollBar
+ It is used by ListBox, MenuItem, ComboBox, and TreeView -->
+ <Style x:Key="SimpleScrollViewer" TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ScrollViewer}">
+ <Grid Background="{TemplateBinding Background}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
+
+ <!-- The visibility of the ScrollBars is controlled by the implementation fo the control -->
+ <ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" x:Name="PART_HorizontalScrollBar" Style="{DynamicResource SimpleScrollBar}" Orientation="Horizontal" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" AutomationProperties.AutomationId="HorizontalScrollBar"/>
+ <ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" x:Name="PART_VerticalScrollBar" Style="{DynamicResource SimpleScrollBar}" Orientation="Vertical" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" AutomationProperties.AutomationId="VerticalScrollBar"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ListBox - This uses SimpleScrollViewer to allow items to be scrolled and SimpleListBoxItem to define the look of each item -->
+ <Style x:Key="SimpleListBox" TargetType="{x:Type ListBox}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource SolidBorderBrush}"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
+ <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ListBox}">
+ <Grid>
+ <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
+ <ScrollViewer Margin="1" Style="{DynamicResource SimpleScrollViewer}" Focusable="false" Background="{TemplateBinding Background}">
+
+ <!-- The StackPanel is used to display the children by setting IsItemsHost to be Trus -->
+ <StackPanel Margin="2" IsItemsHost="true"/>
+
+ </ScrollViewer>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsGrouping" Value="true">
+ <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ListBoxItem - This is used for each Item in a ListBox. The item's content is placed in the ContentPresenter -->
+
+ <Style x:Key="SimpleListBoxItem" d:IsControlPart="True" TargetType="{x:Type ListBoxItem}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="OverridesDefaultStyle" Value="true"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ListBoxItem}">
+ <Grid SnapsToDevicePixels="true">
+ <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+
+ <!-- Change IsSelected SelectedBackgroundBrush to set the selection color for the items -->
+ <Trigger Property="IsSelected" Value="true">
+ <Setter Property="Background" Value="{DynamicResource SelectedBackgroundBrush}" TargetName="Border"/>
+ </Trigger>
+
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Expander ToggleButton - This Button is used by the Expander control. When it is toggled it switches visibility on the Up_Arrow and Down_Arrow -->
+ <ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
+ <Grid>
+ <Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="Transparent" Stroke="{DynamicResource NormalBorderBrush}"/>
+ <Path HorizontalAlignment="Center" x:Name="Up_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z"/>
+ <Path Visibility="Collapsed" HorizontalAlignment="Center" x:Name="Down_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 4 0 L 8 4 Z"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Rectangle"/>
+ </Trigger>
+ <Trigger Property="IsPressed" Value="true">
+ <Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle"/>
+ </Trigger>
+ <Trigger Property="IsChecked" Value="true">
+ <Setter Property="Visibility" Value="Visible" TargetName="Down_Arrow"/>
+ <Setter Property="Visibility" Value="Collapsed" TargetName="Up_Arrow"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle"/>
+ <Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ <Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Up_Arrow"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+
+ <!-- Simple Expander
+ This uses the Simpler ExpanderToggleButton. It sets Visibility on the ContentPresenter to expand
+ Limitations : The Simple Expander only expands down -->
+ <Style x:Key="SimpleExpander" TargetType="{x:Type Expander}">
+ <Setter Property="Background" Value="{DynamicResource LightBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Expander}">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*" x:Name="ContentRow"/>
+ </Grid.RowDefinitions>
+ <Border Grid.Row="0" x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2,2,0,0">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="20"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <ToggleButton Template="{DynamicResource ExpanderToggleButton}" Background="{DynamicResource NormalBrush}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" OverridesDefaultStyle="True"/>
+ <ContentPresenter Grid.Column="1" Margin="4" RecognizesAccessKey="True" ContentSource="Header"/>
+ </Grid>
+ </Border>
+ <Border Visibility="Collapsed" Grid.Row="1" x:Name="ExpandSite" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,2,2">
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false"/>
+ </Border>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsExpanded" Value="True">
+ <Setter Property="Visibility" Value="Visible" TargetName="ExpandSite"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ComboBox Toggle Button - This is used in ComboBox to expand and collapse the ComboBox Popup-->
+ <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition/>
+ <ColumnDefinition Width="20"/>
+ </Grid.ColumnDefinitions>
+ <Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
+ <Rectangle Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource WindowBackgroundBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
+ <Path Grid.Column="1" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Rectangle"/>
+ </Trigger>
+ <Trigger Property="IsChecked" Value="true">
+ <Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle"/>
+ <Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ <Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Arrow"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+
+ <!-- This is the area which contains the selected item in the ComboBox -->
+
+ <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
+ <!-- This must be named as PART_ContentHost -->
+ <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}"/>
+ </ControlTemplate>
+
+ <!-- Simple ComboBox
+ This uses the ComboBoxToggleButton to expand and collapse a Popup control
+ SimpleScrollViewer to allow items to be scrolled and SimpleComboBoxItem to define the look of each item
+ The Popup shows a list of items in a StackPanel-->
+
+ <Style x:Key="SimpleComboBox" TargetType="{x:Type ComboBox}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ComboBox}">
+ <Grid>
+ <!-- The ToggleButton is databound to the ComboBox itself to toggle IsDropDownOpen -->
+ <ToggleButton Grid.Column="2" Template="{DynamicResource ComboBoxToggleButton}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
+ <ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/>
+
+ <!-- The TextBox must be named PART_EditableTextBox or ComboBox will not recognize it -->
+ <TextBox Visibility="Hidden" Template="{DynamicResource ComboBoxTextBox}" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}"/>
+
+ <!-- The Popup shows the list of items in the ComboBox. IsOpen is databound to IsDropDownOpen which is toggled via the ComboBoxToggleButton -->
+ <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
+ <Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
+ <Border x:Name="DropDownBorder" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/>
+ <ScrollViewer Margin="4,6,4,6" Style="{DynamicResource SimpleScrollViewer}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
+
+ <!-- The StackPanel is used to display the children by setting IsItemsHost to be True -->
+ <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/>
+
+ </ScrollViewer>
+ </Grid>
+ </Popup>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <!-- This forces the DropDown to have a minimum size if it is empty -->
+ <Trigger Property="HasItems" Value="false">
+ <Setter Property="MinHeight" Value="95" TargetName="DropDownBorder"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ <Trigger Property="IsGrouping" Value="true">
+ <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
+ </Trigger>
+ <Trigger Property="AllowsTransparency" SourceName="Popup" Value="true">
+ <Setter Property="CornerRadius" Value="4" TargetName="DropDownBorder"/>
+ <Setter Property="Margin" Value="0,2,0,0" TargetName="DropDownBorder"/>
+ </Trigger>
+ <Trigger Property="IsEditable" Value="true">
+ <Setter Property="IsTabStop" Value="false"/>
+ <Setter Property="Visibility" Value="Visible" TargetName="PART_EditableTextBox"/>
+ <Setter Property="Visibility" Value="Hidden" TargetName="ContentSite"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple ComboBoxItem - This is used for each item inside of the ComboBox. You can change the selected color of each item below-->
+ <Style x:Key="SimpleComboBoxItem" d:IsControlPart="True" TargetType="{x:Type ComboBoxItem}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ComboBoxItem}">
+ <Grid SnapsToDevicePixels="true">
+ <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+
+ <!-- Change IsHighlighted SelectedBackgroundBrush to set the selection color for the items -->
+ <Trigger Property="IsHighlighted" Value="true">
+ <Setter Property="Background" Value="{DynamicResource SelectedBackgroundBrush}" TargetName="Border"/>
+ </Trigger>
+
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple SimpleProgressBar
+ The template uses two Border controls to show the Track and Progress
+ Limitations : It only supports a horizontal orientated ProgressBar -->
+ <Style x:Key="SimpleProgressBar" TargetType="{x:Type ProgressBar}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ProgressBar}">
+ <Grid>
+
+ <!-- This Border is the track. It must be named PART_Track -->
+ <Border x:Name="PART_Track" Background="{DynamicResource PressedBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="2"/>
+
+ <!-- This Border shows progress. It must be named PART_Indicator for the control to function -->
+ <Border HorizontalAlignment="Left" x:Name="PART_Indicator" Background="{DynamicResource MouseOverBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness="1" CornerRadius="2"/>
+
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple TextBox -->
+ <Style x:Key="SimpleTextBox" TargetType="{x:Type TextBox}">
+ <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="AllowDrop" Value="true"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type TextBox}">
+ <Grid>
+ <Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" Padding="2" CornerRadius="2">
+
+ <!-- The implementation places the Content into the ScrollViewer. It must be named PART_ContentHost for the control to function -->
+ <ScrollViewer Margin="0" x:Name="PART_ContentHost" Style="{DynamicResource SimpleScrollViewer}" Background="{TemplateBinding Background}"/>
+
+ </Border>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Label - This template is just a ContentPresenter that shows the content of the Label -->
+ <Style x:Key="SimpleLabel" TargetType="{x:Type Label}">
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="VerticalContentAlignment" Value="Top"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Label}">
+ <Grid>
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="false"/>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Menu - This template uses a StackPanel to layout MenuItems -->
+ <Style x:Key="SimpleMenu" TargetType="{x:Type Menu}">
+ <Setter Property="Background" Value="{DynamicResource LightBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="SnapsToDevicePixels" Value="True"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Menu}">
+ <Grid>
+ <Border Margin="1" x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
+ <StackPanel Background="{TemplateBinding Background}" IsItemsHost="True" ClipToBounds="True" Orientation="Horizontal"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- This BitmapEffect is used by the Simple MenuItem -->
+ <DropShadowBitmapEffect x:Key="PopupDropShadow" ShadowDepth="1.5" Softness="0.15"/>
+
+ <!-- Simple MenuItem - The template uses triggers to provide four different arrangements of menu item which are set via the Role property -->
+ <Style x:Key="SimpleMenuItem" TargetType="{x:Type MenuItem}">
+ <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
+ <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type MenuItem}">
+ <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
+ <Grid>
+
+ <!-- The Grid is used to hold together columns for an Icon, Content, Glyph checkmark and Arrow to show the next level
+ Size sharing is used in Grid so that the Icon, Content, Arrow for each MenuItem align together -->
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
+ <ColumnDefinition Width="14"/>
+ </Grid.ColumnDefinitions>
+
+ <!-- ContentPresenter to show an Icon if needed -->
+ <ContentPresenter Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
+
+ <!-- Glyph is a checkmark if needed for a checkable menu -->
+ <Grid Visibility="Hidden" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center">
+ <Path x:Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z" FlowDirection="LeftToRight"/>
+ </Grid>
+
+ <!-- Content for the menu text etc -->
+ <ContentPresenter Grid.Column="1" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" RecognizesAccessKey="True" ContentSource="Header"/>
+
+ <!-- Arrow drawn path which points to the next level of the menu -->
+ <Grid Grid.Column="3" Margin="4,0,6,0" x:Name="ArrowPanel" VerticalAlignment="Center">
+ <Path x:Name="ArrowPanelPath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z"/>
+ </Grid>
+
+ <!-- The Popup is the body of the menu which expands down or across depending on the level of the item -->
+ <Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" x:Name="SubMenuPopup" Focusable="false" AllowsTransparency="true" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3">
+ <Grid x:Name="SubMenu">
+ <Border x:Name="SubMenuBorder" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/>
+
+ <!-- StackPanel holds children of the menu. This is set bu IsItemsHost=True -->
+ <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
+ </Grid>
+ </Popup>
+
+ </Grid>
+ </Border>
+
+ <!-- These triggers re-configure the four arrangements of MenuItem to show different levels of menu via Role -->
+ <ControlTemplate.Triggers>
+
+ <!-- Role = TopLevelHeader : this is the root menu item in a menu; the Popup expands down -->
+ <Trigger Property="Role" Value="TopLevelHeader">
+ <Setter Property="Margin" Value="0,1,0,1"/>
+ <Setter Property="Padding" Value="6,3,6,3"/>
+ <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
+ <Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
+ <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
+ </Trigger>
+
+ <!-- Role = TopLevelItem : this is a child menu item from the top level without any child items-->
+ <Trigger Property="Role" Value="TopLevelItem">
+ <Setter Property="Margin" Value="0,1,0,1"/>
+ <Setter Property="Padding" Value="6,3,6,3"/>
+ <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
+ </Trigger>
+
+ <!-- Role = SubMenuHeader : this is a child menu item which does not have children -->
+ <Trigger Property="Role" Value="SubmenuHeader">
+ <Setter Property="DockPanel.Dock" Value="Top"/>
+ <Setter Property="Padding" Value="0,2,0,2"/>
+ <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
+ </Trigger>
+
+ <!-- Role = SubMenuItem : this is a child menu item which has children-->
+ <Trigger Property="Role" Value="SubmenuItem">
+ <Setter Property="DockPanel.Dock" Value="Top"/>
+ <Setter Property="Padding" Value="0,2,0,2"/>
+ <Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
+ </Trigger>
+ <Trigger Property="IsSuspendingPopupAnimation" Value="true">
+ <Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup"/>
+ </Trigger>
+
+ <!-- If no Icon is present the we collapse the Icon Content -->
+ <Trigger Property="Icon" Value="{x:Null}">
+ <Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
+ </Trigger>
+
+ <!-- The GlyphPanel contains the CheckMark -->
+ <Trigger Property="IsChecked" Value="true">
+ <Setter Property="Visibility" Value="Visible" TargetName="GlyphPanel"/>
+ <Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
+ </Trigger>
+
+ <Trigger Property="AllowsTransparency" SourceName="SubMenuPopup" Value="true">
+ <Setter Property="Margin" Value="0,0,3,3" TargetName="SubMenu"/>
+ <Setter Property="SnapsToDevicePixels" Value="true" TargetName="SubMenu"/>
+ <Setter Property="BitmapEffect" Value="{DynamicResource PopupDropShadow}" TargetName="SubMenuBorder"/>
+ </Trigger>
+
+ <!-- Using the system colors for the Menu Highlight and IsEnabled-->
+ <Trigger Property="IsHighlighted" Value="true">
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" TargetName="Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple Separator - This template is used for a Separator in a menu -->
+ <Style x:Key="SimpleSeparator" TargetType="{x:Type Separator}">
+ <Setter Property="Height" Value="1"/>
+ <Setter Property="Margin" Value="0,2,0,2"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Separator}">
+ <Border BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Simple TabControl
+ This template uses Simple TabItem for each Tab. The TabItems are placed in the TabPanel
+ Limitations : The Simple TabControl only allow the Tabs to be shown at the top of the Tab control. You can re-position the TabPanel to change this-->
+
+ <Style x:Key="SimpleTabControl" TargetType="{x:Type TabControl}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type TabControl}">
+ <Grid KeyboardNavigation.TabNavigation="Local">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ </Grid.RowDefinitions>
+
+ <!-- TabPanel is a layout container which allows the TabItems to wrap and re-order when selected
+ The implementation knows to use this control because it is marked IsItemsHost = True -->
+ <TabPanel Grid.Row="0" Margin="0,0,4,-1" x:Name="HeaderPanel" Background="Transparent" IsItemsHost="True" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1"/>
+
+ <Border Grid.Row="1" x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2">
+
+ <!-- The implementation switches the content. This control must be named PART_SelectedContentHost -->
+ <ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
+
+ </Border>
+ </Grid>
+
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Simple TabItem -->
+ <Style x:Key="SimpleTabItem" d:IsControlPart="True" TargetType="{x:Type TabItem}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type TabItem}">
+ <Grid>
+ <Border Margin="0,0,-4,0" x:Name="Border" Background="{DynamicResource LightBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1,1,1,1" CornerRadius="2,12,0,0">
+ <ContentPresenter HorizontalAlignment="Center" Margin="12,2,12,2" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header"/>
+ </Border>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Panel.ZIndex" Value="100"/>
+ <Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderThickness" Value="1,1,1,0" TargetName="Border"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Simple Simple SliderThumb - The Thumb is the draggable part of a Slider-->
+ <Style x:Key="SimpleSliderThumb" d:IsControlPart="True" TargetType="{x:Type Thumb}">
+ <Setter Property="SnapsToDevicePixels" Value="true"/>
+ <Setter Property="Height" Value="14"/>
+ <Setter Property="Width" Value="14"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Thumb}">
+ <Grid>
+ <Ellipse x:Name="Ellipse" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}" StrokeThickness="1"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Ellipse"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Ellipse"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Simple Simple Slider
+ Similiar to ScrollBar this template uses Track to layout the draggable Thumb which has an up and down repeat button
+ It uses Simple SliderThumb and SimpleScrollRepeatButtonStyle for the page up and down repeat buttons -->
+ <Style x:Key="SimpleSlider" TargetType="{x:Type Slider}">
+ <Setter Property="Background" Value="{DynamicResource LightBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Slider}">
+ <Grid x:Name="GridRoot">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+
+ <!-- TickBar shows the ticks for Slider -->
+ <TickBar Visibility="Collapsed" x:Name="TopTick" Height="4" SnapsToDevicePixels="True" Placement="Top" Fill="{DynamicResource GlyphBrush}"/>
+ <Border Grid.Row="1" Margin="0" x:Name="Border" Height="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/>
+
+ <!-- The Track lays out the repeat buttons and thumb -->
+ <Track Grid.Row="1" x:Name="PART_Track">
+ <Track.Thumb>
+ <Thumb Style="{DynamicResource SimpleSliderThumb}"/>
+ </Track.Thumb>
+ <Track.IncreaseRepeatButton>
+ <RepeatButton Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="Slider.IncreaseLarge"/>
+ </Track.IncreaseRepeatButton>
+ <Track.DecreaseRepeatButton>
+ <RepeatButton Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="Slider.DecreaseLarge"/>
+ </Track.DecreaseRepeatButton>
+ </Track>
+
+ <TickBar Visibility="Collapsed" Grid.Row="2" x:Name="BottomTick" Height="4" SnapsToDevicePixels="True" Placement="Bottom" Fill="{TemplateBinding Foreground}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="TickPlacement" Value="TopLeft">
+ <Setter Property="Visibility" Value="Visible" TargetName="TopTick"/>
+ </Trigger>
+ <Trigger Property="TickPlacement" Value="BottomRight">
+ <Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/>
+ </Trigger>
+ <Trigger Property="TickPlacement" Value="Both">
+ <Setter Property="Visibility" Value="Visible" TargetName="TopTick"/>
+ <Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/>
+ </Trigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
+ </Trigger>
+
+ <!-- Use a rotation to create a Vertical Slider form the default Horizontal -->
+ <Trigger Property="Orientation" Value="Vertical">
+ <Setter Property="LayoutTransform" TargetName="GridRoot">
+ <Setter.Value>
+ <RotateTransform Angle="-90"/>
+ </Setter.Value>
+ </Setter>
+ <!-- Track rotates itself based on orientation so need to force it back -->
+ <Setter TargetName="PART_Track" Property="Orientation" Value="Horizontal"/>
+ </Trigger>
+
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Simple Tree View - This lays out TreeViewItems within a ScrollViewer -->
+ <Style x:Key="SimpleTreeView" TargetType="{x:Type TreeView}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type TreeView}">
+ <Grid>
+ <Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="1">
+ <ScrollViewer Style="{DynamicResource SimpleScrollViewer}" Focusable="False" Background="{TemplateBinding Background}" Padding="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="False">
+ <ItemsPresenter/>
+ </ScrollViewer>
+ </Border>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Simple TreeViewItem ToggleButton - + and - button to expand and collapse a TreeViewItem -->
+ <Style x:Key="SimpleTreeViewItemToggleButton" d:IsControlPart="True" TargetType="{x:Type ToggleButton}">
+ <Setter Property="Focusable" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ToggleButton}">
+ <Grid Width="15" Height="13" Background="Transparent">
+ <Path Visibility="Collapsed" HorizontalAlignment="Left" Margin="1,1,1,1" x:Name="IsExpandedPath" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 8 4 L 4 8 Z"/>
+ <Path HorizontalAlignment="Left" Margin="1,1,1,1" x:Name="ExpandPath" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 4 0 L 8 4 L 4 8 Z"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsChecked" Value="True">
+ <Setter Property="Visibility" Value="Visible" TargetName="IsExpandedPath"/>
+ <Setter Property="Visibility" Value="Collapsed" TargetName="ExpandPath"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Simple TreeViewItem - The TreeViewItem template has a header which shows the Item and a Body which is an ItemsHost control which expands to show child items-->
+ <Style x:Key="SimpleTreeViewItem" d:IsControlPart="True" TargetType="{x:Type TreeViewItem}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
+ <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
+ <Setter Property="Padding" Value="1,0,0,0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type TreeViewItem}">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition MinWidth="19" Width="Auto"/>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition/>
+ </Grid.RowDefinitions>
+ <ToggleButton x:Name="Expander" Style="{DynamicResource SimpleTreeViewItemToggleButton}" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
+ <Border Grid.Column="1" x:Name="Selection_Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" ContentSource="Header"/>
+ </Border>
+ <ItemsPresenter Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" x:Name="ItemsHost"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsExpanded" Value="false">
+ <Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost"/>
+ </Trigger>
+ <Trigger Property="HasItems" Value="false">
+ <Setter Property="Visibility" Value="Hidden" TargetName="Expander"/>
+ </Trigger>
+ <Trigger Property="IsSelected" Value="true">
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" TargetName="Selection_Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
+ </Trigger>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsSelected" Value="true"/>
+ <Condition Property="IsSelectionActive" Value="false"/>
+ </MultiTrigger.Conditions>
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" TargetName="Selection_Border"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
+ </MultiTrigger>
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/SurfaceMenuTest.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,19 @@
+<s:SurfaceWindow
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:s="http://schemas.microsoft.com/surface/2008"
+ x:Class="FingersDance.Control.Menu.SurfaceWindow1"
+ Title="FingersDance.Control.Menu"
+ x:Name="SurfaceMenuTest" xmlns:FingersDance_Control_Menu="clr-namespace:FingersDance.Control.Menu"
+ >
+ <s:SurfaceWindow.Resources>
+ <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
+ </s:SurfaceWindow.Resources>
+
+ <Grid Background="{StaticResource WindowBackground}" >
+
+ <FingersDance_Control_Menu:UserControlMenu HorizontalAlignment="Left" Width="173"/>
+ <FingersDance_Control_Menu:UserControlMenu Width="245" HorizontalAlignment="Right"/>
+
+ </Grid>
+</s:SurfaceWindow>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/SurfaceMenuTest.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+using Microsoft.Surface;
+using Microsoft.Surface.Presentation;
+using Microsoft.Surface.Presentation.Controls;
+
+namespace FingersDance.Control.Menu
+{
+ /// <summary>
+ /// Interaction logic for SurfaceWindow1.xaml
+ /// </summary>
+ public partial class SurfaceWindow1 : SurfaceWindow
+ {
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
+ public SurfaceWindow1()
+ {
+ InitializeComponent();
+
+ // Add handlers for Application activation events
+ AddActivationHandlers();
+ }
+
+
+ /// <summary>
+ /// Occurs when the window is about to close.
+ /// </summary>
+ /// <param name="e"></param>
+ protected override void OnClosed(EventArgs e)
+ {
+ base.OnClosed(e);
+
+ // Remove handlers for Application activation events
+ RemoveActivationHandlers();
+ }
+
+ /// <summary>
+ /// Adds handlers for Application activation events.
+ /// </summary>
+ private void AddActivationHandlers()
+ {
+ // Subscribe to surface application activation events
+ ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
+ }
+
+ /// <summary>
+ /// Removes handlers for Application activation events.
+ /// </summary>
+ private void RemoveActivationHandlers()
+ {
+ // Unsubscribe from surface application activation events
+ ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
+ }
+
+ /// <summary>
+ /// This is called when application has been activated.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationActivated(object sender, EventArgs e)
+ {
+ //TODO: enable audio, animations here
+ }
+
+ /// <summary>
+ /// This is called when application is in preview mode.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationPreviewed(object sender, EventArgs e)
+ {
+ //TODO: Disable audio here if it is enabled
+
+ //TODO: optionally enable animations here
+ }
+
+ /// <summary>
+ /// This is called when application has been deactivated.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationDeactivated(object sender, EventArgs e)
+ {
+ //TODO: disable audio, animations here
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,36 @@
+<UserControl
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ x:Class="FingersDance.Control.Menu.UserControlMenu"
+ x:Name="UserControl"
+ Width="245" Height="Auto" xmlns:Custom="http://schemas.microsoft.com/surface/2008">
+
+ <StackPanel x:Name="LayoutRoot" Width="Auto" Height="Auto">
+ <StackPanel.Background>
+ <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+ <GradientStop Color="#FF000000" Offset="0"/>
+ <GradientStop Color="#FF444444" Offset="0.991"/>
+ <GradientStop Color="#FF757575" Offset="0.906"/>
+ <GradientStop Color="#FF414141" Offset="0.772"/>
+ </LinearGradientBrush>
+ </StackPanel.Background>
+ <Custom:SurfaceButton FontSize="18" FontWeight="Normal" Foreground="#FFAEAEAE" HorizontalAlignment="Stretch" x:Name="ButtonAnnotation" Width="Auto" Height="45" Content="Annotation" ContactDown="ButtonAnnotation_ContactDown" Click="ButtonAnnotation_Click"/>
+ <StackPanel RenderTransformOrigin="0.5,0.5" Visibility="Collapsed" HorizontalAlignment="Right" x:Name="PanelAnnotation" Width="208" Height="Auto">
+ <StackPanel.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ <SkewTransform AngleX="0" AngleY="0"/>
+ <RotateTransform Angle="0"/>
+ <TranslateTransform X="0" Y="0"/>
+ </TransformGroup>
+ </StackPanel.RenderTransform>
+ <Custom:SurfaceButton FontSize="14" FontWeight="Normal" Foreground="#FFAEAEAE" Width="Auto" Height="25" Content="Cinématographique" Visibility="Visible" Background="#72FFFFFF" x:Name="ButtonChildCine"/>
+ <Custom:SurfaceButton FontSize="14" FontWeight="Normal" Foreground="#FFAEAEAE" Width="Auto" Height="26" Content="Chorégraphique" Background="#72FFFFFF" Visibility="Visible" x:Name="ButtonChildChore"/>
+ </StackPanel>
+ <Custom:SurfaceButton FontSize="18" FontWeight="Normal" Foreground="#FFAEAEAE" x:Name="ButtonRecherche" Width="Auto" Height="45" Content="Recherche" ContactDown="ButtonRecherche_ContactDown" Click="ButtonRecherche_Click"/>
+ <StackPanel Visibility="Collapsed" HorizontalAlignment="Right" x:Name="PanelRecherche" Width="262" Height="45"/>
+ </StackPanel>
+</UserControl>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.Menu/UserControlMenu.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,78 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Navigation;
+
+namespace FingersDance.Control.Menu
+{
+ public partial class UserControlMenu
+ {
+ public UserControlMenu()
+ {
+ this.InitializeComponent();
+ initChildSize();
+
+ // Insert code required on object creation below this point.
+ }
+
+ //Premet de deplacer les sous menus vers la droite pour avoir un effect tree view
+ private void initChildSize()
+ {
+ PanelAnnotation.Width -= 0.20*this.Width;
+ PanelRecherche.Width -= 0.20 * this.Width;
+ }
+
+ private void ButtonAnnotation_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (PanelAnnotation.Visibility == Visibility.Collapsed)
+ {
+ PanelAnnotation.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelAnnotation.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void ButtonRecherche_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
+ {
+ if (PanelRecherche.Visibility == Visibility.Collapsed)
+ {
+ PanelRecherche.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelRecherche.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void ButtonAnnotation_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelAnnotation.Visibility == Visibility.Collapsed)
+ {
+ PanelAnnotation.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelAnnotation.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ private void ButtonRecherche_Click(object sender, RoutedEventArgs e)
+ {
+ if (PanelRecherche.Visibility == Visibility.Collapsed)
+ {
+ PanelRecherche.Visibility = Visibility.Visible;
+ }
+ else
+ {
+ PanelRecherche.Visibility = Visibility.Collapsed;
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/App.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,13 @@
+<Application x:Class="FingersDance.Control.TimeLine.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ StartupUri="SurfaceWindow1.xaml"
+ >
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/Microsoft.Surface.Presentation.Generic;v1.0.0.0;31bf3856ad364e35;component/themes\generic.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/App.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace FingersDance.Control.TimeLine
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : Application
+ {
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.csproj Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,115 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}</ProjectGuid>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <RootNamespace>FingersDance.Control.TimeLine</RootNamespace>
+ <AssemblyName>FingersDance.Control.TimeLine</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <WarningLevel>4</WarningLevel>
+ <OutputType>winexe</OutputType>
+ <Install>true</Install>
+ <InstallFrom>Web</InstallFrom>
+ <UpdateEnabled>true</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>false</MapFileExtensions>
+ <ApplicationVersion>1.0.0.*</ApplicationVersion>
+ <IsWebBootstrapper>true</IsWebBootstrapper>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <PublishUrl>Publish\</PublishUrl>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <Optimize>true</Optimize>
+ <OutputPath>.\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="Microsoft.Surface" />
+ <Reference Include="Microsoft.Surface.Presentation" />
+ <Reference Include="Microsoft.Surface.Presentation.Generic" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <SubType>Designer</SubType>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ <DependentUpon>Settings.settings</DependentUpon>
+ </Compile>
+ <Compile Include="SurfaceWindow1.xaml.cs">
+ <DependentUpon>SurfaceWindow1.xaml</DependentUpon>
+ </Compile>
+ <AppDesigner Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\icon.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Resources\iconPreview.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Resource Include="FingersDance.Control.TimeLine.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\WindowBackground.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="SurfaceWindow1.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/FingersDance.Control.TimeLine.xml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<!--
+This file contains the information needed to install your application
+with the Surface Shell. Please refer to the documentation for deployment
+instructions.
+-->
+<ss:ApplicationInfo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ss="http://schemas.microsoft.com/Surface/2007/ApplicationMetadata">
+ <Application>
+ <Title>FingersDance.Control.TimeLine</Title>
+ <Description>FingersDance.Control.TimeLine</Description>
+ <ExecutableFile>FingersDance.Control.TimeLine.exe</ExecutableFile>
+ <Arguments></Arguments>
+ <IconImageFile>Resources\icon.png</IconImageFile>
+ <Preview>
+ <PreviewImageFile>Resources\iconPreview.png</PreviewImageFile>
+ </Preview>
+ <Tags>
+ <!--
+ If your application uses tagged objects, please uncomment this section to register the tags with the Shell.
+ You can register ByteTag(s), IdentityTag(s) or both by using the appropriate instructions below.
+ -->
+ <!--
+ To register ByteTags:
+ 1. Please uncomment the Byte Tag Element below.
+ 2. Replace "C0" below with the value of your Byte Tag (in hexadecimal format). Repeat this section (this element and its children) for other Byte Tags
+ 3. Please remove the Launch element if you do not want to register the tag with Object Routing.
+ -->
+ <!--
+ <ByteTag Value="C0">
+ <Actions>
+ <Launch />
+ </Actions>
+ </ByteTag>
+ -->
+ <!--
+ To register IdentityTags:
+ 1. Please uncomment the Identity Tag Element below.
+ 2. Replace "0000000000000000" below with the series of your Identity Tag (in hexadecimal format). Repeat this section (this element and its children) for other Identity Tags
+ 3. Please remove the Launch element if you do not want to register the tag with Object Routing.
+ -->
+ <!--
+ <IdentityTag Series="0000000000000000">
+ <Actions>
+ <Launch />
+ </Actions>
+ </IdentityTag>
+ -->
+ </Tags>
+ </Application>
+
+ <!--
+ Uncomment this section and comment out the Application element above
+ if you are creating an Attract Mode Application.
+ -->
+ <!--
+ <AttractApplication>
+ <ExecutableFile>FingersDance.Control.TimeLine.exe</ExecutableFile>
+ <Arguments></Arguments>
+ </AttractApplication>
+ -->
+</ss:ApplicationInfo>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/Properties/AssemblyInfo.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,62 @@
+#region Using directives
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Resources;
+using System.Globalization;
+using System.Windows;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("FingersDance.Control.TimeLine")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FingersDance.Control.TimeLine")]
+[assembly: AssemblyCopyright("Copyright @ 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+// Specifies the location in which theme dictionaries are stored for types in an assembly.
+[assembly: ThemeInfo(
+ // Specifies the location of system theme-specific resource dictionaries for this project.
+ // The default setting in this project is "None" since this default project does not
+ // include these user-defined theme files:
+ // Themes\Aero.NormalColor.xaml
+ // Themes\Classic.xaml
+ // Themes\Luna.Homestead.xaml
+ // Themes\Luna.Metallic.xaml
+ // Themes\Luna.NormalColor.xaml
+ // Themes\Royale.NormalColor.xaml
+ ResourceDictionaryLocation.None,
+
+ // Specifies the location of the system non-theme specific resource dictionary:
+ // Themes\generic.xaml
+ ResourceDictionaryLocation.SourceAssembly)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/Properties/Resources.Designer.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,72 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace FingersDance.Control.TimeLine.Properties
+{
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if (object.ReferenceEquals(resourceMan, null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFAppTemplate.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/Properties/Resources.resx Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/Properties/Settings.Designer.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace FingersDance.Control.TimeLine.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/Properties/Settings.settings Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='iso-8859-1'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
\ No newline at end of file
Binary file src/FingersDance.Control.TimeLine/Resources/WindowBackground.jpg has changed
Binary file src/FingersDance.Control.TimeLine/Resources/icon.png has changed
Binary file src/FingersDance.Control.TimeLine/Resources/iconPreview.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/SurfaceWindow1.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,14 @@
+<s:SurfaceWindow x:Class="FingersDance.Control.TimeLine.SurfaceWindow1"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:s="http://schemas.microsoft.com/surface/2008"
+ Title="FingersDance.Control.TimeLine"
+ >
+ <s:SurfaceWindow.Resources>
+ <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
+ </s:SurfaceWindow.Resources>
+
+ <Grid Background="{StaticResource WindowBackground}" >
+
+ </Grid>
+</s:SurfaceWindow>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.TimeLine/SurfaceWindow1.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+using Microsoft.Surface;
+using Microsoft.Surface.Presentation;
+using Microsoft.Surface.Presentation.Controls;
+
+namespace FingersDance.Control.TimeLine
+{
+ /// <summary>
+ /// Interaction logic for SurfaceWindow1.xaml
+ /// </summary>
+ public partial class SurfaceWindow1 : SurfaceWindow
+ {
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
+ public SurfaceWindow1()
+ {
+ InitializeComponent();
+
+ // Add handlers for Application activation events
+ AddActivationHandlers();
+ }
+
+
+ /// <summary>
+ /// Occurs when the window is about to close.
+ /// </summary>
+ /// <param name="e"></param>
+ protected override void OnClosed(EventArgs e)
+ {
+ base.OnClosed(e);
+
+ // Remove handlers for Application activation events
+ RemoveActivationHandlers();
+ }
+
+ /// <summary>
+ /// Adds handlers for Application activation events.
+ /// </summary>
+ private void AddActivationHandlers()
+ {
+ // Subscribe to surface application activation events
+ ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
+ }
+
+ /// <summary>
+ /// Removes handlers for Application activation events.
+ /// </summary>
+ private void RemoveActivationHandlers()
+ {
+ // Unsubscribe from surface application activation events
+ ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
+ }
+
+ /// <summary>
+ /// This is called when application has been activated.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationActivated(object sender, EventArgs e)
+ {
+ //TODO: enable audio, animations here
+ }
+
+ /// <summary>
+ /// This is called when application is in preview mode.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationPreviewed(object sender, EventArgs e)
+ {
+ //TODO: Disable audio here if it is enabled
+
+ //TODO: optionally enable animations here
+ }
+
+ /// <summary>
+ /// This is called when application has been deactivated.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationDeactivated(object sender, EventArgs e)
+ {
+ //TODO: disable audio, animations here
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/App.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,13 @@
+<Application x:Class="FingersDance.Control.UserPanel.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ StartupUri="SurfaceWindow1.xaml"
+ >
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/Microsoft.Surface.Presentation.Generic;v1.0.0.0;31bf3856ad364e35;component/themes\generic.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/App.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace FingersDance.Control.UserPanel
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : Application
+ {
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/FingersDance.Control.UserPanel.csproj Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,115 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}</ProjectGuid>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <RootNamespace>FingersDance.Control.UserPanel</RootNamespace>
+ <AssemblyName>FingersDance.Control.UserPanel</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <WarningLevel>4</WarningLevel>
+ <OutputType>winexe</OutputType>
+ <Install>true</Install>
+ <InstallFrom>Web</InstallFrom>
+ <UpdateEnabled>true</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>false</MapFileExtensions>
+ <ApplicationVersion>1.0.0.*</ApplicationVersion>
+ <IsWebBootstrapper>true</IsWebBootstrapper>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <PublishUrl>Publish\</PublishUrl>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <Optimize>true</Optimize>
+ <OutputPath>.\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="Microsoft.Surface" />
+ <Reference Include="Microsoft.Surface.Presentation" />
+ <Reference Include="Microsoft.Surface.Presentation.Generic" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <SubType>Designer</SubType>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ <DependentUpon>Settings.settings</DependentUpon>
+ </Compile>
+ <Compile Include="SurfaceWindow1.xaml.cs">
+ <DependentUpon>SurfaceWindow1.xaml</DependentUpon>
+ </Compile>
+ <AppDesigner Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\icon.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Content Include="Resources\iconPreview.png">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Resource Include="FingersDance.Control.UserPanel.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\WindowBackground.jpg" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="SurfaceWindow1.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/FingersDance.Control.UserPanel.xml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<!--
+This file contains the information needed to install your application
+with the Surface Shell. Please refer to the documentation for deployment
+instructions.
+-->
+<ss:ApplicationInfo
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ss="http://schemas.microsoft.com/Surface/2007/ApplicationMetadata">
+ <Application>
+ <Title>FingersDance.Control.UserPanel</Title>
+ <Description>FingersDance.Control.UserPanel</Description>
+ <ExecutableFile>FingersDance.Control.UserPanel.exe</ExecutableFile>
+ <Arguments></Arguments>
+ <IconImageFile>Resources\icon.png</IconImageFile>
+ <Preview>
+ <PreviewImageFile>Resources\iconPreview.png</PreviewImageFile>
+ </Preview>
+ <Tags>
+ <!--
+ If your application uses tagged objects, please uncomment this section to register the tags with the Shell.
+ You can register ByteTag(s), IdentityTag(s) or both by using the appropriate instructions below.
+ -->
+ <!--
+ To register ByteTags:
+ 1. Please uncomment the Byte Tag Element below.
+ 2. Replace "C0" below with the value of your Byte Tag (in hexadecimal format). Repeat this section (this element and its children) for other Byte Tags
+ 3. Please remove the Launch element if you do not want to register the tag with Object Routing.
+ -->
+ <!--
+ <ByteTag Value="C0">
+ <Actions>
+ <Launch />
+ </Actions>
+ </ByteTag>
+ -->
+ <!--
+ To register IdentityTags:
+ 1. Please uncomment the Identity Tag Element below.
+ 2. Replace "0000000000000000" below with the series of your Identity Tag (in hexadecimal format). Repeat this section (this element and its children) for other Identity Tags
+ 3. Please remove the Launch element if you do not want to register the tag with Object Routing.
+ -->
+ <!--
+ <IdentityTag Series="0000000000000000">
+ <Actions>
+ <Launch />
+ </Actions>
+ </IdentityTag>
+ -->
+ </Tags>
+ </Application>
+
+ <!--
+ Uncomment this section and comment out the Application element above
+ if you are creating an Attract Mode Application.
+ -->
+ <!--
+ <AttractApplication>
+ <ExecutableFile>FingersDance.Control.UserPanel.exe</ExecutableFile>
+ <Arguments></Arguments>
+ </AttractApplication>
+ -->
+</ss:ApplicationInfo>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/Properties/AssemblyInfo.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,62 @@
+#region Using directives
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Resources;
+using System.Globalization;
+using System.Windows;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("FingersDance.Control.UserPanel")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FingersDance.Control.UserPanel")]
+[assembly: AssemblyCopyright("Copyright @ 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+// Specifies the location in which theme dictionaries are stored for types in an assembly.
+[assembly: ThemeInfo(
+ // Specifies the location of system theme-specific resource dictionaries for this project.
+ // The default setting in this project is "None" since this default project does not
+ // include these user-defined theme files:
+ // Themes\Aero.NormalColor.xaml
+ // Themes\Classic.xaml
+ // Themes\Luna.Homestead.xaml
+ // Themes\Luna.Metallic.xaml
+ // Themes\Luna.NormalColor.xaml
+ // Themes\Royale.NormalColor.xaml
+ ResourceDictionaryLocation.None,
+
+ // Specifies the location of the system non-theme specific resource dictionary:
+ // Themes\generic.xaml
+ ResourceDictionaryLocation.SourceAssembly)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/Properties/Resources.Designer.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,72 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace FingersDance.Control.UserPanel.Properties
+{
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if (object.ReferenceEquals(resourceMan, null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFAppTemplate.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/Properties/Resources.resx Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/Properties/Settings.Designer.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3074
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace FingersDance.Control.UserPanel.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/Properties/Settings.settings Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='iso-8859-1'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile>
\ No newline at end of file
Binary file src/FingersDance.Control.UserPanel/Resources/WindowBackground.jpg has changed
Binary file src/FingersDance.Control.UserPanel/Resources/icon.png has changed
Binary file src/FingersDance.Control.UserPanel/Resources/iconPreview.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/SurfaceWindow1.xaml Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,14 @@
+<s:SurfaceWindow x:Class="FingersDance.Control.UserPanel.SurfaceWindow1"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:s="http://schemas.microsoft.com/surface/2008"
+ Title="FingersDance.Control.UserPanel"
+ >
+ <s:SurfaceWindow.Resources>
+ <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
+ </s:SurfaceWindow.Resources>
+
+ <Grid Background="{StaticResource WindowBackground}" >
+
+ </Grid>
+</s:SurfaceWindow>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Control.UserPanel/SurfaceWindow1.xaml.cs Wed Jul 29 00:55:57 2009 +0200
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+using Microsoft.Surface;
+using Microsoft.Surface.Presentation;
+using Microsoft.Surface.Presentation.Controls;
+
+namespace FingersDance.Control.UserPanel
+{
+ /// <summary>
+ /// Interaction logic for SurfaceWindow1.xaml
+ /// </summary>
+ public partial class SurfaceWindow1 : SurfaceWindow
+ {
+ /// <summary>
+ /// Default constructor.
+ /// </summary>
+ public SurfaceWindow1()
+ {
+ InitializeComponent();
+
+ // Add handlers for Application activation events
+ AddActivationHandlers();
+ }
+
+
+ /// <summary>
+ /// Occurs when the window is about to close.
+ /// </summary>
+ /// <param name="e"></param>
+ protected override void OnClosed(EventArgs e)
+ {
+ base.OnClosed(e);
+
+ // Remove handlers for Application activation events
+ RemoveActivationHandlers();
+ }
+
+ /// <summary>
+ /// Adds handlers for Application activation events.
+ /// </summary>
+ private void AddActivationHandlers()
+ {
+ // Subscribe to surface application activation events
+ ApplicationLauncher.ApplicationActivated += OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed += OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated += OnApplicationDeactivated;
+ }
+
+ /// <summary>
+ /// Removes handlers for Application activation events.
+ /// </summary>
+ private void RemoveActivationHandlers()
+ {
+ // Unsubscribe from surface application activation events
+ ApplicationLauncher.ApplicationActivated -= OnApplicationActivated;
+ ApplicationLauncher.ApplicationPreviewed -= OnApplicationPreviewed;
+ ApplicationLauncher.ApplicationDeactivated -= OnApplicationDeactivated;
+ }
+
+ /// <summary>
+ /// This is called when application has been activated.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationActivated(object sender, EventArgs e)
+ {
+ //TODO: enable audio, animations here
+ }
+
+ /// <summary>
+ /// This is called when application is in preview mode.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationPreviewed(object sender, EventArgs e)
+ {
+ //TODO: Disable audio here if it is enabled
+
+ //TODO: optionally enable animations here
+ }
+
+ /// <summary>
+ /// This is called when application has been deactivated.
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void OnApplicationDeactivated(object sender, EventArgs e)
+ {
+ //TODO: disable audio, animations here
+ }
+ }
+}
\ No newline at end of file
--- a/src/FingersDance/FingersDance.sln Thu Jul 16 22:52:01 2009 +0200
+++ b/src/FingersDance/FingersDance.sln Wed Jul 29 00:55:57 2009 +0200
@@ -13,6 +13,12 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance", "FingersDance.csproj", "{2E4DE79B-67F4-4803-8C9A-5708B4335353}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Control.UserPanel", "..\FingersDance.Control.UserPanel\FingersDance.Control.UserPanel.csproj", "{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Control.Menu", "..\FingersDance.Control.Menu\FingersDance.Control.Menu.csproj", "{6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FingersDance.Control.TimeLine", "..\FingersDance.Control.TimeLine\FingersDance.Control.TimeLine.csproj", "{2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -43,6 +49,18 @@
{2E4DE79B-67F4-4803-8C9A-5708B4335353}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E4DE79B-67F4-4803-8C9A-5708B4335353}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E4DE79B-67F4-4803-8C9A-5708B4335353}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2BCEE1BF-D3AC-478C-A26B-DFDB7420E965}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE