Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions TwVideoUp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private void App_OnStartup(object sender, StartupEventArgs e)
DispatcherUnhandledException += App_DisatacherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

SetAeroLiteStyle();

var window = new MainWindow();

Expand All @@ -42,6 +43,23 @@ private void App_OnStartup(object sender, StartupEventArgs e)
window.Show();
}

/// <summary>
/// Windows 7 等のスタイルをAero Liteに設定します。
/// </summary>
private void SetAeroLiteStyle()
{
var version = Environment.OSVersion.Version;
if (version.Major > 6 || version.Minor > 1) {
return;
}
var theme = new ResourceDictionary()
{
Source = new Uri(@"/PresentationFramework.Aero2;component/themes/aero2.normalcolor.xaml", UriKind.Relative)
};
Resources.MergedDictionaries.Add(theme);
}


/// <summary>
/// アプリケーション終了時のイベントハンドラ
/// </summary>
Expand Down
Binary file not shown.
10 changes: 10 additions & 0 deletions TwVideoUp/TwVideoUp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -85,6 +86,12 @@
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero2">
<Private>True</Private>
</Reference>
<Reference Include="PresentationFramework.AeroLite">
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -195,6 +202,9 @@
<ItemGroup>
<SplashScreen Include="Resources\splash.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Core\Tools\PresentationFramework.Aero2.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down