Full Code of Infinideastudio/NEWorld for AI

0.5.0 84e4762d014b cached
159 files
876.3 KB
229.8k tokens
785 symbols
1 requests
Download .txt
Showing preview only (930K chars total). Download the full file or copy to clipboard to get everything.
Repository: Infinideastudio/NEWorld
Branch: 0.5.0
Commit: 84e4762d014b
Files: 159
Total size: 876.3 KB

Directory structure:
gitextract_jhc26ik1/

├── .gitattributes
├── .gitignore
├── .gitmodules
├── Assets/
│   ├── GUI/
│   │   ├── InGame.xaml
│   │   ├── InventorySlot.xaml
│   │   ├── MainMenu.xaml
│   │   └── Theme/
│   │       ├── Brushes.xaml
│   │       ├── Colors.xaml
│   │       ├── Fonts.xaml
│   │       ├── NEWorld.xaml
│   │       └── Styles.xaml
│   ├── Shaders/
│   │   ├── Depth.fsh
│   │   ├── Depth.vsh
│   │   ├── Main.fsh
│   │   ├── Main.vsh
│   │   ├── Particle.fsh
│   │   ├── Particle.vsh
│   │   ├── Shadow.fsh
│   │   ├── Shadow.vsh
│   │   ├── Simple.fsh
│   │   └── Simple.vsh
│   └── Translations/
│       ├── Keys.json
│       ├── Langs.txt
│       ├── en_US.lang
│       ├── zh_CN.lang
│       └── zh_TW.lang
├── CMakeLists.txt
├── External/
│   ├── bvh/
│   │   ├── binned_sah_builder.hpp
│   │   ├── bottom_up_algorithm.hpp
│   │   ├── bounding_box.hpp
│   │   ├── bvh.hpp
│   │   ├── heuristic_primitive_splitter.hpp
│   │   ├── hierarchy_refitter.hpp
│   │   ├── leaf_collapser.hpp
│   │   ├── linear_bvh_builder.hpp
│   │   ├── locally_ordered_clustering_builder.hpp
│   │   ├── morton.hpp
│   │   ├── morton_code_based_builder.hpp
│   │   ├── node_intersectors.hpp
│   │   ├── node_layout_optimizer.hpp
│   │   ├── parallel_reinsertion_optimizer.hpp
│   │   ├── platform.hpp
│   │   ├── prefix_sum.hpp
│   │   ├── primitive_intersectors.hpp
│   │   ├── radix_sort.hpp
│   │   ├── ray.hpp
│   │   ├── sah_based_algorithm.hpp
│   │   ├── single_ray_traverser.hpp
│   │   ├── spatial_split_bvh_builder.hpp
│   │   ├── sphere.hpp
│   │   ├── sweep_sah_builder.hpp
│   │   ├── top_down_builder.hpp
│   │   ├── triangle.hpp
│   │   ├── utilities.hpp
│   │   └── vector.hpp
│   ├── stb/
│   │   └── stb_rect_pack.h
│   └── tsl/
│       ├── bhopscotch_map.h
│       ├── bhopscotch_set.h
│       ├── hopscotch_growth_policy.h
│       ├── hopscotch_hash.h
│       ├── hopscotch_map.h
│       └── hopscotch_set.h
├── NEWorld.Base/
│   ├── Common/
│   │   ├── Console.cpp
│   │   ├── Console.h
│   │   ├── Logger.cpp
│   │   └── Logger.h
│   ├── Math/
│   │   ├── Vector2.h
│   │   ├── Vector3.h
│   │   └── Vector4.h
│   └── System/
│       ├── FileSystem.h
│       ├── MessageBus.cpp
│       └── MessageBus.h
├── NEWorld.Game/
│   ├── Audio/
│   │   ├── Audio.cpp
│   │   └── Audio.h
│   ├── AudioSystem.cpp
│   ├── AudioSystem.h
│   ├── Command.h
│   ├── ControlContext.h
│   ├── Definitions.cpp
│   ├── Definitions.h
│   ├── Dispatch.cpp
│   ├── Dispatch.h
│   ├── Frustum.cpp
│   ├── Frustum.h
│   ├── FunctionsKit.cpp
│   ├── FunctionsKit.h
│   ├── GUI/
│   │   ├── GUI.cpp
│   │   ├── GUI.h
│   │   ├── InventorySlot.cpp
│   │   ├── InventorySlot.h
│   │   ├── Menus/
│   │   │   ├── MainMenu.cpp
│   │   │   └── Menus.h
│   │   ├── Noesis.cpp
│   │   └── Noesis.h
│   ├── GameSettings.cpp
│   ├── GameSettings.h
│   ├── GameView.cpp
│   ├── GameView.h
│   ├── Globalization.cpp
│   ├── Globalization.h
│   ├── Items.cpp
│   ├── Items.h
│   ├── Menus.h
│   ├── NEWorld.cpp
│   ├── Particles.cpp
│   ├── Particles.h
│   ├── Renderer/
│   │   ├── BufferBuilder.h
│   │   ├── GL/
│   │   │   ├── Objects.cpp
│   │   │   ├── Objects.h
│   │   │   ├── Pipeline.cpp
│   │   │   └── Pipeline.h
│   │   ├── Renderer.cpp
│   │   ├── Renderer.h
│   │   └── World/
│   │       ├── ChunkRenderer.cpp
│   │       ├── ChunkRenderer.h
│   │       ├── ShadowMaps.cpp
│   │       ├── ShadowMaps.h
│   │       ├── WorldRenderer.cpp
│   │       └── WorldRenderer.h
│   ├── Setup.cpp
│   ├── Setup.h
│   ├── Textures.cpp
│   ├── Textures.h
│   ├── Tick.cpp
│   ├── Tick.h
│   ├── Typedefs.h
│   ├── Universe/
│   │   ├── CommandHandler.h
│   │   ├── Entity/
│   │   │   ├── Entity.cpp
│   │   │   ├── Entity.h
│   │   │   ├── PlayerEntity.cpp
│   │   │   ├── PlayerEntity.h
│   │   │   ├── bvh.cpp
│   │   │   └── bvh.h
│   │   ├── Game.h
│   │   └── World/
│   │       ├── BlockRegistry.cpp
│   │       ├── BlockRegistry.h
│   │       ├── Blocks.cpp
│   │       ├── Blocks.h
│   │       ├── Chunk.cpp
│   │       ├── Chunk.h
│   │       ├── ChunkPtrArray.cpp
│   │       ├── ChunkPtrArray.h
│   │       ├── Data/
│   │       │   ├── BitStorage.h
│   │       │   ├── ChunkStorage.cpp
│   │       │   └── ChunkStorage.h
│   │       ├── OrderedArray.h
│   │       ├── TerrainGen/
│   │       │   ├── Carve.cpp
│   │       │   ├── Generate.h
│   │       │   ├── Heights.h
│   │       │   └── Noise.h
│   │       ├── World.cpp
│   │       └── World.h
│   ├── resource.h
│   ├── resource.rc
│   └── stdinclude.h
├── NoesisGUI/
│   ├── CMake/
│   │   └── FindNoesis.cmake
│   ├── CMakeLists.txt
│   └── bin2h.py
└── README.md

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs     diff=csharp
# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain
Assets/Fonts/**/* filter=lfs diff=lfs merge=lfs -text
Assets/Textures/**/* filter=lfs diff=lfs merge=lfs -text


================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Pp]rofile/
[Rr]elease/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/

# Visual Studio 2015 cache/options directory
.vs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings 
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
#**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# NEWorld files
[Ww]orlds/
[Ss]creen[Ss]hots/
[Cc]onfigs/
CMakeSettings.json
.idea/
Mods/
cmake-build-*

# External SDK
/External/Noesis/
/NoesisGUI/SDK/
/out/


================================================
FILE: .gitmodules
================================================
[submodule "Kaleidoscope"]
	path = Kaleidoscope
	url = https://github.com/NEWorldProject/klsxx


================================================
FILE: Assets/GUI/InGame.xaml
================================================
<Grid 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"
      xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
      xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
      mc:Ignorable="d"
      xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
      xmlns:local="clr-namespace:NEWorld"
      d:DesignWidth="1500" d:DesignHeight="900">
	<Grid.Resources>
		<SolidColorBrush x:Key="Brush.Background.Normal" Color="Black" Opacity="0.5"/>
		<SolidColorBrush x:Key="Brush.Foreground.Normal" Color="White" Opacity="1"/>
		<SolidColorBrush x:Key="Brush.Background.Pressed" Color="White" Opacity="0.2"/>
		<SolidColorBrush x:Key="Brush.Foreground.Pressed" Color="White" Opacity="1"/>
		<SolidColorBrush x:Key="Brush.Background.Over" Color="Black" Opacity="0.5"/>
		<SolidColorBrush x:Key="Brush.Border.Over" Color="White" Opacity="0.5"/>
		<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>
		<Style TargetType="TextBlock">
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>
		<BooleanToVisibilityConverter x:Key="BooleanToVisibility"/>
	</Grid.Resources>

	<!-- debug info (top left) -->
	<TextBlock x:Name="Debug"
			   VerticalAlignment="Top"
			   HorizontalAlignment="Left"
			   Margin="15"
			   Padding="2"
			   Text="{Binding DebugInfo}"
			   FontSize="16"
			   FontFamily="/#VCR OSD Mono">
		<TextBlock.Foreground>
			<SolidColorBrush Color="White"/>
		</TextBlock.Foreground>
		<TextBlock.Background>
			<SolidColorBrush Color="Black" Opacity="0.3"/>
		</TextBlock.Background>
	</TextBlock>

	<!-- cross hair -->
	<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
		<Line X1="-8" Y1="0" X2="8" Y2="0" Stroke="White" Opacity="0.5" StrokeThickness="2"  />
		<Line X1="0" Y1="-9" X2="0" Y2="8" Stroke="White" Opacity="0.5" StrokeThickness="2"  />
	</StackPanel>

	<!-- Hot bar -->
	<StackPanel x:Name="Hotbar" VerticalAlignment="Bottom" HorizontalAlignment="Center"
	            Orientation="Horizontal" Margin="0 0 0 50">
		<WrapPanel.Resources>
			<Style TargetType="local:InventorySlot">
				<Setter Property="Margin" Value="2"/>
			</Style>
		</WrapPanel.Resources>
	</StackPanel>

	<!-- Inventory -->
	<WrapPanel x:Name="Inventory" HorizontalAlignment="Center" Orientation="Horizontal"
			   VerticalAlignment="Center" ItemWidth="52" ItemHeight="52" Width="520"
			   Visibility="{Binding BagOpen, Converter={StaticResource BooleanToVisibility}}">
		<WrapPanel.Resources>
			<Style TargetType="local:InventorySlot">
				<Setter Property="Margin" Value="5"/>
			</Style>
		</WrapPanel.Resources>
	</WrapPanel>

	<!-- Health bar -->
	<Canvas VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="32 0 32 32">
		<Grid Width="250" Margin="0 0 32 32">
			<Viewbox Stretch="Uniform">
				<Grid>
					<Line X1="0" X2="{Binding HP}" Y1="0" Y2="0" Stroke="Red" Opacity="1" StrokeThickness="1"/>
					<Line X1="0" X2="{Binding HPMax}" Y1="0" Y2="0" Stroke="White" Opacity="0.5" StrokeThickness="1.5"/>
				</Grid>
			</Viewbox>
			<Grid Margin="0 0 0 10" HorizontalAlignment="Center">
				<TextBlock FontSize="12" Foreground="Black">
					<TextBlock.Text>
						<MultiBinding StringFormat="{}{0:F1}/{1:F1}">
							<Binding Path="HP"/>
							<Binding Path="HPMax"/>
						</MultiBinding>
					</TextBlock.Text>
				</TextBlock>
			</Grid>
		</Grid>
	</Canvas>

	<!-- pause menu -->
	<ViewBox x:Name="Overlay" Stretch="Fill"
			 Visibility="{Binding GamePaused, Converter={StaticResource BooleanToVisibility}}">
		<Rectangle Width="100" Height="100" Draft="Black" Opacity="0.25" />
	</ViewBox>

	<Grid x:Name="PauseMenu"
		  Visibility="{Binding GamePaused, Converter={StaticResource BooleanToVisibility}}">
		<Grid.RowDefinitions>
			<RowDefinition Height="300*"/>
			<RowDefinition Height="300*"/>
			<RowDefinition Height="100*"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="80*"/>
			<ColumnDefinition Width="300*"/>
			<ColumnDefinition Width="80*"/>
		</Grid.ColumnDefinitions>
		<Viewbox Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Bottom">
			<TextBlock Grid.Row="0" Text="Game Paused" Foreground="White"/>
		</Viewbox>
		<Viewbox Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center">
			<StackPanel>
				<Button x:Name="Resume" Content="Resume" Width="600" Height="50" Margin="0 0 0 10"/>
				<Button x:Name="Exit" Content="Exit" Width="600" Height="50" Margin="0 0 0 10"/>
			</StackPanel>
		</Viewbox>
	</Grid>
</Grid>

================================================
FILE: Assets/GUI/InventorySlot.xaml
================================================
<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
	xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
	x:Class="NEWorld.InventorySlot"
	x:Name="InventorySlot">
	<UserControl.Resources>
		<SolidColorBrush x:Key="Brush.Background.Normal" Color="White" Opacity="0.5"/>
		<SolidColorBrush x:Key="Brush.Background.Pressed" Color="Gray" Opacity="0.6"/>
		<SolidColorBrush x:Key="Brush.Background.Over" Color="Gray" Opacity="0.5"/>
		<SolidColorBrush x:Key="Brush.Background.Selected" Color="Green" Opacity="0.3"/>
		<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush" Value="White"/>
		</Style>
		<Style TargetType="TextBlock">
			<Setter Property="FontSize" Value="15"/>
			<Setter Property="Foreground" Value="Black"/>
			<Setter Property="HorizontalAlignment" Value="Right"/>
			<Setter Property="VerticalAlignment" Value="Bottom"/>
			<Setter Property="Margin" Value="0" />
			<Setter Property="Stroke" Value="White" />
			<Setter Property="StrokeThickness" Value="2" />
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>
		<BooleanToVisibilityConverter x:Key="BooleanToVisibility"/>
	</UserControl.Resources>

	<Button Width="44" Height="44">
		<b:Interaction.Triggers>
			<ei:DataTrigger Binding="{Binding Selected, ElementName=InventorySlot}" Value="True">
				<ei:ChangePropertyAction PropertyName="Background" Value="{StaticResource Brush.Background.Selected}" />
			</ei:DataTrigger>
			<ei:DataTrigger Binding="{Binding Selected, ElementName=InventorySlot}" Value="False">
				<ei:ChangePropertyAction PropertyName="Background" Value="{StaticResource Brush.Background.Normal}" />
			</ei:DataTrigger>
		</b:Interaction.Triggers>
		<Grid>
			<Image x:Name="ItemTexture" Width="32" Height="32"/>
			<TextBlock Text="{Binding Amount, ElementName=InventorySlot}">
				<b:Interaction.Triggers>
					<ei:DataTrigger Binding="{Binding Amount, ElementName=InventorySlot}" Value="0">
						<ei:ChangePropertyAction PropertyName="Visibility" Value="Collapsed" />
					</ei:DataTrigger>
					<ei:DataTrigger Binding="{Binding Amount, ElementName=InventorySlot}" Comparison="NotEqual" Value="0">
						<ei:ChangePropertyAction PropertyName="Visibility" Value="Visible" />
					</ei:DataTrigger>
				</b:Interaction.Triggers>
			</TextBlock>
		</Grid>
	</Button>
</UserControl>


================================================
FILE: Assets/GUI/MainMenu.xaml
================================================
<Grid 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"
      xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
      xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
      mc:Ignorable="d"
      xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
      d:DesignWidth="1500" d:DesignHeight="900">
	<!-- styles -->
	<Grid.Resources>
		<SolidColorBrush x:Key="Brush.Background.Normal" Color="Black" Opacity="0.5"/>
		<SolidColorBrush x:Key="Brush.Foreground.Normal" Color="White" Opacity="1"/>
		<SolidColorBrush x:Key="Brush.Background.Pressed" Color="Black" Opacity="0.8"/>
		<SolidColorBrush x:Key="Brush.Foreground.Pressed" Color="White" Opacity="1"/>
		<SolidColorBrush x:Key="Brush.Background.Over" Color="Black" Opacity="0.5"/>
		<SolidColorBrush x:Key="Brush.Border.Over" Color="White" Opacity="0.5"/>
		<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>
		<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>
		<Style TargetType="TextBlock">
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>
		<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
			<Setter Property="FontFamily" Value="/#VCR OSD Mono"/>
		</Style>

		<!-- story boards -->
		<Storyboard x:Key="MainMenu">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainMenuView">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="MainMenuView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="True"/>
			</BooleanAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SettingsView">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SettingsView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
			</BooleanAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectWorldView">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SelectWorldView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
			</BooleanAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Settings">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainMenuView">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="MainMenuView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
			</BooleanAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SettingsView">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SettingsView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="True"/>
			</BooleanAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectWorldView">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SelectWorldView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
			</BooleanAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="SelectWorld">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainMenuView">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="MainMenuView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
			</BooleanAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SettingsView">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SettingsView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
			</BooleanAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectWorldView">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="SelectWorldView">
				<DiscreteBooleanKeyFrame KeyTime="0" Value="True"/>
			</BooleanAnimationUsingKeyFrames>
		</Storyboard>
	</Grid.Resources>

	<!-- states -->
	<VisualStateManager.VisualStateGroups>
		<VisualStateGroup x:Name="States">
			<VisualState x:Name="MainMenu" Storyboard="{StaticResource MainMenu}"/>
			<VisualState x:Name="Settings" Storyboard="{StaticResource Settings}"/>
			<VisualState x:Name="SelectWorld" Storyboard="{StaticResource SelectWorld}"/>
		</VisualStateGroup>
	</VisualStateManager.VisualStateGroups>

	<b:Interaction.Triggers>
		<ei:DataTrigger Binding="{Binding State}" Value="{Binding State}">
			<ei:GoToStateAction StateName="{Binding State}"/>
		</ei:DataTrigger>
	</b:Interaction.Triggers>

	<Grid.ColumnDefinitions>
		<ColumnDefinition Width="80*"/>
		<ColumnDefinition Width="300*"/>
		<ColumnDefinition Width="80*"/>
	</Grid.ColumnDefinitions>

	<!-- Main Menu -->
	<Grid x:Name="MainMenuView" Grid.Column="1">
		<Grid.RowDefinitions>
			<RowDefinition Height="300*"/>
			<RowDefinition Height="300*"/>
			<RowDefinition Height="100*"/>
		</Grid.RowDefinitions>

		<Image Source="GUI/title.png" VerticalAlignment="Center" />
		<Viewbox Grid.Row="1" VerticalAlignment="Center" Stretch="Uniform">
			<StackPanel>
				<Button x:Name="startGame" Content="Start Game" Margin="0 0 0 10" Height="50" Width="600" />
				<Button x:Name="settings" Content="Settings" Margin="0 0 0 10" Height="50" Width="600" />
				<Button x:Name="exit" Content="Exit" Margin="0 0 0 10" Height="50" Width="600"/>
			</StackPanel>
		</Viewbox>
	</Grid>

	<!-- Settings View -->
	<Grid x:Name="SettingsView" Grid.Column="1">
		<Grid.RowDefinitions>
			<RowDefinition Height="120*"/>
			<RowDefinition Height="400*"/>
			<RowDefinition Height="50*"/>
		</Grid.RowDefinitions>
		<TextBlock Grid.Row="0" Text="Settings" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="64"/>
		<Viewbox Grid.Row="1" Stretch="Uniform" VerticalAlignment="Center">
			<StackPanel Width="Auto">
				<StackPanel TextElement.Foreground="White">
					<StackPanel.Background>
						<SolidColorBrush Color="Black" Opacity="0.8"/>
					</StackPanel.Background>
					<TextBlock Text="Rendering" FontSize="20" Margin="20,10,0,20" HorizontalAlignment="Left"/>
					<Grid Margin="20,0,20,0">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="1*"/>
							<ColumnDefinition Width="3*"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="1*"/>
							<RowDefinition Height="1*"/>
							<RowDefinition Height="1*"/>
						</Grid.RowDefinitions>
						<TextBlock Grid.Column="0" Grid.Row="0" FontSize="16" HorizontalAlignment="Left"
								   Text="{Binding FOV, StringFormat=FOV ({0})}"/>
						<Slider Grid.Column="1" Grid.Row="0" Width="300" Height="30" Margin="8,0,0,0" TickPlacement="TopLeft"
								Minimum="1" Maximum="120" Value="{Binding FOV, Mode=TwoWay}" Interval="1"/>

						<TextBlock Grid.Column="0" Grid.Row="1" FontSize="16" HorizontalAlignment="Left"
								   Text="{Binding RenderDistance, StringFormat=Render Distance ({0} chunks)}"/>
						<Slider Grid.Column="1" Grid.Row="1" Width="300" Height="30" Margin="8,0,0,0" TickPlacement="TopLeft"
								Minimum="0" Maximum="8" Value="{Binding RenderDistanceTick, Mode=TwoWay}" Interval="1" IsSnapToTickEnabled="True" />

						<TextBlock Grid.Column="0" Grid.Row="2" FontSize="16" HorizontalAlignment="Left"
								   Text="{Binding MouseSensitivity, StringFormat=Mouse Sensitivity ({0:F2})}"/>
						<Slider Grid.Column="1" Grid.Row="2" Width="300" Height="30" Margin="8,0,0,0" TickPlacement="TopLeft"
								Minimum="0" Maximum="1" Value="{Binding MouseSensitivity, Mode=TwoWay}"/>

					</Grid>
					<CheckBox Margin="20,8,0,0" IsChecked="{Binding SmoothLighting, Mode=TwoWay}">Smooth lighting</CheckBox>
					<CheckBox Margin="20,8,0,0" IsChecked="{Binding NiceGrass, Mode=TwoWay}">Nice Grass</CheckBox>
					<CheckBox Margin="20,8,0,0" IsChecked="{Binding VSync, Mode=TwoWay}">VSync</CheckBox>
					<CheckBox Margin="20,8,0,20" IsChecked="{Binding Shadows, Mode=TwoWay}">Shadows</CheckBox>
				</StackPanel>
				<Button x:Name="Save" Content="Save" Margin="0 10 0 0"></Button>
			</StackPanel>
		</Viewbox>
	</Grid>
	<!-- Select World View -->
	<Grid x:Name="SelectWorldView" Grid.Column="1">
		<Grid.RowDefinitions>
			<RowDefinition Height="120*"/>
			<RowDefinition Height="400*"/>
			<RowDefinition Height="50*"/>
		</Grid.RowDefinitions>
		<TextBlock Grid.Row="0" Text="Select World" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="64"/>
		<Viewbox Grid.Row="1" Stretch="Uniform" VerticalAlignment="Center">
			<StackPanel TextElement.Foreground="White">
				<ListBox
				  x:Name="WorldList"
				  SelectionMode="Single"
				  Height="300"
				  ItemsSource="{Binding Worlds}"
				  ItemTemplate="{DynamicResource WorldItemTemplate}">
					<ListBox.Background>
						<SolidColorBrush Color="Black" Opacity="0.5"/>
					</ListBox.Background>

					<ListBox.Resources>
						<SolidColorBrush x:Key="Brush.Item.Over" Color="White" Opacity="0.2"/>
						<SolidColorBrush x:Key="Brush.Item.Selected" Color="Green" Opacity="0.6"/>
						<SolidColorBrush x:Key="Brush.Item.SelectedOver" Color="Green" Opacity="0.8"/>
						<!-- Select World - Item Template -->
						<DataTemplate x:Key="WorldItemTemplate">
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<TextBlock Text="{Binding Name}"
								           FontSize="16" FontFamily="/#VCR OSD Mono"
								           Margin="10"/>
							</Grid>
						</DataTemplate>
					</ListBox.Resources>
				</ListBox>
				<StackPanel Orientation="Horizontal" Margin="0 10 0 0">
					<TextBox x:Name="NewWorldNameTextBox" Foreground="Black" Placeholder="World Name" MinWidth="200"/>
					<Button x:Name="Create" Content="Create" Margin="10 0 0 0"></Button>
				</StackPanel>
				<Button x:Name="Back" Content="Back" Margin="0 10 0 0"></Button>
			</StackPanel>
		</Viewbox>
	</Grid>
</Grid>

================================================
FILE: Assets/GUI/Theme/Brushes.xaml
================================================
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Colors.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Color x:Key="Color.Accent">#FF2AA60C</Color>

    <Color x:Key="Color.Accent0">#FF5AB541</Color>
    <Color x:Key="Color.Accent1">#FF43B324</Color>
    <Color x:Key="Color.Accent2">#FF218C08</Color>
    <Color x:Key="Color.Accent3">#FF187306</Color>

    <SolidColorBrush x:Key="Brush.Window.Background" Color="{StaticResource Color.White}" />

    <SolidColorBrush x:Key="Brush.Glyph.Normal" Color="{StaticResource Color.Gray0}" />
    <SolidColorBrush x:Key="Brush.Glyph.Over" Color="{StaticResource Color.Black}" />
    <SolidColorBrush x:Key="Brush.Glyph.Pressed" Color="{StaticResource Color.White}" />
    <SolidColorBrush x:Key="Brush.Glyph.Checked" Color="{StaticResource Color.White}" />
    <SolidColorBrush x:Key="Brush.Glyph.Disabled" Color="{StaticResource Color.Gray2}" />
    <SolidColorBrush x:Key="Brush.Glyph.DisabledChecked" Color="{StaticResource Color.Gray8}" />

    <SolidColorBrush x:Key="Brush.Foreground.Normal" Color="{StaticResource Color.Black}" />
    <SolidColorBrush x:Key="Brush.Foreground.Placeholder" Color="{StaticResource Color.Gray2}" />
    <SolidColorBrush x:Key="Brush.Foreground.Disabled" Color="{StaticResource Color.Gray2}" />
    <SolidColorBrush x:Key="Brush.Foreground.DisabledChecked" Color="{StaticResource Color.Accent0}" />
    <SolidColorBrush x:Key="Brush.Foreground.DisabledPlaceholder" Color="{StaticResource Color.Gray4}" />

    <SolidColorBrush x:Key="Brush.Background.Normal" Color="{StaticResource Color.Gray5}" />
    <SolidColorBrush x:Key="Brush.Background.Pressed" Color="{StaticResource Color.Gray3}" />
    <SolidColorBrush x:Key="Brush.Background.Checked" Color="{StaticResource Color.Accent2}" />
    <SolidColorBrush x:Key="Brush.Background.Popup" Color="{StaticResource Color.Gray9}" />

    <SolidColorBrush x:Key="Brush.Border.Normal" Color="{StaticResource Color.Gray3}" />
    <SolidColorBrush x:Key="Brush.Border.Over" Color="{StaticResource Color.Gray1}" />
    <SolidColorBrush x:Key="Brush.Border.Pressed" Color="{StaticResource Color.Gray2}" />
    <SolidColorBrush x:Key="Brush.Border.Checked" Color="{StaticResource Color.Accent1}" />
    <SolidColorBrush x:Key="Brush.Border.Focus" Color="{StaticResource Color.Black}" />
    <SolidColorBrush x:Key="Brush.Border.FocusAccent" Color="{StaticResource Color.Accent}" />
    <SolidColorBrush x:Key="Brush.Border.Disabled" Color="{StaticResource Color.Gray5}" />
    <SolidColorBrush x:Key="Brush.Border.DisabledChecked" Color="{StaticResource Color.Accent3}" />
    <SolidColorBrush x:Key="Brush.Border.Popup" Color="{StaticResource Color.Gray6}" />

    <SolidColorBrush x:Key="Brush.Track.Normal" Color="{StaticResource Color.Gray7}" />

    <SolidColorBrush x:Key="Brush.Thumb.Normal" Color="{StaticResource Color.Gray3}" />
    <SolidColorBrush x:Key="Brush.Thumb.Over" Color="{StaticResource Color.Gray1}" />
    <SolidColorBrush x:Key="Brush.Thumb.Pressed" Color="{StaticResource Color.Gray1}" />
    <SolidColorBrush x:Key="Brush.Thumb.Disabled" Color="{StaticResource Color.Gray5}" />

    <SolidColorBrush x:Key="Brush.Header.Normal" Color="{StaticResource Color.Gray7}" />
    <SolidColorBrush x:Key="Brush.Header.Over" Color="{StaticResource Color.Gray6}" />
    <SolidColorBrush x:Key="Brush.Header.Pressed" Color="{StaticResource Color.Gray5}" />
    <SolidColorBrush x:Key="Brush.Header.Checked" Color="{StaticResource Color.Accent3}" />
    <SolidColorBrush x:Key="Brush.Header.CheckedOver" Color="{StaticResource Color.Accent2}" />
    <SolidColorBrush x:Key="Brush.Header.CheckedPressed" Color="{StaticResource Color.Accent}" />

    <SolidColorBrush x:Key="Brush.Hyperlink.Normal" Color="{StaticResource Color.Accent}" />
    <SolidColorBrush x:Key="Brush.Hyperlink.Over" Color="{StaticResource Color.Black}" />

    <SolidColorBrush x:Key="Brush.TextBox.Normal" Color="{StaticResource Color.Gray9}" />
    <SolidColorBrush x:Key="Brush.TextBox.Focused" Color="{StaticResource Color.White}" />

    <SolidColorBrush x:Key="Brush.Item.Over" Color="{StaticResource Color.Gray6}" />
    <SolidColorBrush x:Key="Brush.Item.Selected" Color="{StaticResource Color.Accent3}" />
    <SolidColorBrush x:Key="Brush.Item.SelectedOver" Color="{StaticResource Color.Accent2}" />

    <SolidColorBrush x:Key="Brush.ComboBox.Normal" Color="{StaticResource Color.Gray9}" />
    <SolidColorBrush x:Key="Brush.ComboBox.Over" Color="{StaticResource Color.Gray6}" />
    <SolidColorBrush x:Key="Brush.ComboBox.Pressed" Color="{StaticResource Color.Gray5}" />
    <SolidColorBrush x:Key="Brush.ComboBox.Edit" Color="{StaticResource Color.White}" />

    <SolidColorBrush x:Key="Brush.TabControl.Normal" Color="{StaticResource Color.Gray8}" />
    <SolidColorBrush x:Key="Brush.TabControl.Over" Color="{StaticResource Color.Gray9}" />
    <SolidColorBrush x:Key="Brush.TabControl.Selected" Color="{StaticResource Color.Accent2}" />

    <SolidColorBrush x:Key="Brush.TreeView.Collapsed" Color="{StaticResource Color.Gray1}" />
    <SolidColorBrush x:Key="Brush.TreeView.Expanded" Color="{StaticResource Color.Black}" />
    <SolidColorBrush x:Key="Brush.TreeView.Over" Color="{StaticResource Color.Accent}" />
    <SolidColorBrush x:Key="Brush.TreeView.SelectedOver" Color="{StaticResource Color.Accent0}" />

    <SolidColorBrush x:Key="Brush.ToolBar.Normal" Color="{StaticResource Color.Gray8}" />
    <SolidColorBrush x:Key="Brush.ToolBar.Over" Color="{StaticResource Color.Gray6}" />
    <SolidColorBrush x:Key="Brush.ToolBar.Pressed" Color="{StaticResource Color.Gray5}" />
    <SolidColorBrush x:Key="Brush.ToolBar.Checked" Color="{StaticResource Color.Accent2}" />

</ResourceDictionary>

================================================
FILE: Assets/GUI/Theme/Colors.xaml
================================================
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Color x:Key="Color.Black">#20282f</Color>

    <Color x:Key="Color.Gray0">#41484e</Color>
    <Color x:Key="Color.Gray1">#5d6469</Color>
    <Color x:Key="Color.Gray2">#7b8085</Color>
    <Color x:Key="Color.Gray3">#93979b</Color>
    <Color x:Key="Color.Gray4">#abaeb2</Color>
    <Color x:Key="Color.Gray5">#bbbec1</Color>
    <Color x:Key="Color.Gray6">#cbced0</Color>
    <Color x:Key="Color.Gray7">#dcdee0</Color>
    <Color x:Key="Color.Gray8">#e5e6e8</Color>
    <Color x:Key="Color.Gray9">#edeff0</Color>

    <Color x:Key="Color.White">#f6f7f8</Color>

</ResourceDictionary>

================================================
FILE: Assets/GUI/Theme/Fonts.xaml
================================================
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <FontFamily x:Key="Font.Family.Default">#Consolas</FontFamily>
    <sys:Double x:Key="Font.Size.Header">17</sys:Double>
    <sys:Double x:Key="Font.Size.Normal">15</sys:Double>
    <sys:Double x:Key="Font.Size.ToolTip">12</sys:Double>

</ResourceDictionary>

================================================
FILE: Assets/GUI/Theme/NEWorld.xaml
================================================
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml" />
        <ResourceDictionary Source="Fonts.xaml" />
        <ResourceDictionary Source="Styles.xaml" />
    </ResourceDictionary.MergedDictionaries>

</ResourceDictionary>

================================================
FILE: Assets/GUI/Theme/Styles.xaml
================================================
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sys="clr-namespace:System;assembly=mscorlib"
  xmlns:local="clr-namespace:NoesisGUIExtensions">

  <sys:Double x:Key="Size.ScrollBar">17</sys:Double>
  <sys:Double x:Key="Size.GroupBox.Border">1</sys:Double>

  <Thickness x:Key="Border.Normal">0</Thickness>
  <Thickness x:Key="Border.Box">1</Thickness>
  <Thickness x:Key="Border.Over">2</Thickness>
  <Thickness x:Key="Border.Focus">2</Thickness>

  <Thickness x:Key="Margin.Focus.Uniform">-3</Thickness>
  <Thickness x:Key="Margin.Focus.Padded">-8,-3</Thickness>

  <CornerRadius x:Key="Corner.Border0">1.75</CornerRadius>
  <CornerRadius x:Key="Corner.Border0.Top">1.75,1.75,0,0</CornerRadius>
  <CornerRadius x:Key="Corner.Border0.Bottom">0,0,1.75,1.75</CornerRadius>
  <CornerRadius x:Key="Corner.Border0.Left">1.75,0,0,1.75</CornerRadius>
  <CornerRadius x:Key="Corner.Border0.Right">0,1.75,1.75,0</CornerRadius>
  <CornerRadius x:Key="Corner.Border1">1.25</CornerRadius>
  <CornerRadius x:Key="Corner.Border1.Top">1.25,1.25,0,0</CornerRadius>
  <CornerRadius x:Key="Corner.Border1.Bottom">0,0,1.25,1.25</CornerRadius>
  <CornerRadius x:Key="Corner.Border1.Left">1.25,0,0,1.25</CornerRadius>
  <CornerRadius x:Key="Corner.Border1.Right">0,1.25,1.25,0</CornerRadius>
  <CornerRadius x:Key="Corner.Border2">0.75</CornerRadius>
  <CornerRadius x:Key="Corner.Border2.Top">0.75,0.75,0,0</CornerRadius>
  <CornerRadius x:Key="Corner.Border2.Bottom">0,0,0.75,0.75</CornerRadius>
  <CornerRadius x:Key="Corner.Border2.Left">0.75,0,0,0.75</CornerRadius>
  <CornerRadius x:Key="Corner.Border2.Right">0,0.75,0.75,0</CornerRadius>
  <CornerRadius x:Key="Corner.Focus">0</CornerRadius>
  <CornerRadius x:Key="Corner.Popup">3</CornerRadius>

  <!-- Focus Styles -->
  <Style x:Key="Style.Focus.Outer.Uniform" TargetType="Control">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Control">
          <Border BorderThickness="{DynamicResource Border.Focus}" BorderBrush="{DynamicResource Brush.Border.Focus}" Margin="{DynamicResource Margin.Focus.Uniform}" CornerRadius="{DynamicResource Corner.Focus}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="Style.Focus.Outer.Padded" TargetType="Control">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Control">
          <Border BorderThickness="{DynamicResource Border.Focus}" BorderBrush="{DynamicResource Brush.Border.Focus}" Margin="{DynamicResource Margin.Focus.Padded}" CornerRadius="{DynamicResource Corner.Focus}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="Style.Focus.Inner.Uniform" TargetType="Control">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Control">
          <Border BorderThickness="{DynamicResource Border.Focus}" BorderBrush="{DynamicResource Brush.Border.Focus}" CornerRadius="{DynamicResource Corner.Focus}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- Base Control Styles -->
  <Style x:Key="Style.Base">
    <Setter Property="Control.Foreground" Value="{DynamicResource Brush.Foreground.Normal}"/>
    <Setter Property="Control.HorizontalContentAlignment" Value="Stretch"/>
    <Setter Property="Control.VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
  </Style>
  <Style TargetType="Control" BasedOn="{StaticResource Style.Base}"/>
  <Style TargetType="ContentControl" BasedOn="{StaticResource Style.Base}"/>
  <Style TargetType="HeaderedContentControl" BasedOn="{StaticResource Style.Base}"/>
  <Style TargetType="ItemsControl" BasedOn="{StaticResource Style.Base}">
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  </Style>
  <Style TargetType="HeaderedItemsControl" BasedOn="{StaticResource Style.Base}">
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  </Style>
  <Style TargetType="UserControl" BasedOn="{StaticResource Style.Base}"/>
  <Style TargetType="Page" BasedOn="{StaticResource Style.Base}"/>
  <Style TargetType="Separator">
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Normal}"/>
  </Style>

  <!-- ToolTip -->
  <ControlTemplate x:Key="Template.ToolTip" TargetType="ToolTip">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="{DynamicResource Corner.Popup}" Padding="{TemplateBinding Padding}">
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    </Border>
  </ControlTemplate>
  <Style TargetType="ToolTip">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="FontSize" Value="{DynamicResource Font.Size.ToolTip}"/>
    <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Normal}"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Popup}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Popup}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="8,6"/>
    <Setter Property="Placement" Value="Mouse"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource Template.ToolTip}"/>
  </Style>

  <!-- Label -->
  <ControlTemplate x:Key="Template.Label" TargetType="Label">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="Label" BasedOn="{StaticResource {x:Type Control}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.Label}"/>
  </Style>

  <!-- Button/RepeatButton -->
  <ControlTemplate x:Key="Template.ButtonBase" TargetType="ButtonBase">
    <Grid x:Name="TemplateRoot" RenderTransformOrigin="0.5,0.5">
      <Grid.RenderTransform>
        <ScaleTransform />
      </Grid.RenderTransform>
      <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border0}"/>
      <ContentPresenter x:Name="PART_ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Grid>
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Press">
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleX" To="0.99" Duration="0:0:0.1" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0.99" Duration="0:0:0.1" DecelerationRatio="0.25"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Release">
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.2" DecelerationRatio="1"/>
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2" DecelerationRatio="1"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
	    <Setter Property="Background" Value="{DynamicResource Brush.Background.Over}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Press}"/>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Release}"/>
        </Trigger.ExitActions>
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Pressed}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="Style.ButtonBase" TargetType="ButtonBase" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Normal}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8,7"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.ButtonBase}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
  </Style>
  <Style TargetType="Button" BasedOn="{StaticResource Style.ButtonBase}"/>
  <Style TargetType="RepeatButton" BasedOn="{StaticResource Style.ButtonBase}"/>

  <!-- ToggleButton -->
  <ControlTemplate x:Key="Template.ToggleButton" TargetType="ToggleButton">
    <Grid x:Name="TemplateRoot" RenderTransformOrigin="0.5,0.5">
      <Grid.RenderTransform>
        <ScaleTransform />
      </Grid.RenderTransform>
      <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border0}"/>
      <ContentPresenter x:Name="PART_ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Grid>
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Press">
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleX" To="0.99" Duration="0:0:0.1" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0.99" Duration="0:0:0.1" DecelerationRatio="0.25"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Release">
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.2" DecelerationRatio="1"/>
        <DoubleAnimation Storyboard.TargetName="TemplateRoot" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2" DecelerationRatio="1"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Press}"/>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Release}"/>
        </Trigger.ExitActions>
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Pressed}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Checked}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsChecked" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.DisabledChecked}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="Border"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Normal}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="8,7"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.ToggleButton}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
  </Style>

  <!-- ToggleSwitch -->
  <ControlTemplate x:Key="Template.ToggleSwitch" TargetType="ToggleButton">
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Loaded">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="Root">
          <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
      <Storyboard x:Key="Anim.Check.Loaded">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.X" Storyboard.TargetName="Knob" To="24" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Check">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.X" Storyboard.TargetName="Knob" To="24" Duration="0:0:0.2" DecelerationRatio="1"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Uncheck">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.X" Storyboard.TargetName="Knob" To="0" Duration="0:0:0.2" DecelerationRatio="1"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="Root" Background="Transparent" Tag="0">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}"/>
      <Border x:Name="Border" Grid.Column="0" Background="{DynamicResource Brush.Background.Normal}" BorderBrush="{DynamicResource Brush.Border.Normal}" BorderThickness="{DynamicResource Border.Normal}" Width="44" Height="20" CornerRadius="10" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
      <Decorator Margin="{TemplateBinding BorderThickness}">
        <Ellipse x:Name="Knob" Grid.Column="0" Width="10" Height="10" Margin="5" HorizontalAlignment="Left" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Fill="{DynamicResource Brush.Glyph.Normal}">
          <Ellipse.RenderTransform>
            <TranslateTransform/>
          </Ellipse.RenderTransform>
        </Ellipse>
      </Decorator>
      <ContentPresenter x:Name="PART_ContentPresenter" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Grid>
    <ControlTemplate.Triggers>
      <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Root">
        <BeginStoryboard Storyboard="{StaticResource Anim.Loaded}"/>
      </EventTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="9" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Knob"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Pressed}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="10" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Pressed}" TargetName="Knob"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Checked}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Checked}" TargetName="Knob"/>
      </Trigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Check.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Check}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Uncheck}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Knob"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsChecked" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.DisabledChecked}" TargetName="Knob"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="Style.ToggleSwitch" TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="6,0,0,0"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.ToggleSwitch}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Padded}"/>
  </Style>

  <!-- CheckBox -->
  <Geometry x:Key="Geometry.CheckBox.Check">M0,7.5L5.5,12.5 14,2.75 11.75,1 5.5,9 1.5,5.5z</Geometry>
  <ControlTemplate x:Key="Template.CheckBox" TargetType="CheckBox">
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Loaded">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="Root">
          <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
      <Storyboard x:Key="Anim.Check.Loaded">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" Storyboard.TargetName="Check" To="1" Duration="0"/>
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" Storyboard.TargetName="Check" To="1" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Check">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" Storyboard.TargetName="Check" To="1" Duration="0:0:0.1" DecelerationRatio="1"/>
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" Storyboard.TargetName="Check" To="1" Duration="0:0:0.1" DecelerationRatio="1"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Uncheck">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" Storyboard.TargetName="Check" To="0" Duration="0:0:0.2" DecelerationRatio="1"/>
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" Storyboard.TargetName="Check" To="0" Duration="0:0:0.2" DecelerationRatio="1"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="Root" Background="Transparent" Tag="0">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}"/>
      <Border x:Name="Border" Grid.Column="0" Background="{DynamicResource Brush.Background.Normal}" BorderBrush="{DynamicResource Brush.Border.Normal}" BorderThickness="{DynamicResource Border.Normal}" CornerRadius="{DynamicResource Corner.Border0}" Width="20" Height="20" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
      <Decorator Grid.Column="0" Margin="{TemplateBinding BorderThickness}" Width="20" Height="20" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
        <Grid>
          <Path x:Name="Check" Data="{StaticResource Geometry.CheckBox.Check}" Width="14" Height="14" Fill="{DynamicResource Brush.Glyph.Checked}" RenderTransformOrigin="0.5,0.5">
            <Path.RenderTransform>
              <ScaleTransform ScaleX="0" ScaleY="0"/>
            </Path.RenderTransform>
          </Path>
          <Rectangle x:Name="CheckIndeterminate" Width="10" Height="10" Fill="{DynamicResource Brush.Glyph.Normal}" Visibility="Collapsed"/>
        </Grid>
      </Decorator>
      <ContentPresenter x:Name="PART_ContentPresenter" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Grid>
    <ControlTemplate.Triggers>
      <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Root">
        <BeginStoryboard Storyboard="{StaticResource Anim.Loaded}"/>
      </EventTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Pressed}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Checked}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}" TargetName="Border"/>
      </Trigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Check.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Check}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Uncheck}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsThreeState" Value="True"/>
          <Condition Property="IsChecked" Value="{x:Null}"/>
        </MultiTrigger.Conditions>
        <Setter Property="Visibility" Value="Collapsed" TargetName="Check"/>
        <Setter Property="Visibility" Value="Visible" TargetName="CheckIndeterminate"/>
      </MultiTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Check"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="CheckIndeterminate"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsChecked" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.DisabledChecked}" TargetName="Check"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="6,0,0,0"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.CheckBox}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Padded}"/>
  </Style>

  <!-- RadioButton -->
  <ControlTemplate x:Key="Template.RadioButton" TargetType="RadioButton">
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Loaded">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="Root">
          <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
      <Storyboard x:Key="Anim.Check.Loaded">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" Storyboard.TargetName="Check" To="1" Duration="0"/>
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" Storyboard.TargetName="Check" To="1" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Check">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" Storyboard.TargetName="Check" To="1" Duration="0:0:0.1" DecelerationRatio="1"/>
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" Storyboard.TargetName="Check" To="1" Duration="0:0:0.1" DecelerationRatio="1"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Uncheck">
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" Storyboard.TargetName="Check" To="0" Duration="0:0:0.2" DecelerationRatio="1"/>
        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" Storyboard.TargetName="Check" To="0" Duration="0:0:0.2" DecelerationRatio="1"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="Root" Background="Transparent" Tag="0">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Border Grid.ColumnSpan="2" Background="{TemplateBinding Background}"/>
      <Border x:Name="Border" Grid.Column="0" Background="{DynamicResource Brush.Background.Normal}" BorderBrush="{DynamicResource Brush.Border.Normal}" BorderThickness="{DynamicResource Border.Normal}" Width="20" Height="20" CornerRadius="10" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
      <Decorator Grid.Column="0" Margin="{TemplateBinding BorderThickness}" Width="20" Height="20" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
        <Ellipse x:Name="Check" Width="10" Height="10" Fill="{DynamicResource Brush.Glyph.Checked}" RenderTransformOrigin="0.5,0.5">
          <Ellipse.RenderTransform>
            <ScaleTransform ScaleX="0" ScaleY="0"/>
          </Ellipse.RenderTransform>
        </Ellipse>
      </Decorator>
      <ContentPresenter x:Name="PART_ContentPresenter" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Grid>
    <ControlTemplate.Triggers>
      <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Root">
        <BeginStoryboard Storyboard="{StaticResource Anim.Loaded}"/>
      </EventTrigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Pressed}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Background.Checked}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}" TargetName="Border"/>
      </Trigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Check.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Check}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Uncheck}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Check"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsChecked" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="Border"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.DisabledChecked}" TargetName="Check"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="RadioButton" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Normal}"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="6,0,0,0"/>
    <Setter Property="UseLayoutRounding" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.RadioButton}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Padded}"/>
  </Style>

  <!-- ProgressBar -->
  <ControlTemplate x:Key="Template.ProgressBar" TargetType="ProgressBar">
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Indeterminate">
        <DoubleAnimation Storyboard.TargetProperty="Background.RelativeTransform.X" Storyboard.TargetName="IndicatorIndeterminate" From="-1" To="1" Duration="0:0:2" RepeatBehavior="Forever"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="TemplateRoot" MinHeight="4">
      <Border x:Name="PART_Track" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
        <Grid>
          <Border x:Name="PART_Indicator" Background="{TemplateBinding Foreground}" HorizontalAlignment="Left"/>
          <Border x:Name="IndicatorIndeterminate" Visibility="Collapsed">
            <Border.Background>
              <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                <LinearGradientBrush.RelativeTransform>
                  <TranslateTransform />
                </LinearGradientBrush.RelativeTransform>
                <GradientStop Color="{Binding Background.Color, RelativeSource={RelativeSource TemplatedParent}}" Offset="0"/>
                <GradientStop Color="{Binding Foreground.Color, RelativeSource={RelativeSource TemplatedParent}}" Offset="0.5"/>
                <GradientStop Color="{Binding Background.Color, RelativeSource={RelativeSource TemplatedParent}}" Offset="1"/>
              </LinearGradientBrush>
            </Border.Background>
          </Border>
        </Grid>
      </Border>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="LayoutTransform" TargetName="TemplateRoot">
          <Setter.Value>
            <RotateTransform Angle="-90"/>
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="IsIndeterminate" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Indeterminate}"/>
        </Trigger.EnterActions>
        <Setter Property="Visibility" Value="Collapsed" TargetName="PART_Indicator"/>
        <Setter Property="Visibility" Value="Visible" TargetName="IndicatorIndeterminate"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Border.DisabledChecked}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ProgressBar" BasedOn="{StaticResource {x:Type Control}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Foreground" Value="{DynamicResource Brush.Background.Checked}"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Normal}"/>
    <Setter Property="Template" Value="{StaticResource Template.ProgressBar}"/>
  </Style>

  <!-- Slider -->
  <Style x:Key="Style.Slider.Thumb" TargetType="Thumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Thumb">
          <Grid Background="Transparent">
            <Ellipse x:Name="Thumb" Fill="{TemplateBinding Background}" Width="20" Height="20" Margin="-8"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsDragging" Value="True">
              <Setter Property="Fill" Value="{DynamicResource Brush.Thumb.Pressed}" TargetName="Thumb"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Draft" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="Thumb"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="Style.Slider.RepeatButton" TargetType="RepeatButton" BasedOn="{StaticResource {x:Type RepeatButton}}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="ClickMode" Value="Press"/>
    <Setter Property="Delay" Value="250"/>
    <Setter Property="Interval" Value="100"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Border Background="Transparent" Padding="{TemplateBinding Padding}">
            <Border Background="{TemplateBinding Background}" CornerRadius="{DynamicResource Corner.Border2}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="Template.Slider.Horizontal" TargetType="Slider">
    <Grid x:Name="TemplateRoot" Height="20" Margin="8,0">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Border x:Name="Background" Grid.Row="1" Height="2" Background="{TemplateBinding Background}" CornerRadius="{DynamicResource Corner.Border2}"/>
      <Border Grid.Row="0" Height="8">
        <TickBar x:Name="TopTicks" Fill="{TemplateBinding Background}" Placement="Top" VerticalAlignment="Top" Height="4" Visibility="Hidden"/>
      </Border>
      <Border Grid.Row="2" Height="8">
        <TickBar x:Name="BottomTicks" Fill="{TemplateBinding Background}" Placement="Bottom" VerticalAlignment="Bottom" Height="4" Visibility="Hidden"/>
      </Border>
      <Track x:Name="PART_Track" Grid.RowSpan="3" Orientation="Horizontal">
        <Track.DecreaseRepeatButton>
          <RepeatButton x:Name="DecreaseButton" Command="Slider.DecreaseLarge" Padding="0,9" Margin="0,0,-1,0" Background="{TemplateBinding Foreground}" Style="{StaticResource Style.Slider.RepeatButton}"/>
        </Track.DecreaseRepeatButton>
        <Track.IncreaseRepeatButton>
          <RepeatButton x:Name="IncreaseButton" Command="Slider.IncreaseLarge" Padding="0,9" Background="Transparent" Style="{StaticResource Style.Slider.RepeatButton}"/>
        </Track.IncreaseRepeatButton>
        <Track.Thumb>
          <Thumb x:Name="Thumb" Background="{TemplateBinding Foreground}" Style="{StaticResource Style.Slider.Thumb}"/>
        </Track.Thumb>
      </Track>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsDirectionReversed" Value="True">
        <Setter Property="Margin" Value="-2,0,0,0" TargetName="DecreaseButton"/>
      </Trigger>
      <Trigger Property="local:Element.IsFocusEngaged" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Thumb"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Thumb"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="TopLeft">
        <Setter TargetName="TopTicks" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="BottomRight">
        <Setter TargetName="BottomTicks" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="Both">
        <Setter TargetName="TopTicks" Property="Visibility" Value="Visible"/>
        <Setter TargetName="BottomTicks" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Background" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="DecreaseButton"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.Slider.Vertical" TargetType="Slider">
    <Grid x:Name="TemplateRoot" Width="20" Margin="0,8">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.Column="1" Width="2" Background="{TemplateBinding Background}" CornerRadius="{DynamicResource Corner.Border2}"/>
      <Border Grid.Column="0" Width="8">
        <TickBar x:Name="LeftTicks" Fill="{TemplateBinding Background}" Placement="Left" HorizontalAlignment="Left" Width="4" Visibility="Hidden"/>
      </Border>
      <Border Grid.Column="2" Width="8">
        <TickBar x:Name="RightTicks" Fill="{TemplateBinding Background}" Placement="Right" HorizontalAlignment="Right" Width="4" Visibility="Hidden"/>
      </Border>
      <Track x:Name="PART_Track" Grid.ColumnSpan="3" Orientation="Vertical">
        <Track.DecreaseRepeatButton>
          <RepeatButton x:Name="DecreaseButton" Command="Slider.DecreaseLarge" Padding="9,0" Margin="0,-1,0,0" Background="{TemplateBinding Foreground}" Style="{StaticResource Style.Slider.RepeatButton}"/>
        </Track.DecreaseRepeatButton>
        <Track.IncreaseRepeatButton>
          <RepeatButton x:Name="IncreaseButton" Command="Slider.IncreaseLarge" Padding="9,0" Background="Transparent" Style="{StaticResource Style.Slider.RepeatButton}"/>
        </Track.IncreaseRepeatButton>
        <Track.Thumb>
          <Thumb x:Name="Thumb" Background="{TemplateBinding Foreground}" Style="{StaticResource Style.Slider.Thumb}"/>
        </Track.Thumb>
      </Track>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsDirectionReversed" Value="True">
        <Setter Property="Margin" Value="0,0,0,-2" TargetName="DecreaseButton"/>
      </Trigger>
      <Trigger Property="local:Element.IsFocusEngaged" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Border.Pressed}" TargetName="Thumb"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Thumb"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="TopLeft">
        <Setter TargetName="LeftTicks" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="BottomRight">
        <Setter TargetName="RightTicks" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="Both">
        <Setter TargetName="LeftTicks" Property="Visibility" Value="Visible"/>
        <Setter TargetName="RightTicks" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Background" Value="{DynamicResource Brush.Border.DisabledChecked}" TargetName="DecreaseButton"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="Slider" BasedOn="{StaticResource {x:Type Control}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Foreground" Value="{DynamicResource Brush.Background.Checked}"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Normal}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Template" Value="{StaticResource Template.Slider.Horizontal}"/>
      </Trigger>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="Template" Value="{StaticResource Template.Slider.Vertical}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ScrollBar -->
  <Style x:Key="Style.ScrollBar.Thumb" TargetType="Thumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Thumb">
          <Grid Background="Transparent">
            <Border x:Name="Thumb" Background="{DynamicResource Brush.Thumb.Normal}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Background" Value="{DynamicResource Brush.Thumb.Over}" TargetName="Thumb"/>
            </Trigger>
            <Trigger Property="IsDragging" Value="True">
              <Setter Property="Background" Value="{DynamicResource Brush.Thumb.Pressed}" TargetName="Thumb"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Background" Value="{DynamicResource Brush.Thumb.Disabled}" TargetName="Thumb"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="Style.ScrollBar.LineButton" TargetType="RepeatButton" BasedOn="{StaticResource {x:Type RepeatButton}}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="ClickMode" Value="Press"/>
    <Setter Property="Delay" Value="250"/>
    <Setter Property="Interval" Value="100"/>
    <Setter Property="Width" Value="{DynamicResource Size.ScrollBar}"/>
    <Setter Property="Height" Value="{DynamicResource Size.ScrollBar}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Border x:Name="Border" Background="Transparent">
            <Path x:Name="Arrow" Data="{TemplateBinding Content}" Stroke="{DynamicResource Brush.Glyph.Normal}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Background" Value="{DynamicResource Brush.Background.Normal}" TargetName="Border"/>
              <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Arrow"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
              <Setter Property="Background" Value="{DynamicResource Brush.Thumb.Pressed}" TargetName="Border"/>
              <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Pressed}" TargetName="Arrow"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Arrow"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="Style.ScrollBar.PageButton" TargetType="RepeatButton" BasedOn="{StaticResource {x:Type RepeatButton}}">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="ClickMode" Value="Press"/>
    <Setter Property="Delay" Value="250"/>
    <Setter Property="Interval" Value="100"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="RepeatButton">
          <Border Background="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="Template.ScrollBar.Horizontal" TargetType="ScrollBar">
    <ControlTemplate.Resources>
      <Geometry x:Key="Geometry.LeftArrow">M4,0L0,4 4,8</Geometry>
      <Geometry x:Key="Geometry.RightArrow">M0,0 L4,4 0,8</Geometry>
      <Storyboard x:Key="Anim.ExpandBar" BeginTime="0:0:0.1">
        <DoubleAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineLeftButton" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineRightButton" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="Thumb" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.1" DecelerationRatio="0.5"/>
      </Storyboard>
      <Storyboard x:Key="Anim.CollapseBar" BeginTime="0:0:2">
        <DoubleAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineLeftButton" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineRightButton" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="Thumb" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0.2" Duration="0:0:0.15" DecelerationRatio="0.5"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="TemplateRoot" Background="Transparent">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Border x:Name="Background" Grid.ColumnSpan="3" Background="{DynamicResource Brush.Track.Normal}" Opacity="0"/>
      <RepeatButton x:Name="LineLeftButton" Grid.Column="0" Command="ScrollBar.LineLeftCommand" Style="{StaticResource Style.ScrollBar.LineButton}" Content="{StaticResource Geometry.LeftArrow}" Opacity="0"/>
      <RepeatButton x:Name="LineRightButton" Grid.Column="2" Command="ScrollBar.LineRightCommand" Style="{StaticResource Style.ScrollBar.LineButton}" Content="{StaticResource Geometry.RightArrow}" Opacity="0"/>
      <Track x:Name="PART_Track" Grid.Column="1" Orientation="Horizontal">
        <Track.DecreaseRepeatButton>
          <RepeatButton x:Name="PageLeftButton" Command="ScrollBar.PageLeftCommand" Style="{StaticResource Style.ScrollBar.PageButton}"/>
        </Track.DecreaseRepeatButton>
        <Track.IncreaseRepeatButton>
          <RepeatButton x:Name="IncreaseButton" Command="ScrollBar.PageRightCommand" Style="{StaticResource Style.ScrollBar.PageButton}"/>
        </Track.IncreaseRepeatButton>
        <Track.Thumb>
          <Thumb x:Name="Thumb" Style="{StaticResource Style.ScrollBar.Thumb}" RenderTransformOrigin="0,0.8">
            <Thumb.RenderTransform>
              <ScaleTransform ScaleY="0.2"/>
            </Thumb.RenderTransform>
          </Thumb>
        </Track.Thumb>
      </Track>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.ExpandBar}"/>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.CollapseBar}"/>
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.ScrollBar.Vertical" TargetType="ScrollBar">
    <ControlTemplate.Resources>
      <Geometry x:Key="Geometry.UpArrow">M0,4L4,0 8,4</Geometry>
      <Geometry x:Key="Geometry.DownArrow">M0,0 L4,4 8,0</Geometry>
      <Storyboard x:Key="Anim.ExpandBar" BeginTime="0:0:0.1">
        <DoubleAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineUpButton" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineDownButton" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="Thumb" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.1" DecelerationRatio="0.5"/>
      </Storyboard>
      <Storyboard x:Key="Anim.CollapseBar" BeginTime="0:0:2">
        <DoubleAnimation Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineUpButton" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="LineDownButton" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="Thumb" Storyboard.TargetProperty="RenderTransform.ScaleX" To="0.2" Duration="0:0:0.15" DecelerationRatio="0.5"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="TemplateRoot" Background="Transparent">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Border x:Name="Background" Grid.RowSpan="3" Background="{DynamicResource Brush.Track.Normal}" Opacity="0"/>
      <RepeatButton x:Name="LineUpButton" Grid.Row="0" Command="ScrollBar.LineUpCommand" Style="{StaticResource Style.ScrollBar.LineButton}" Content="{StaticResource Geometry.UpArrow}" Opacity="0"/>
      <RepeatButton x:Name="LineDownButton" Grid.Row="2" Command="ScrollBar.LineDownCommand" Style="{StaticResource Style.ScrollBar.LineButton}" Content="{StaticResource Geometry.DownArrow}" Opacity="0"/>
      <Track x:Name="PART_Track" Grid.Row="1" Orientation="Vertical" IsDirectionReversed="True">
        <Track.DecreaseRepeatButton>
          <RepeatButton x:Name="PageUpButton" Command="ScrollBar.PageUpCommand" Style="{StaticResource Style.ScrollBar.PageButton}"/>
        </Track.DecreaseRepeatButton>
        <Track.IncreaseRepeatButton>
          <RepeatButton x:Name="IncreaseButton" Command="ScrollBar.PageDownCommand" Style="{StaticResource Style.ScrollBar.PageButton}"/>
        </Track.IncreaseRepeatButton>
        <Track.Thumb>
          <Thumb x:Name="Thumb" Style="{StaticResource Style.ScrollBar.Thumb}" RenderTransformOrigin="0.8,0">
            <Thumb.RenderTransform>
              <ScaleTransform ScaleX="0.2"/>
            </Thumb.RenderTransform>
          </Thumb>
        </Track.Thumb>
      </Track>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.ExpandBar}"/>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.CollapseBar}"/>
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ScrollBar">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="ForceCursor" Value="True"/>
    <Setter Property="Cursor" Value="Arrow"/>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Height" Value="{DynamicResource Size.ScrollBar}"/>
        <Setter Property="MinHeight" Value="{DynamicResource Size.ScrollBar}"/>
        <Setter Property="Template" Value="{StaticResource Template.ScrollBar.Horizontal}"/>
      </Trigger>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="Width" Value="{DynamicResource Size.ScrollBar}"/>
        <Setter Property="MinWidth" Value="{DynamicResource Size.ScrollBar}"/>
        <Setter Property="Template" Value="{StaticResource Template.ScrollBar.Vertical}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ScrollViewer -->
  <ControlTemplate x:Key="Template.ScrollViewer" TargetType="ScrollViewer">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border0}">
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="*"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Decorator x:Name="ShowBarsRef" IsEnabled="False"/>
        <ScrollContentPresenter Grid.RowSpan="2" Grid.ColumnSpan="2" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" CanContentScroll="{TemplateBinding CanContentScroll}" Margin="{TemplateBinding Padding}"/>
        <Rectangle x:Name="Corner" Grid.Row="1" Grid.Column="1" Fill="{DynamicResource Brush.Track.Normal}" IsEnabled="False" Opacity="0"/>
        <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" MaxHeight="{TemplateBinding MinHeight}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" Opacity="0"/>
        <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="1" Grid.Row="0" Orientation="Vertical" MaxWidth="{TemplateBinding MinWidth}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" Opacity="0"/>
      </Grid>
    </Border>
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.ShowBars" BeginTime="0:0:0.1">
        <DoubleAnimation Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
        <DoubleAnimation Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
      </Storyboard>
      <Storyboard x:Key="Anim.HideBars" BeginTime="0:0:2">
        <DoubleAnimation Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
        <DoubleAnimation Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
      </Storyboard>
      <Storyboard x:Key="Anim.ShowCorner" BeginTime="0:0:0.1">
        <DoubleAnimation Storyboard.TargetName="Corner" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
      </Storyboard>
      <Storyboard x:Key="Anim.HideCorner" BeginTime="0:0:2">
        <DoubleAnimation Storyboard.TargetName="Corner" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <ControlTemplate.Triggers>
      <Trigger Property="IsKeyboardFocusWithin" Value="True">
        <Setter Property="IsEnabled" Value="True" TargetName="ShowBarsRef"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="IsEnabled" Value="True" TargetName="ShowBarsRef"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="True" SourceName="ShowBarsRef">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.ShowBars}"/>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.HideBars}"/>
        </Trigger.ExitActions>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="PART_HorizontalScrollBar">
        <Setter Property="IsEnabled" Value="True" TargetName="Corner"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="PART_VerticalScrollBar">
        <Setter Property="IsEnabled" Value="True" TargetName="Corner"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="True" SourceName="Corner">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.ShowCorner}"/>
        </Trigger.EnterActions>
        <Trigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.HideCorner}"/>
        </Trigger.ExitActions>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ScrollViewer" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="PanningMode" Value="VerticalFirst"/>
    <Setter Property="Template" Value="{StaticResource Template.ScrollViewer}"/>
  </Style>

  <!-- GroupBox -->
  <ControlTemplate x:Key="Template.GroupBox.NoHeader" TargetType="GroupBox">
    <Grid>
      <Rectangle Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{DynamicResource Size.GroupBox.Border}" RadiusX="4" RadiusY="4"/>
      <Decorator Margin="5">
        <ContentPresenter Margin="{TemplateBinding Padding}"/>
      </Decorator>
    </Grid>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.GroupBox" TargetType="GroupBox">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="5" MaxHeight="5"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
        <RowDefinition Height="5"/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="9" MaxWidth="9"/>
      </Grid.ColumnDefinitions>
      <Path Grid.Row="1" Grid.Column="0" Data="M8,0L4,0A4,4,0,0,0,0,4" StrokeStartLineCap="Square" Stretch="Fill" StrokeEndLineCap="Square" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{DynamicResource Size.GroupBox.Border}" VerticalAlignment="Bottom" Margin="0,4,0,-4"/>
      <Border Grid.Row="2" Grid.RowSpan="2" Grid.Column="0" HorizontalAlignment="Left" Background="{TemplateBinding BorderBrush}" Width="{DynamicResource Size.GroupBox.Border}" Margin="0,4,0,0"/>
      <Path Grid.Row="4" Grid.Column="0" Data="M0,0A4,4,0,0,0,4,4L8,4" StrokeStartLineCap="Square" Stretch="Fill" StrokeEndLineCap="Square" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{DynamicResource Size.GroupBox.Border}"/>
      <Border Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Background="{TemplateBinding BorderBrush}" Height="{DynamicResource Size.GroupBox.Border}" VerticalAlignment="Bottom"/>
      <Path Grid.Row="4" Grid.Column="3" Data="M0,4L4,4A4,4,0,0,0,8,0" StrokeStartLineCap="Square" Stretch="Fill" StrokeEndLineCap="Square" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{DynamicResource Size.GroupBox.Border}"/>
      <Border Grid.Row="2" Grid.RowSpan="2" Grid.Column="3" HorizontalAlignment="Right" Background="{TemplateBinding BorderBrush}" Width="{DynamicResource Size.GroupBox.Border}" Margin="0,4,0,0"/>
      <Path Grid.Row="1" Grid.Column="3" Data="M8,4A4,4,0,0,0,4,0L0,0" StrokeStartLineCap="Square" Stretch="Fill" StrokeEndLineCap="Square" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{DynamicResource Size.GroupBox.Border}" VerticalAlignment="Bottom" Margin="0,4,0,-4"/>
      <Border Grid.Row="1" Grid.Column="2" Background="{TemplateBinding BorderBrush}" Height="{DynamicResource Size.GroupBox.Border}" VerticalAlignment="Bottom"/>
      <Border x:Name="ContentHost" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="-4,0">
        <ContentPresenter Margin="{TemplateBinding Padding}"/>
      </Border>
      <ContentPresenter x:Name="HeaderHost" Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" ContentSource="Header" Margin="4,0" TextElement.FontSize="{DynamicResource Font.Size.Header}"/>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="Header" Value="{x:Null}">
        <Setter Property="Margin" Value="0" TargetName="HeaderHost"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="GroupBox" BasedOn="{StaticResource {x:Type HeaderedContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="Padding" Value="4"/>
    <Setter Property="Template" Value="{StaticResource Template.GroupBox}"/>
    <Style.Triggers>
      <Trigger Property="Header" Value="{x:Null}">
        <Setter Property="Template" Value="{StaticResource Template.GroupBox.NoHeader}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- Expander -->
  <Style x:Key="Style.Expander.Toggle" TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToggleButton">
          <Grid Background="Transparent">
            <ContentPresenter />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
  </Style>
  <Geometry x:Key="Geometry.Expander.Arrow">M0,0L6,6 0,12</Geometry>
  <ControlTemplate x:Key="Template.Expander" TargetType="Expander">
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Loaded">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Tag" Storyboard.TargetName="Root">
          <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Vertical.Loaded">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0"/>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Vertical.Up.Loaded">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="-90" Duration="0"/>
        <StaticResource ResourceKey="Anim.Expand.Vertical.Loaded"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Vertical.Down.Loaded">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="90" Duration="0"/>
        <StaticResource ResourceKey="Anim.Expand.Vertical.Loaded"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Horizontal.Loaded">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="90" Duration="0"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0">
          <DoubleAnimation.EasingFunction>
            <BackEase EasingMode="EaseOut" Amplitude="0.2"/>
          </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Vertical">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0"/>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2">
          <DoubleAnimation.EasingFunction>
            <BackEase EasingMode="EaseOut" Amplitude="0.2"/>
          </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Vertical.Up">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="-90" Duration="0:0:0.15"/>
        <StaticResource ResourceKey="Anim.Expand.Vertical"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Vertical.Down">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="90" Duration="0:0:0.15"/>
        <StaticResource ResourceKey="Anim.Expand.Vertical"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Collapse.Vertical">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="0" Duration="0:0:0.2"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="0:0:0.2" AccelerationRatio="0.5"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Horizontal">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="90" Duration="0:0:0.15"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.2">
          <DoubleAnimation.EasingFunction>
            <BackEase EasingMode="EaseOut" Amplitude="0.2"/>
          </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Collapse.Horizontal">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="0" Duration="0:0:0.2"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ContentBg" Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="0:0:0.2" AccelerationRatio="0.5"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="Root" Tag="0">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <ToggleButton x:Name="ExpanderButton" Style="{StaticResource Style.Expander.Toggle}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Foreground="{TemplateBinding Foreground}">
        <Border x:Name="HeaderBg" Background="{DynamicResource Brush.Header.Normal}" CornerRadius="{DynamicResource Corner.Border0.Top}">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Path x:Name="Arrow" Grid.Column="0" Stroke="{DynamicResource Brush.Glyph.Normal}" Data="{StaticResource Geometry.Expander.Arrow}" Margin="14,11.5" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <RotateTransform />
              </Path.RenderTransform>
            </Path>
            <ContentPresenter x:Name="HeaderHost" Grid.Column="1" ContentSource="Header" VerticalAlignment="Center" Margin="0,0,14,0" TextElement.FontSize="{DynamicResource Font.Size.Header}"/>
          </Grid>
        </Border>
      </ToggleButton>
      <Decorator x:Name="ContentBorder" Grid.Row="1" Grid.Column="1" Visibility="Collapsed">
        <Border x:Name="ContentBg" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border0.Bottom}" Padding="{TemplateBinding Padding}">
          <Border.RenderTransform>
            <ScaleTransform ScaleX="0" ScaleY="0"/>
          </Border.RenderTransform>
          <ContentPresenter x:Name="ContentHost" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </Border>
      </Decorator>
    </Grid>
    <ControlTemplate.Triggers>
      <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Root">
        <BeginStoryboard Storyboard="{StaticResource Anim.Loaded}"/>
      </EventTrigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="ExpanderButton">
        <Setter Property="Background" Value="{DynamicResource Brush.Header.Over}" TargetName="HeaderBg"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Arrow"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True" SourceName="ExpanderButton">
        <Setter Property="Background" Value="{DynamicResource Brush.Header.Pressed}" TargetName="HeaderBg"/>
      </Trigger>
      <Trigger Property="IsExpanded" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Header.Checked}" TargetName="HeaderBg"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsExpanded" Value="True"/>
          <Condition Property="IsMouseOver" Value="True" SourceName="ExpanderButton"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="{DynamicResource Brush.Header.CheckedOver}" TargetName="HeaderBg"/>
      </MultiTrigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsExpanded" Value="True"/>
          <Condition Property="IsPressed" Value="True" SourceName="ExpanderButton"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="{DynamicResource Brush.Header.CheckedPressed}" TargetName="HeaderBg"/>
      </MultiTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Up"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Vertical.Up.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Down"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Vertical.Down.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Left"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Horizontal.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Right"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Horizontal.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Up"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Vertical.Up}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Collapse.Vertical}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Down"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Vertical.Down}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Collapse.Vertical}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Left"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Horizontal}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Collapse.Horizontal}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
          <Condition Binding="{Binding ExpandDirection, RelativeSource={RelativeSource Self}}" Value="Right"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Horizontal}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Collapse.Horizontal}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Arrow"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsEnabled" Value="False"/>
          <Condition Property="IsExpanded" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.DisabledChecked}"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Foreground.DisabledChecked}" TargetName="Arrow"/>
      </MultiTrigger>
      <Trigger Property="ExpandDirection" Value="Down">
        <Setter Property="Grid.Row" Value="0" TargetName="ExpanderButton"/>
        <Setter Property="Grid.Column" Value="1" TargetName="ExpanderButton"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0" TargetName="ContentBg"/>
      </Trigger>
      <Trigger Property="ExpandDirection" Value="Up">
        <Setter Property="Grid.Row" Value="2" TargetName="ExpanderButton"/>
        <Setter Property="Grid.Column" Value="1" TargetName="ExpanderButton"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,1" TargetName="ContentBg"/>
      </Trigger>
      <Trigger Property="ExpandDirection" Value="Right">
        <Setter Property="Grid.Row" Value="1" TargetName="ExpanderButton"/>
        <Setter Property="Grid.Column" Value="0" TargetName="ExpanderButton"/>
        <Setter Property="RenderTransformOrigin" Value="0,0.5" TargetName="ContentBg"/>
        <Setter Property="LayoutTransform" TargetName="ExpanderButton">
          <Setter.Value>
            <RotateTransform Angle="-90"/>
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="ExpandDirection" Value="Left">
        <Setter Property="Grid.Row" Value="1" TargetName="ExpanderButton"/>
        <Setter Property="Grid.Column" Value="2" TargetName="ExpanderButton"/>
        <Setter Property="RenderTransformOrigin" Value="1,0.5" TargetName="ContentBg"/>
        <Setter Property="LayoutTransform" TargetName="ExpanderButton">
          <Setter.Value>
            <RotateTransform Angle="90"/>
          </Setter.Value>
        </Setter>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="Expander" BasedOn="{StaticResource {x:Type HeaderedContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Header.Normal}"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Padding" Value="8"/>
    <Setter Property="Template" Value="{StaticResource Template.Expander}"/>
  </Style>

  <!-- Hyperlink -->
  <Style TargetType="Hyperlink">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Foreground" Value="{DynamicResource Brush.Hyperlink.Normal}"/>
    <Setter Property="TextDecorations" Value="Underline"/>
    <Style.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Hyperlink.Over}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="True">
        <Setter Property="Cursor" Value="Hand"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- Menu -->
  <ControlTemplate x:Key="Template.Menu" TargetType="Menu">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <ItemsPresenter />
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ItemsPanelTemplate x:Key="Template.Menu.ItemsPanel">
    <StackPanel Orientation="Horizontal"/>
  </ItemsPanelTemplate>
  <Style TargetType="Menu" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.ToolBar.Normal}"/>
    <Setter Property="ItemsPanel" Value="{StaticResource Template.Menu.ItemsPanel}"/>
    <Setter Property="Template" Value="{StaticResource Template.Menu}"/>
  </Style>

  <!-- MenuItem Separator -->
  <ControlTemplate x:Key="Template.MenuItem.Separator" TargetType="Separator">
    <Rectangle Height="1" Fill="{DynamicResource Brush.Border.Popup}" Margin="32,5,4,5"/>
  </ControlTemplate>
  <Style x:Key="Style.MenuItem.Separator" TargetType="Separator">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.MenuItem.Separator}"/>
  </Style>

  <!-- MenuItem -->
  <Geometry x:Key="Geometry.MenuItem.Arrow">M0,0L6,6 0,12</Geometry>
  <ControlTemplate x:Key="Template.MenuItem.TopLevelHeader" TargetType="MenuItem">
    <Grid>
      <Border x:Name="Header" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
        <ContentPresenter ContentSource="Header" VerticalAlignment="Center"/>
      </Border>
      <Popup IsOpen="{TemplateBinding IsSubmenuOpen}" Focusable="False" Placement="Bottom" PopupAnimation="Fade" AllowsTransparency="True">
        <Border Background="{DynamicResource Brush.Background.Popup}" BorderBrush="{DynamicResource Brush.Border.Popup}" BorderThickness="1" CornerRadius="{DynamicResource Corner.Border1}" Padding="0,6">
          <ItemsPresenter />
        </Border>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsHighlighted" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Header"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.MenuItem.TopLevelItem" TargetType="MenuItem">
    <Border x:Name="Header" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <ContentPresenter ContentSource="Header" VerticalAlignment="Center"/>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsHighlighted" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Header"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.MenuItem.SubmenuHeader" TargetType="MenuItem">
    <Grid>
      <Border x:Name="Header" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
            <ColumnDefinition Width="*" SharedSizeGroup="Header"/>
            <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Decorator Grid.Column="0" MinWidth="32">
            <ContentPresenter x:Name="Icon" Margin="6,0" VerticalAlignment="Center" ContentSource="Icon"/>
          </Decorator>
          <ContentPresenter x:Name="HeaderHost" Grid.Column="1" Margin="6,0" ContentSource="Header" VerticalAlignment="Center"/>
          <Decorator Grid.Column="3" MinWidth="24">
            <Path x:Name="Arrow" Data="{StaticResource Geometry.MenuItem.Arrow}" Margin="6,0" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="{DynamicResource Brush.Glyph.Normal}"/>
          </Decorator>
        </Grid>
      </Border>
      <Popup IsOpen="{TemplateBinding IsSubmenuOpen}" Focusable="False" HorizontalOffset="-2" VerticalOffset="-7" Placement="Right" PopupAnimation="Fade" AllowsTransparency="True">
        <Border Background="{DynamicResource Brush.Background.Popup}" BorderBrush="{DynamicResource Brush.Border.Popup}" BorderThickness="1" CornerRadius="{DynamicResource Corner.Border1}" Padding="0,6">
          <ItemsPresenter />
        </Border>
      </Popup>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsHighlighted" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Header"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Arrow"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.MenuItem.SubmenuItem" TargetType="MenuItem">
    <Border x:Name="Header" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
          <ColumnDefinition Width="*" SharedSizeGroup="Header"/>
          <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Decorator Grid.Column="0" MinWidth="32">
          <Grid>
            <ContentPresenter x:Name="Icon" Margin="6,0" VerticalAlignment="Center" ContentSource="Icon"/>
            <Path x:Name="Check" Margin="6,0" Data="{StaticResource Geometry.CheckBox.Check}" Fill="{DynamicResource Brush.Glyph.Normal}" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden"/>
          </Grid>
        </Decorator>
        <ContentPresenter x:Name="HeaderHost" Grid.Column="1" Margin="6,0" ContentSource="Header" VerticalAlignment="Center"/>
        <TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" Foreground="{DynamicResource Brush.Foreground.Placeholder}" VerticalAlignment="Center" Margin="12,0,0,0"/>
        <Decorator Grid.Column="3" MinWidth="24"/>
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsCheckable" Value="True">
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsCheckable" Value="True"/>
          <Condition Property="IsChecked" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter TargetName="Check" Property="Visibility" Value="Visible"/>
      </MultiTrigger>
      <Trigger Property="IsHighlighted" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Selected}" TargetName="Header"/>
        <Setter Property="Fill" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Check"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ItemsPanelTemplate x:Key="Template.MenuItem.ItemsPanel">
    <StackPanel Grid.IsSharedSizeScope="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
  </ItemsPanelTemplate>
  <Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type HeaderedItemsControl}}">
    <Style.Resources>
      <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="Separator" BasedOn="{StaticResource Style.MenuItem.Separator}"/>
    </Style.Resources>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Header}"/>
        <Setter Property="Padding" Value="12,7.5"/>
        <Setter Property="Template" Value="{StaticResource Template.MenuItem.TopLevelHeader}"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Header}"/>
        <Setter Property="Padding" Value="12,7.5"/>
        <Setter Property="Template" Value="{StaticResource Template.MenuItem.TopLevelItem}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Normal}"/>
        <Setter Property="Padding" Value="0,7"/>
        <Setter Property="Template" Value="{StaticResource Template.MenuItem.SubmenuHeader}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Normal}"/>
        <Setter Property="Padding" Value="0,7"/>
        <Setter Property="Template" Value="{StaticResource Template.MenuItem.SubmenuItem}"/>
      </Trigger>
    </Style.Triggers>
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="ItemsPanel" Value="{StaticResource Template.MenuItem.ItemsPanel}"/>
  </Style>

  <!-- ContextMenu -->
  <ControlTemplate x:Key="Template.ContextMenu" TargetType="ContextMenu">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="{DynamicResource Corner.Border1}">
      <ItemsPresenter />
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ContextMenu" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Style.Resources>
      <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="Separator" BasedOn="{StaticResource Style.MenuItem.Separator}"/>
    </Style.Resources>
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Background.Popup}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Popup}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="0,6"/>
    <Setter Property="Cursor" Value="Arrow"/>
    <Setter Property="ForceCursor" Value="True"/>
    <Setter Property="ItemsPanel" Value="{StaticResource Template.MenuItem.ItemsPanel}"/>
    <Setter Property="Template" Value="{StaticResource Template.ContextMenu}"/>
  </Style>

  <!-- TextBox -->
  <Style x:Key="Style.TextBox.Placeholder" TargetType="TextBlock">
    <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Placeholder}"/>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.DisabledPlaceholder}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <ControlTemplate x:Key="Template.TextBox" TargetType="TextBox">
    <Grid>
      <Border Background="{TemplateBinding Background}" CornerRadius="{DynamicResource Corner.Border0}"/>
      <Grid>
        <Border x:Name="Placeholder" Padding="{TemplateBinding Padding}" Margin="2,0" Visibility="Collapsed">
          <TextBlock Text="{Binding (local:Text.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource Style.TextBox.Placeholder}"/>
        </Border>
        <ScrollViewer x:Name="PART_ContentHost" Focusable="False" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}"/>
      </Grid>
      <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border1}"/>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="Text" Value="">
        <Setter Property="Visibility" Value="Visible" TargetName="Placeholder"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsKeyboardFocused" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.TextBox.Focused}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Focus}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}"/>
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type Control}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.TextBox.Normal}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Box}"/>
    <Setter Property="CaretBrush" Value="{DynamicResource Brush.Foreground.Normal}"/>
    <Setter Property="SelectionBrush" Value="{DynamicResource Brush.Background.Checked}"/>
    <Setter Property="SelectionOpacity" Value="0.25"/>
    <Setter Property="Padding" Value="6,7"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
    <Setter Property="AllowDrop" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.TextBox}"/>
    <Setter Property="ContextMenu">
      <Setter.Value>
        <ContextMenu>
          <MenuItem Command="ApplicationCommands.Cut"/>
          <MenuItem Command="ApplicationCommands.Copy"/>
          <MenuItem Command="ApplicationCommands.Paste"/>
        </ContextMenu>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="True">
        <Setter Property="Cursor" Value="IBeam"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- PasswordBox -->
  <ControlTemplate x:Key="Template.PasswordBox.Scroll" TargetType="ScrollViewer">
    <ScrollContentPresenter Margin="{TemplateBinding Padding}"/>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.PasswordBox" TargetType="PasswordBox">
    <Grid>
      <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border1}"/>
      <Grid>
        <Border x:Name="Placeholder" Padding="{TemplateBinding Padding}" Margin="2,0" Visibility="Collapsed">
          <TextBlock Text="{Binding (local:Text.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource Style.TextBox.Placeholder}"/>
        </Border>
        <ScrollViewer x:Name="PART_ContentHost" Template="{StaticResource Template.PasswordBox.Scroll}" Focusable="False" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}"/>
      </Grid>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="local:Text.PasswordLength" Value="0">
        <Setter Property="Visibility" Value="Visible" TargetName="Placeholder"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsKeyboardFocused" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.TextBox.Focused}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Focus}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}"/>
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="PasswordBox" BasedOn="{StaticResource {x:Type Control}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.TextBox.Normal}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="BorderThickness" Value="{DynamicResource Border.Box}"/>
    <Setter Property="CaretBrush" Value="{DynamicResource Brush.Foreground.Normal}"/>
    <Setter Property="SelectionBrush" Value="{DynamicResource Brush.Background.Checked}"/>
    <Setter Property="SelectionOpacity" Value="0.5"/>
    <Setter Property="Padding" Value="6,7"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
    <Setter Property="PasswordChar" Value="•"/>
    <Setter Property="Template" Value="{StaticResource Template.PasswordBox}"/>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="True">
        <Setter Property="Cursor" Value="IBeam"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ListBox -->
  <ControlTemplate x:Key="Template.ListBox" TargetType="ListBox">
    <ScrollViewer Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Focusable="False">
      <ItemsPresenter />
    </ScrollViewer>
  </ControlTemplate>
  <Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
    <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource Template.ListBox}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ListBoxItem -->
  <ControlTemplate x:Key="Template.ListBoxItem" TargetType="ListBoxItem">
    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Selected}" TargetName="Border"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsMouseOver" Value="True"/>
          <Condition Property="IsSelected" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="{DynamicResource Brush.Item.SelectedOver}" TargetName="Border"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"/>
    <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"/>
    <Setter Property="Padding" Value="12,8.5"/>
    <Setter Property="Template" Value="{StaticResource Template.ListBoxItem}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Inner.Uniform}"/>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ListView -->
  <Style x:Key="Style.GridView.Scroll" TargetType="ScrollViewer" BasedOn="{StaticResource {x:Type ScrollViewer}}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ScrollViewer">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border0}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
              </Grid.ColumnDefinitions>
              <ScrollViewer Grid.Row="0" Grid.ColumnSpan="2" MinHeight="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" PanningMode="HorizontalFirst" Focusable="False">
                <GridViewHeaderRowPresenter AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}"/>
              </ScrollViewer>
              <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" Margin="{TemplateBinding Padding}" KeyboardNavigation.DirectionalNavigation="Local"/>
              <Rectangle x:Name="Corner" Grid.Row="2" Grid.Column="1" Fill="{DynamicResource Brush.Track.Normal}" IsEnabled="False" Opacity="0"/>
              <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Row="1" Grid.Column="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0.0" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" Opacity="0"/>
              <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Row="2" Grid.Column="0" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0.0" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" Opacity="0"/>
            </Grid>
          </Border>
          <ControlTemplate.Resources>
            <Storyboard x:Key="Anim.ShowBars" BeginTime="0:0:0.1">
              <DoubleAnimation Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
              <DoubleAnimation Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.5" DecelerationRatio="0.5"/>
            </Storyboard>
            <Storyboard x:Key="Anim.HideBars" BeginTime="0:0:2">
              <DoubleAnimation Storyboard.TargetName="PART_HorizontalScrollBar" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
              <DoubleAnimation Storyboard.TargetName="PART_VerticalScrollBar" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
            </Storyboard>
            <Storyboard x:Key="Anim.ShowCorner" BeginTime="0:0:0.1">
              <DoubleAnimation Storyboard.TargetName="Corner" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
            </Storyboard>
            <Storyboard x:Key="Anim.HideCorner" BeginTime="0:0:2">
              <DoubleAnimation Storyboard.TargetName="Corner" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" AccelerationRatio="0.75" DecelerationRatio="0.25"/>
            </Storyboard>
          </ControlTemplate.Resources>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Trigger.EnterActions>
                <BeginStoryboard Storyboard="{StaticResource Anim.ShowBars}"/>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard Storyboard="{StaticResource Anim.HideBars}"/>
              </Trigger.ExitActions>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True" SourceName="PART_HorizontalScrollBar">
              <Setter Property="IsEnabled" Value="True" TargetName="Corner"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True" SourceName="PART_VerticalScrollBar">
              <Setter Property="IsEnabled" Value="True" TargetName="Corner"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="True" SourceName="Corner">
              <Trigger.EnterActions>
                <BeginStoryboard Storyboard="{StaticResource Anim.ShowCorner}"/>
              </Trigger.EnterActions>
              <Trigger.ExitActions>
                <BeginStoryboard Storyboard="{StaticResource Anim.HideCorner}"/>
              </Trigger.ExitActions>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <ControlTemplate x:Key="Template.ListView" TargetType="ListView">
    <ScrollViewer Style="{StaticResource Style.GridView.Scroll}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Focusable="False">
      <ItemsPresenter />
    </ScrollViewer>
  </ControlTemplate>
  <Style TargetType="ListView" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
    <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource Template.ListView}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ListViewItem -->
  <ControlTemplate x:Key="Template.ListViewItem" TargetType="ListViewItem">
    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <GridViewRowPresenter />
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Selected}" TargetName="Border"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsMouseOver" Value="True"/>
          <Condition Property="IsSelected" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="{DynamicResource Brush.Item.SelectedOver}" TargetName="Border"/>
      </MultiTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ListViewItem" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"/>
    <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"/>
    <Setter Property="Padding" Value="0,8.5"/>
    <Setter Property="Template" Value="{StaticResource Template.ListViewItem}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Inner.Uniform}"/>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- GridViewColumnHeader -->
  <Style x:Key="Style.GridViewColumnHeader.Gripper" TargetType="Thumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Thumb">
          <Border Background="Transparent" Margin="-12,0">
            <Rectangle x:Name="Rect" Fill="{TemplateBinding BorderBrush}" Width="1" Margin="12,0"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Fill" Value="{DynamicResource Brush.Border.Over}" TargetName="Rect"/>
              <Setter Property="Width" Value="2" TargetName="Rect"/>
              <Setter Property="Margin" Value="11.5,0" TargetName="Rect"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="True">
        <Setter Property="Cursor" Value="ScrollWE"/>
      </Trigger>
    </Style.Triggers>
  </Style>
  <ControlTemplate x:Key="Template.GridViewColumnHeader.Normal" TargetType="GridViewColumnHeader">
    <Grid>
      <Border x:Name="HeaderBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
      <Thumb x:Name="PART_HeaderGripper" Style="{StaticResource Style.GridViewColumnHeader.Gripper}" BorderBrush="{TemplateBinding BorderBrush}" HorizontalAlignment="Right"/>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Header.Over}" TargetName="HeaderBorder"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Header.Pressed}" TargetName="HeaderBorder"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.GridViewColumnHeader.Floating" TargetType="GridViewColumnHeader">
    <Canvas x:Name="PART_FloatingHeaderCanvas">
      <Rectangle Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}" Fill="#7F7F7F7F"/>
    </Canvas>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.GridViewColumnHeader.Padding" TargetType="GridViewColumnHeader">
    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
  </ControlTemplate>
  <Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.Header.Normal}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="BorderThickness" Value="0,0,0,1"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Padding" Value="6,5"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="Normal">
        <Setter Property="Template" Value="{StaticResource Template.GridViewColumnHeader.Normal}"/>
      </Trigger>
      <Trigger Property="Role" Value="Floating">
        <Setter Property="Template" Value="{StaticResource Template.GridViewColumnHeader.Floating}"/>
      </Trigger>
      <Trigger Property="Role" Value="Padding">
        <Setter Property="Template" Value="{StaticResource Template.GridViewColumnHeader.Padding}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ComboBox -->
  <Style x:Key="Style.ComboBox.Toggle" TargetType="ToggleButton" BasedOn="{StaticResource Style.Expander.Toggle}"/>
  <ControlTemplate x:Key="Template.ComboBox.TextScroll" TargetType="ScrollViewer">
    <Border Background="Transparent" Padding="{TemplateBinding Padding}">
      <ScrollContentPresenter />
    </Border>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.ComboBox.Text" TargetType="TextBox">
    <ScrollViewer x:Name="PART_ContentHost" Template="{StaticResource Template.ComboBox.TextScroll}" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled"/>
  </ControlTemplate>
  <Geometry x:Key="Geometry.ComboBox.Arrow">M0,0L6,6 12,0</Geometry>
  <ControlTemplate x:Key="Template.ComboBox" TargetType="ComboBox">
    <Grid>
      <ToggleButton x:Name="DropDownButton" Style="{StaticResource Style.ComboBox.Toggle}" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="Border" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border1}"/>
          <Grid Grid.Column="0" Margin="2,0">
            <ContentPresenter x:Name="SelectionBoxItemHost" ContentSource="SelectionBoxItem" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="{TemplateBinding Padding}"/>
            <TextBlock x:Name="Placeholder" Text="{Binding (local:Text.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource Style.TextBox.Placeholder}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Visibility="Collapsed"/>
          </Grid>
          <Path x:Name="Arrow" Grid.Column="1" Data="{StaticResource Geometry.ComboBox.Arrow}" Stroke="{DynamicResource Brush.Glyph.Normal}" VerticalAlignment="Center" Margin="10,1,10,0" IsHitTestVisible="False">
            <Path.RenderTransform>
              <TranslateTransform />
            </Path.RenderTransform>
          </Path>
        </Grid>
      </ToggleButton>
      <Popup x:Name="PART_Popup" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" Placement="Bottom" PopupAnimation="Slide" AllowsTransparency="True">
        <Border x:Name="DropDownBorder" Background="{DynamicResource Brush.Background.Popup}" BorderBrush="{DynamicResource Brush.Border.Popup}" BorderThickness="1,0,1,1" CornerRadius="{DynamicResource Corner.Border1.Bottom}" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
          <ScrollViewer Focusable="False" Padding="0,6" KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
            <ItemsPresenter />
          </ScrollViewer>
        </Border>
      </Popup>
    </Grid>
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Expand">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Y">
          <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="2"/>
          <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
            <EasingDoubleKeyFrame.EasingFunction>
              <CubicEase EasingMode="EaseOut"/>
            </EasingDoubleKeyFrame.EasingFunction>
          </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
      </Storyboard>
    </ControlTemplate.Resources>
    <ControlTemplate.Triggers>
      <Trigger Property="SelectedIndex" Value="-1">
        <Setter Property="Visibility" Value="Visible" TargetName="Placeholder"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Over}" TargetName="Border"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Arrow"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True" SourceName="DropDownButton">
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Pressed}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsDropDownOpen" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand}"/>
        </Trigger.EnterActions>
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Pressed}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2.Top}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Arrow"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.ComboBox.Editable" TargetType="ComboBox">
    <Grid>
      <ToggleButton x:Name="DropDownButton" Style="{StaticResource Style.ComboBox.Toggle}" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="Base" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" CornerRadius="{DynamicResource Corner.Border0}"/>
          <Border x:Name="ArrowBorder" Grid.Column="1" Background="{TemplateBinding Background}" BorderBrush="{DynamicResource Brush.Border.Popup}" BorderThickness="1,0,0,0" CornerRadius="{DynamicResource Corner.Border0.Right}"/>
          <Border x:Name="Border" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border1}" IsHitTestVisible="False"/>
          <TextBox x:Name="PART_EditableTextBox" Template="{StaticResource Template.ComboBox.Text}" Foreground="{TemplateBinding Foreground}" IsReadOnly="{TemplateBinding IsReadOnly}" Padding="{TemplateBinding Padding}" CaretBrush="{TemplateBinding Foreground}" SelectionBrush="{DynamicResource Brush.Background.Checked}" SelectionOpacity="0.5" FocusVisualStyle="{x:Null}"/>
          <Decorator Grid.Column="0" Margin="2,0">
            <TextBlock x:Name="Placeholder" Text="{Binding (local:Text.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource Style.TextBox.Placeholder}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Visibility="Collapsed"/>
          </Decorator>
          <Path x:Name="Arrow" Grid.Column="1" Data="{StaticResource Geometry.ComboBox.Arrow}" Stroke="{DynamicResource Brush.Glyph.Normal}" VerticalAlignment="Center" Margin="10,1,10,0" IsHitTestVisible="False">
            <Path.RenderTransform>
              <TranslateTransform />
            </Path.RenderTransform>
          </Path>
        </Grid>
      </ToggleButton>
      <Popup x:Name="PART_Popup" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" Placement="Bottom" PopupAnimation="Slide" AllowsTransparency="True">
        <Border x:Name="DropDownBorder" Background="{DynamicResource Brush.Background.Popup}" BorderBrush="{DynamicResource Brush.Border.Popup}" BorderThickness="1,0,1,1" CornerRadius="{DynamicResource Corner.Border1.Bottom}" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
          <ScrollViewer Focusable="False" Padding="0,6" KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
            <ItemsPresenter />
          </ScrollViewer>
        </Border>
      </Popup>
    </Grid>
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Expand">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Y">
          <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="2"/>
          <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
            <EasingDoubleKeyFrame.EasingFunction>
              <CubicEase EasingMode="EaseOut"/>
            </EasingDoubleKeyFrame.EasingFunction>
          </EasingDoubleKeyFrame>
        </DoubleAnimationUsingKeyFrames>
      </Storyboard>
    </ControlTemplate.Resources>
    <ControlTemplate.Triggers>
      <Trigger Property="Text" Value="">
        <Setter Property="Visibility" Value="Visible" TargetName="Placeholder"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Over}" TargetName="Arrow"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="ArrowBorder">
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Over}" TargetName="ArrowBorder"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="ArrowBorder"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True" SourceName="DropDownButton">
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Pressed}" TargetName="ArrowBorder"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="ArrowBorder"/>
      </Trigger>
      <Trigger Property="IsDropDownOpen" Value="True">
        <Trigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand}"/>
        </Trigger.EnterActions>
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Focused}" TargetName="Base"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2.Top}" TargetName="Border"/>
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Pressed}" TargetName="ArrowBorder"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Over}" TargetName="ArrowBorder"/>
      </Trigger>
      <Trigger Property="IsKeyboardFocused" Value="True" SourceName="PART_EditableTextBox">
        <Setter Property="Background" Value="{DynamicResource Brush.ComboBox.Edit}" TargetName="Base"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Checked}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="{DynamicResource Border.Over}" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}" TargetName="Border"/>
        <Setter Property="Stroke" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="Arrow"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.TextBox.Normal}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Normal}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="6,7"/>
    <Setter Property="MaxDropDownHeight" Value="200"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource Template.ComboBox}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
    <Style.Triggers>
      <Trigger Property="IsEditable" Value="True">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template" Value="{StaticResource Template.ComboBox.Editable}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- ComboBoxItem -->
  <ControlTemplate x:Key="Template.ComboBoxItem" TargetType="ComboBoxItem">
    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Selected}" TargetName="Border"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsMouseOver" Value="True"/>
          <Condition Property="IsSelected" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Background" Value="{DynamicResource Brush.Item.SelectedOver}" TargetName="Border"/>
      </MultiTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"/>
    <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}"/>
    <Setter Property="Padding" Value="12,8.5"/>
    <Setter Property="Template" Value="{StaticResource Template.ComboBoxItem}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Inner.Uniform}"/>
  </Style>

  <!-- TabControl -->
  <ControlTemplate x:Key="Template.TabControl" TargetType="TabControl">
    <Grid KeyboardNavigation.TabNavigation="Local">
      <Grid.RowDefinitions>
        <RowDefinition x:Name="Row0"/>
        <RowDefinition x:Name="Row1"/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition x:Name="Col0"/>
        <ColumnDefinition x:Name="Col1"/>
      </Grid.ColumnDefinitions>
      <TabPanel x:Name="HeaderPanel" Panel.ZIndex="1" Background="Transparent" IsItemsHost="True" KeyboardNavigation.TabIndex="1"/>
      <Border x:Name="SelectedContentBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
        <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
      </Border>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="TabStripPlacement" Value="Top">
        <Setter Property="Height" Value="Auto" TargetName="Row0"/>
        <Setter Property="Height" Value="*" TargetName="Row1"/>
        <Setter Property="Width" Value="*" TargetName="Col0"/>
        <Setter Property="Width" Value="0" TargetName="Col1"/>
        <Setter Property="Grid.Row" Value="0" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Column" Value="0" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Row" Value="1" TargetName="SelectedContentBorder"/>
        <Setter Property="Grid.Column" Value="0" TargetName="SelectedContentBorder"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0.Bottom}" TargetName="SelectedContentBorder"/>
      </Trigger>
      <Trigger Property="TabStripPlacement" Value="Bottom">
        <Setter Property="Height" Value="*" TargetName="Row0"/>
        <Setter Property="Height" Value="Auto" TargetName="Row1"/>
        <Setter Property="Width" Value="*" TargetName="Col0"/>
        <Setter Property="Width" Value="0" TargetName="Col1"/>
        <Setter Property="Grid.Row" Value="1" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Column" Value="0" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Row" Value="0" TargetName="SelectedContentBorder"/>
        <Setter Property="Grid.Column" Value="0" TargetName="SelectedContentBorder"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0.Top}" TargetName="SelectedContentBorder"/>
      </Trigger>
      <Trigger Property="TabStripPlacement" Value="Left">
        <Setter Property="Height" Value="*" TargetName="Row0"/>
        <Setter Property="Height" Value="0" TargetName="Row1"/>
        <Setter Property="Width" Value="Auto" TargetName="Col0"/>
        <Setter Property="Width" Value="*" TargetName="Col1"/>
        <Setter Property="Grid.Row" Value="0" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Column" Value="0" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Row" Value="0" TargetName="SelectedContentBorder"/>
        <Setter Property="Grid.Column" Value="1" TargetName="SelectedContentBorder"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0.Right}" TargetName="SelectedContentBorder"/>
      </Trigger>
      <Trigger Property="TabStripPlacement" Value="Right">
        <Setter Property="Height" Value="*" TargetName="Row0"/>
        <Setter Property="Height" Value="0" TargetName="Row1"/>
        <Setter Property="Width" Value="*" TargetName="Col0"/>
        <Setter Property="Width" Value="Auto" TargetName="Col1"/>
        <Setter Property="Grid.Row" Value="0" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Column" Value="1" TargetName="HeaderPanel"/>
        <Setter Property="Grid.Row" Value="0" TargetName="SelectedContentBorder"/>
        <Setter Property="Grid.Column" Value="0" TargetName="SelectedContentBorder"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border0.Left}" TargetName="SelectedContentBorder"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="TabControl" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Background" Value="{DynamicResource Brush.TabControl.Normal}"/>
    <Setter Property="Padding" Value="12"/>
    <Setter Property="Template" Value="{StaticResource Template.TabControl}"/>
  </Style>

  <!-- TabItem -->
  <ControlTemplate x:Key="Template.TabItem" TargetType="TabItem">
    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
      <ContentPresenter x:Name="ContentHost" ContentSource="Header" TextElement.FontSize="{DynamicResource Font.Size.Header}" TextElement.Foreground="{DynamicResource Brush.Glyph.Normal}"/>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Panel.ZIndex" Value="1"/>
        <Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.Glyph.Over}" TargetName="ContentHost"/>
        <Setter Property="Background" Value="{DynamicResource Brush.TabControl.Over}"/>
      </Trigger>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Panel.ZIndex" Value="2"/>
        <Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.Glyph.Over}" TargetName="ContentHost"/>
        <Setter Property="Background" Value="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.TabControl.Selected}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.Glyph.Disabled}" TargetName="ContentHost"/>
      </Trigger>
      <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Top">
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2.Top}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="0,2,0,0" TargetName="Border"/>
        <Setter Property="Margin" Value="0,-2,0,0" TargetName="ContentHost"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Bottom">
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2.Bottom}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="0,0,0,2" TargetName="Border"/>
        <Setter Property="Margin" Value="0,0,0,-2" TargetName="ContentHost"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Left">
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2.Left}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="2,0,0,0" TargetName="Border"/>
        <Setter Property="Margin" Value="-2,0,0,0" TargetName="ContentHost"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding TabStripPlacement, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}" Value="Right">
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2.Right}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="0,0,2,0" TargetName="Border"/>
        <Setter Property="Margin" Value="0,0,-2,0" TargetName="ContentHost"/>
      </DataTrigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="TabItem" BasedOn="{StaticResource {x:Type HeaderedContentControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12,7.5"/>
    <Setter Property="Template" Value="{StaticResource Template.TabItem}"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Inner.Uniform}"/>
  </Style>

  <!-- TreeView -->
  <ControlTemplate x:Key="Template.TreeView" TargetType="TreeView">
    <ScrollViewer Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Focusable="False">
      <ItemsPresenter Tag="12"/>
    </ScrollViewer>
  </ControlTemplate>
  <Style TargetType="TreeView" BasedOn="{StaticResource {x:Type ItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="VerticalContentAlignment" Value="Stretch"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
    <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource Style.Focus.Outer.Uniform}"/>
    <Setter Property="Template" Value="{StaticResource Template.TreeView}"/>
  </Style>

  <!-- TreeViewItem -->
  <Style x:Key="Style.TreeViewItem.Toggle" TargetType="ToggleButton" BasedOn="{StaticResource Style.Expander.Toggle}"/>
  <Geometry x:Key="Geometry.TreeViewItem.Arrow">M0,0L6,6 0,12</Geometry>
  <ControlTemplate x:Key="Template.TreeViewItem.NoAnim" TargetType="TreeViewItem">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
      <Border x:Name="Border" Grid.Row="0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="Focus" Grid.ColumnSpan="3" BorderThickness="{DynamicResource Border.Focus}" BorderBrush="{DynamicResource Brush.Border.Focus}" CornerRadius="{DynamicResource Corner.Focus}" Visibility="Collapsed"/>
          <Decorator x:Name="CurrentIndent" Grid.Column="0" Width="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type ItemsPresenter}, AncestorLevel=1}}"/>
          <Decorator x:Name="ChildrenIndent" Grid.Column="0" Grid.ColumnSpan="2"/>
          <ToggleButton x:Name="ExpandButton" Grid.Column="1" Style="{StaticResource Style.TreeViewItem.Toggle}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False" Width="32" Margin="-8,0">
            <Path x:Name="Arrow" Data="{StaticResource Geometry.TreeViewItem.Arrow}" Stroke="{DynamicResource Brush.TreeView.Collapsed}" HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.5"/>
          </ToggleButton>
          <ContentPresenter x:Name="PART_Header" Grid.Column="2" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
        </Grid>
      </Border>
      <Decorator x:Name="ItemsBorder" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Visibility="Collapsed">
        <ItemsPresenter x:Name="ItemsHost" Tag="{Binding ActualWidth, ElementName=ChildrenIndent}"/>
      </Decorator>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="HasItems" Value="False">
        <Setter Property="Visibility" Value="Hidden" TargetName="ExpandButton"/>
      </Trigger>
      <Trigger Property="IsExpanded" Value="True">
        <Setter Property="Stroke" Value="{DynamicResource Brush.TreeView.Expanded}" TargetName="Arrow"/>
        <Setter Property="Visibility" Value="Visible" TargetName="ItemsBorder"/>
        <Setter Property="RenderTransform" TargetName="Arrow">
          <Setter.Value>
            <RotateTransform Angle="90"/>
          </Setter.Value>
        </Setter>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="Border">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="ExpandButton">
        <Setter Property="Stroke" Value="{DynamicResource Brush.TreeView.Over}" TargetName="Arrow"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsMouseOver" Value="True" SourceName="ExpandButton"/>
          <Condition Property="IsSelected" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Stroke" Value="{DynamicResource Brush.TreeView.SelectedOver}" TargetName="Arrow"/>
      </MultiTrigger>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Selected}" TargetName="Border"/>
      </Trigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=(local:Element.IsFocusEngaged), RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}" Value="True"/>
          <Condition Binding="{Binding Path=IsKeyboardFocused, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter Property="Visibility" Value="Visible" TargetName="Focus"/>
      </MultiDataTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <ControlTemplate x:Key="Template.TreeViewItem" TargetType="TreeViewItem">
    <ControlTemplate.Resources>
      <Storyboard x:Key="Anim.Loaded">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Tag">
          <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand.Loaded">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="90" Duration="0"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0"/>
      </Storyboard>
      <Storyboard x:Key="Anim.Expand">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="90" Duration="0:0:0.15"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.2">
          <DoubleAnimation.EasingFunction>
            <BackEase EasingMode="EaseOut" Amplitude="0.2"/>
          </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
      </Storyboard>
      <Storyboard x:Key="Anim.Collapse">
        <DoubleAnimation Storyboard.TargetName="Arrow" Storyboard.TargetProperty="RenderTransform.Angle" To="0" Duration="0:0:0.2"/>
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsBorder" Storyboard.TargetProperty="Visibility">
          <DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Collapsed}"/>
        </ObjectAnimationUsingKeyFrames>
        <DoubleAnimation Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="0:0:0.2" AccelerationRatio="0.5"/>
      </Storyboard>
    </ControlTemplate.Resources>
    <Grid x:Name="Root" Tag="0">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
      <Border x:Name="Border" Grid.Row="0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="Focus" Grid.ColumnSpan="3" BorderThickness="{DynamicResource Border.Focus}" BorderBrush="{DynamicResource Brush.Border.Focus}" CornerRadius="{DynamicResource Corner.Focus}" Visibility="Collapsed"/>
          <Decorator x:Name="CurrentIndent" Grid.Column="0" Width="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type ItemsPresenter}, AncestorLevel=1}}"/>
          <Decorator x:Name="ChildrenIndent" Grid.Column="0" Grid.ColumnSpan="2"/>
          <ToggleButton x:Name="ExpandButton" Grid.Column="1" Style="{StaticResource Style.TreeViewItem.Toggle}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False" Width="32" Margin="-8,0">
            <Path x:Name="Arrow" Data="{StaticResource Geometry.TreeViewItem.Arrow}" Stroke="{DynamicResource Brush.TreeView.Collapsed}" HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.5">
              <Path.RenderTransform>
                <RotateTransform />
              </Path.RenderTransform>
            </Path>
          </ToggleButton>
          <ContentPresenter x:Name="PART_Header" Grid.Column="2" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
        </Grid>
      </Border>
      <Decorator x:Name="ItemsBorder" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Visibility="Collapsed">
        <ItemsPresenter x:Name="ItemsHost" Tag="{Binding ActualWidth, ElementName=ChildrenIndent}" RenderTransformOrigin="0.5,0">
          <ItemsPresenter.RenderTransform>
            <ScaleTransform ScaleY="0"/>
          </ItemsPresenter.RenderTransform>
        </ItemsPresenter>
      </Decorator>
    </Grid>
    <ControlTemplate.Triggers>
      <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Root">
        <BeginStoryboard Storyboard="{StaticResource Anim.Loaded}"/>
      </EventTrigger>
      <Trigger Property="HasItems" Value="False">
        <Setter Property="Visibility" Value="Hidden" TargetName="ExpandButton"/>
      </Trigger>
      <Trigger Property="IsExpanded" Value="True">
        <Setter Property="Stroke" Value="{DynamicResource Brush.TreeView.Expanded}" TargetName="Arrow"/>
      </Trigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="0"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand.Loaded}"/>
        </MultiDataTrigger.EnterActions>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Tag, ElementName=Root}" Value="1"/>
          <Condition Binding="{Binding IsExpanded, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <MultiDataTrigger.EnterActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Expand}"/>
        </MultiDataTrigger.EnterActions>
        <MultiDataTrigger.ExitActions>
          <BeginStoryboard Storyboard="{StaticResource Anim.Collapse}"/>
        </MultiDataTrigger.ExitActions>
      </MultiDataTrigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="Border">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True" SourceName="ExpandButton">
        <Setter Property="Stroke" Value="{DynamicResource Brush.TreeView.Over}" TargetName="Arrow"/>
      </Trigger>
      <MultiTrigger>
        <MultiTrigger.Conditions>
          <Condition Property="IsMouseOver" Value="True" SourceName="ExpandButton"/>
          <Condition Property="IsSelected" Value="True"/>
        </MultiTrigger.Conditions>
        <Setter Property="Stroke" Value="{DynamicResource Brush.TreeView.SelectedOver}" TargetName="Arrow"/>
      </MultiTrigger>
      <Trigger Property="IsSelected" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.Item.Selected}" TargetName="Border"/>
      </Trigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=(local:Element.IsFocusEngaged), RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}" Value="True"/>
          <Condition Binding="{Binding Path=IsKeyboardFocused, RelativeSource={RelativeSource Self}}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter Property="Visibility" Value="Visible" TargetName="Focus"/>
      </MultiDataTrigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type HeaderedItemsControl}}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Padding" Value="12,7"/>
    <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}"/>
    <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}"/>
    <Setter Property="Template" Value="{StaticResource Template.TreeViewItem}"/>
  </Style>

  <!-- ToolBar Controls -->
  <ControlTemplate x:Key="Template.ToolBar.Separator" TargetType="Separator">
    <Rectangle Width="1" Fill="{DynamicResource Brush.Border.Normal}" Margin="5,2"/>
  </ControlTemplate>
  <Style x:Key="Style.ToolBar.Separator" TargetType="Separator">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Template" Value="{StaticResource Template.ToolBar.Separator}"/>
  </Style>
  <ControlTemplate x:Key="Template.ToolBar.Button" TargetType="Button">
    <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="{DynamicResource Corner.Border0}">
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.ToolBar.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.ToolBar.Pressed}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="Style.ToolBar.Button" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="5"/>
    <Setter Property="Margin" Value="1"/>
    <Setter Property="MinWidth" Value="28"/>
    <Setter Property="HorizontalAlignment" Value="Center"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource Template.ToolBar.Button}"/>
  </Style>
  <ControlTemplate x:Key="Template.ToolBar.Toggle" TargetType="ToggleButton">
    <Grid>
      <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border0}"/>
      <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.ToolBar.Over}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsPressed" Value="True">
        <Setter Property="Background" Value="{DynamicResource Brush.ToolBar.Pressed}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="BorderBrush" Value="{DynamicResource Brush.ToolBar.Checked}" TargetName="Border"/>
        <Setter Property="BorderThickness" Value="1" TargetName="Border"/>
        <Setter Property="CornerRadius" Value="{DynamicResource Corner.Border2}" TargetName="Border"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{DynamicResource Brush.Foreground.Disabled}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style x:Key="Style.ToolBar.Toggle" TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Padding" Value="5"/>
    <Setter Property="Margin" Value="1"/>
    <Setter Property="MinWidth" Value="28"/>
    <Setter Property="HorizontalAlignment" Value="Center"/>
    <Setter Property="VerticalAlignment" Value="Center"/>
    <Setter Property="Template" Value="{StaticResource Template.ToolBar.Toggle}"/>
  </Style>
  <ControlTemplate x:Key="Template.ToolBar.ComboBox" TargetType="ComboBox">
    <Grid>
      <ToggleButton x:Name="DropDownButton" Style="{StaticResource Style.ComboBox.Toggle}" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="False">
        <Grid>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="Base" Grid.ColumnSpan="2" Background="{TemplateBinding Background}" CornerRadius="{DynamicResource Corner.Border0}"/>
          <Border x:Name="ArrowBorder" Grid.Column="1" Background="{DynamicResource Brush.ComboBox.Normal}" BorderBrush="{DynamicResource Brush.Border.Popup}" BorderThickness="1,0,0,0" CornerRadius="{DynamicResource Corner.Border0.Right}"/>
          <Border x:Name="Border" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{DynamicResource Corner.Border1}" IsHitTestVisible="False"/>
          <Grid Grid.Column="0" Margin="2,0">
            <ContentPresenter x:Name="SelectionBoxItemHost" ContentSource="SelectionBoxItem" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="{TemplateBinding Padding}"/>
            <TextBlock x:Name="Placeholder" Text="{Binding (local:Text.Placeholder), RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource Style.TextBox.Placeholder}
Download .txt
gitextract_jhc26ik1/

├── .gitattributes
├── .gitignore
├── .gitmodules
├── Assets/
│   ├── GUI/
│   │   ├── InGame.xaml
│   │   ├── InventorySlot.xaml
│   │   ├── MainMenu.xaml
│   │   └── Theme/
│   │       ├── Brushes.xaml
│   │       ├── Colors.xaml
│   │       ├── Fonts.xaml
│   │       ├── NEWorld.xaml
│   │       └── Styles.xaml
│   ├── Shaders/
│   │   ├── Depth.fsh
│   │   ├── Depth.vsh
│   │   ├── Main.fsh
│   │   ├── Main.vsh
│   │   ├── Particle.fsh
│   │   ├── Particle.vsh
│   │   ├── Shadow.fsh
│   │   ├── Shadow.vsh
│   │   ├── Simple.fsh
│   │   └── Simple.vsh
│   └── Translations/
│       ├── Keys.json
│       ├── Langs.txt
│       ├── en_US.lang
│       ├── zh_CN.lang
│       └── zh_TW.lang
├── CMakeLists.txt
├── External/
│   ├── bvh/
│   │   ├── binned_sah_builder.hpp
│   │   ├── bottom_up_algorithm.hpp
│   │   ├── bounding_box.hpp
│   │   ├── bvh.hpp
│   │   ├── heuristic_primitive_splitter.hpp
│   │   ├── hierarchy_refitter.hpp
│   │   ├── leaf_collapser.hpp
│   │   ├── linear_bvh_builder.hpp
│   │   ├── locally_ordered_clustering_builder.hpp
│   │   ├── morton.hpp
│   │   ├── morton_code_based_builder.hpp
│   │   ├── node_intersectors.hpp
│   │   ├── node_layout_optimizer.hpp
│   │   ├── parallel_reinsertion_optimizer.hpp
│   │   ├── platform.hpp
│   │   ├── prefix_sum.hpp
│   │   ├── primitive_intersectors.hpp
│   │   ├── radix_sort.hpp
│   │   ├── ray.hpp
│   │   ├── sah_based_algorithm.hpp
│   │   ├── single_ray_traverser.hpp
│   │   ├── spatial_split_bvh_builder.hpp
│   │   ├── sphere.hpp
│   │   ├── sweep_sah_builder.hpp
│   │   ├── top_down_builder.hpp
│   │   ├── triangle.hpp
│   │   ├── utilities.hpp
│   │   └── vector.hpp
│   ├── stb/
│   │   └── stb_rect_pack.h
│   └── tsl/
│       ├── bhopscotch_map.h
│       ├── bhopscotch_set.h
│       ├── hopscotch_growth_policy.h
│       ├── hopscotch_hash.h
│       ├── hopscotch_map.h
│       └── hopscotch_set.h
├── NEWorld.Base/
│   ├── Common/
│   │   ├── Console.cpp
│   │   ├── Console.h
│   │   ├── Logger.cpp
│   │   └── Logger.h
│   ├── Math/
│   │   ├── Vector2.h
│   │   ├── Vector3.h
│   │   └── Vector4.h
│   └── System/
│       ├── FileSystem.h
│       ├── MessageBus.cpp
│       └── MessageBus.h
├── NEWorld.Game/
│   ├── Audio/
│   │   ├── Audio.cpp
│   │   └── Audio.h
│   ├── AudioSystem.cpp
│   ├── AudioSystem.h
│   ├── Command.h
│   ├── ControlContext.h
│   ├── Definitions.cpp
│   ├── Definitions.h
│   ├── Dispatch.cpp
│   ├── Dispatch.h
│   ├── Frustum.cpp
│   ├── Frustum.h
│   ├── FunctionsKit.cpp
│   ├── FunctionsKit.h
│   ├── GUI/
│   │   ├── GUI.cpp
│   │   ├── GUI.h
│   │   ├── InventorySlot.cpp
│   │   ├── InventorySlot.h
│   │   ├── Menus/
│   │   │   ├── MainMenu.cpp
│   │   │   └── Menus.h
│   │   ├── Noesis.cpp
│   │   └── Noesis.h
│   ├── GameSettings.cpp
│   ├── GameSettings.h
│   ├── GameView.cpp
│   ├── GameView.h
│   ├── Globalization.cpp
│   ├── Globalization.h
│   ├── Items.cpp
│   ├── Items.h
│   ├── Menus.h
│   ├── NEWorld.cpp
│   ├── Particles.cpp
│   ├── Particles.h
│   ├── Renderer/
│   │   ├── BufferBuilder.h
│   │   ├── GL/
│   │   │   ├── Objects.cpp
│   │   │   ├── Objects.h
│   │   │   ├── Pipeline.cpp
│   │   │   └── Pipeline.h
│   │   ├── Renderer.cpp
│   │   ├── Renderer.h
│   │   └── World/
│   │       ├── ChunkRenderer.cpp
│   │       ├── ChunkRenderer.h
│   │       ├── ShadowMaps.cpp
│   │       ├── ShadowMaps.h
│   │       ├── WorldRenderer.cpp
│   │       └── WorldRenderer.h
│   ├── Setup.cpp
│   ├── Setup.h
│   ├── Textures.cpp
│   ├── Textures.h
│   ├── Tick.cpp
│   ├── Tick.h
│   ├── Typedefs.h
│   ├── Universe/
│   │   ├── CommandHandler.h
│   │   ├── Entity/
│   │   │   ├── Entity.cpp
│   │   │   ├── Entity.h
│   │   │   ├── PlayerEntity.cpp
│   │   │   ├── PlayerEntity.h
│   │   │   ├── bvh.cpp
│   │   │   └── bvh.h
│   │   ├── Game.h
│   │   └── World/
│   │       ├── BlockRegistry.cpp
│   │       ├── BlockRegistry.h
│   │       ├── Blocks.cpp
│   │       ├── Blocks.h
│   │       ├── Chunk.cpp
│   │       ├── Chunk.h
│   │       ├── ChunkPtrArray.cpp
│   │       ├── ChunkPtrArray.h
│   │       ├── Data/
│   │       │   ├── BitStorage.h
│   │       │   ├── ChunkStorage.cpp
│   │       │   └── ChunkStorage.h
│   │       ├── OrderedArray.h
│   │       ├── TerrainGen/
│   │       │   ├── Carve.cpp
│   │       │   ├── Generate.h
│   │       │   ├── Heights.h
│   │       │   └── Noise.h
│   │       ├── World.cpp
│   │       └── World.h
│   ├── resource.h
│   ├── resource.rc
│   └── stdinclude.h
├── NoesisGUI/
│   ├── CMake/
│   │   └── FindNoesis.cmake
│   ├── CMakeLists.txt
│   └── bin2h.py
└── README.md
Download .txt
SYMBOL INDEX (785 symbols across 115 files)

FILE: External/bvh/binned_sah_builder.hpp
  type bvh (line 11) | namespace bvh {
    class BinnedSahBuildTask (line 13) | class BinnedSahBuildTask
      type Bin (line 76) | struct Bin {
      method find_split (line 89) | std::pair<Scalar, size_t> find_split(int axis) {
      method BinnedSahBuildTask (line 119) | BinnedSahBuildTask(Builder& builder, const BoundingBox<Scalar>* bbox...
      method build (line 123) | std::optional<std::pair<WorkItem, WorkItem>> build(const WorkItem& i...
    class BinnedSahBuilder (line 20) | class BinnedSahBuilder : public TopDownBuilder, public SahBasedAlgorit...
      method BinnedSahBuilder (line 35) | BinnedSahBuilder(Bvh& bvh)
      method build (line 39) | void build(
    class BinnedSahBuildTask (line 70) | class BinnedSahBuildTask : public TopDownBuildTask {
      type Bin (line 76) | struct Bin {
      method find_split (line 89) | std::pair<Scalar, size_t> find_split(int axis) {
      method BinnedSahBuildTask (line 119) | BinnedSahBuildTask(Builder& builder, const BoundingBox<Scalar>* bbox...
      method build (line 123) | std::optional<std::pair<WorkItem, WorkItem>> build(const WorkItem& i...

FILE: External/bvh/bottom_up_algorithm.hpp
  type bvh (line 10) | namespace bvh {
    class BottomUpAlgorithm (line 16) | class BottomUpAlgorithm {
      method BottomUpAlgorithm (line 23) | BottomUpAlgorithm(Bvh& bvh)
      method traverse_in_parallel (line 48) | void traverse_in_parallel(

FILE: External/bvh/bounding_box.hpp
  type bvh (line 6) | namespace bvh {
    type BoundingBox (line 10) | struct BoundingBox {
      method BoundingBox (line 13) | BoundingBox() = default;
      method bvh_always_inline (line 17) | bvh_always_inline BoundingBox& shrink(const BoundingBox& bbox) {
      method bvh_always_inline (line 23) | bvh_always_inline BoundingBox& extend(const BoundingBox& bbox) {
      method bvh_always_inline (line 29) | bvh_always_inline BoundingBox& extend(const Vector3<Scalar>& v) {
      method diagonal (line 35) | diagonal() const {
      method center (line 39) | center() const {
      method bvh_always_inline (line 43) | bvh_always_inline Scalar half_area() const {
      method bvh_always_inline (line 48) | bvh_always_inline Scalar volume() const {
      method bvh_always_inline (line 53) | bvh_always_inline size_t largest_axis() const {
      method bvh_always_inline (line 61) | bvh_always_inline Scalar largest_extent() const {
      method bvh_always_inline (line 65) | bvh_always_inline bool is_contained_in(const BoundingBox& other) con...
      method full (line 72) | full() {
      method empty (line 78) | empty() {

FILE: External/bvh/bvh.hpp
  type bvh (line 11) | namespace bvh {
    type Bvh (line 19) | struct Bvh {
      type Node (line 25) | struct Node {
        method is_leaf (line 30) | bool is_leaf() const { return primitive_count != 0; }
        type BoundingBoxProxy (line 34) | struct BoundingBoxProxy {
          method BoundingBoxProxy (line 37) | BoundingBoxProxy(Node& node)
          method BoundingBoxProxy (line 41) | BoundingBoxProxy& operator = (const BoundingBox<Scalar>& bbox) {
          method to_bounding_box (line 57) | BoundingBox<Scalar> to_bounding_box() const {
          method Scalar (line 61) | Scalar half_area() const { return to_bounding_box().half_area(); }
          method BoundingBoxProxy (line 63) | BoundingBoxProxy& extend(const BoundingBox<Scalar>& bbox) {
          method BoundingBoxProxy (line 67) | BoundingBoxProxy& extend(const Vector3<Scalar>& vector) {
        method BoundingBoxProxy (line 72) | BoundingBoxProxy bounding_box_proxy() {
          method BoundingBoxProxy (line 37) | BoundingBoxProxy(Node& node)
          method BoundingBoxProxy (line 41) | BoundingBoxProxy& operator = (const BoundingBox<Scalar>& bbox) {
          method to_bounding_box (line 57) | BoundingBox<Scalar> to_bounding_box() const {
          method Scalar (line 61) | Scalar half_area() const { return to_bounding_box().half_area(); }
          method BoundingBoxProxy (line 63) | BoundingBoxProxy& extend(const BoundingBox<Scalar>& bbox) {
          method BoundingBoxProxy (line 67) | BoundingBoxProxy& extend(const Vector3<Scalar>& vector) {
        method BoundingBoxProxy (line 76) | const BoundingBoxProxy bounding_box_proxy() const {
          method BoundingBoxProxy (line 37) | BoundingBoxProxy(Node& node)
          method BoundingBoxProxy (line 41) | BoundingBoxProxy& operator = (const BoundingBox<Scalar>& bbox) {
          method to_bounding_box (line 57) | BoundingBox<Scalar> to_bounding_box() const {
          method Scalar (line 61) | Scalar half_area() const { return to_bounding_box().half_area(); }
          method BoundingBoxProxy (line 63) | BoundingBoxProxy& extend(const BoundingBox<Scalar>& bbox) {
          method BoundingBoxProxy (line 67) | BoundingBoxProxy& extend(const Vector3<Scalar>& vector) {
      method sibling (line 82) | static size_t sibling(size_t index) {
      method is_left_sibling (line 88) | static bool is_left_sibling(size_t index) {

FILE: External/bvh/heuristic_primitive_splitter.hpp
  type bvh (line 12) | namespace bvh {
    class HeuristicPrimitiveSplitter (line 18) | class HeuristicPrimitiveSplitter {
      method Scalar (line 25) | static Scalar compute_priority(const Primitive& primitive, const Bou...
      method split (line 35) | std::tuple<size_t, std::unique_ptr<BoundingBox<Scalar>[]>, std::uniq...
      method repair_bvh_leaves (line 139) | void repair_bvh_leaves(Bvh<Scalar>& bvh) {

FILE: External/bvh/hierarchy_refitter.hpp
  type bvh (line 8) | namespace bvh {
    class HierarchyRefitter (line 11) | class HierarchyRefitter : public BottomUpAlgorithm<Bvh> {
      method refit_in_parallel (line 18) | void refit_in_parallel(const UpdateLeaf& update_leaf) {
      method HierarchyRefitter (line 35) | HierarchyRefitter(Bvh& bvh)
      method refit (line 40) | void refit(const UpdateLeaf& update_leaf) {

FILE: External/bvh/leaf_collapser.hpp
  type bvh (line 12) | namespace bvh {
    class LeafCollapser (line 19) | class LeafCollapser : public SahBasedAlgorithm<Bvh>, public BottomUpAl...
      method LeafCollapser (line 31) | LeafCollapser(Bvh& bvh)
      method collapse (line 35) | void collapse() {

FILE: External/bvh/linear_bvh_builder.hpp
  type bvh (line 11) | namespace bvh {
    class LinearBvhBuilder (line 17) | class LinearBvhBuilder : public MortonCodeBasedBuilder<Bvh, Morton> {
      method merge (line 30) | std::pair<size_t, size_t> merge(
      method LinearBvhBuilder (line 114) | LinearBvhBuilder(Bvh& bvh)
      method build (line 118) | void build(

FILE: External/bvh/locally_ordered_clustering_builder.hpp
  type bvh (line 10) | namespace bvh {
    class LocallyOrderedClusteringBuilder (line 21) | class LocallyOrderedClusteringBuilder : public MortonCodeBasedBuilder<...
      method search_range (line 32) | std::pair<size_t, size_t> search_range(size_t i, size_t begin, size_...
      method cluster (line 38) | std::pair<size_t, size_t> cluster(
      method LocallyOrderedClusteringBuilder (line 182) | LocallyOrderedClusteringBuilder(Bvh& bvh)
      method build (line 186) | void build(

FILE: External/bvh/morton.hpp
  type bvh (line 10) | namespace bvh {
    function Morton (line 15) | Morton morton_split(Morton x) {
    function Morton (line 29) | Morton morton_encode(Morton x, Morton y, Morton z) {
    class MortonEncoder (line 36) | class MortonEncoder {
      method MortonEncoder (line 44) | MortonEncoder(const BoundingBox<Scalar>& bbox, size_t grid_dim = max...
      method Morton (line 53) | Morton encode(const Vector3<Scalar>& point) const {

FILE: External/bvh/morton_code_based_builder.hpp
  type bvh (line 14) | namespace bvh {
    class MortonCodeBasedBuilder (line 17) | class MortonCodeBasedBuilder {
      method SortedPairs (line 43) | SortedPairs sort_primitives_by_morton_code(

FILE: External/bvh/node_intersectors.hpp
  type bvh (line 11) | namespace bvh {
    type NodeIntersector (line 15) | struct NodeIntersector {
      method NodeIntersector (line 20) | NodeIntersector(const Ray<Scalar>& ray)
      method bvh_always_inline (line 29) | bvh_always_inline
  type RobustNodeIntersector (line 55) | struct RobustNodeIntersector : public NodeIntersector<Bvh, RobustNodeInt...
    method RobustNodeIntersector (line 62) | RobustNodeIntersector(const Ray<Scalar>& ray)
    method bvh_always_inline (line 73) | bvh_always_inline
  type FastNodeIntersector (line 83) | struct FastNodeIntersector : public NodeIntersector<Bvh, FastNodeInterse...
    method FastNodeIntersector (line 89) | FastNodeIntersector(const Ray<Scalar>& ray)
    method bvh_always_inline (line 97) | bvh_always_inline

FILE: External/bvh/node_layout_optimizer.hpp
  type bvh (line 10) | namespace bvh {
    class NodeLayoutOptimizer (line 17) | class NodeLayoutOptimizer {
      method NodeLayoutOptimizer (line 26) | NodeLayoutOptimizer(Bvh& bvh)
      method optimize (line 30) | void optimize() {

FILE: External/bvh/parallel_reinsertion_optimizer.hpp
  type bvh (line 10) | namespace bvh {
    class ParallelReinsertionOptimizer (line 17) | class ParallelReinsertionOptimizer :
      method ParallelReinsertionOptimizer (line 30) | ParallelReinsertionOptimizer(Bvh& bvh)
      method get_conflicts (line 35) | std::array<size_t, 6> get_conflicts(size_t in, size_t out) {
      method reinsert (line 48) | void reinsert(size_t in, size_t out) {
      method Insertion (line 74) | Insertion search(size_t in) {
      method optimize (line 140) | void optimize(size_t u = 9, Scalar threshold = 0.1) {

FILE: External/bvh/platform.hpp
  type bvh (line 22) | namespace bvh {
    function get_thread_count (line 25) | inline size_t get_thread_count() { return omp_get_num_threads(); }
    function get_thread_id (line 26) | inline size_t get_thread_id()    { return omp_get_thread_num(); }
    function assert_not_in_parallel (line 27) | inline void assert_not_in_parallel() { assert(omp_get_level() == 0); }
    function assert_in_parallel (line 28) | inline void assert_in_parallel() { assert(omp_get_level() > 0); }
    function get_thread_count (line 30) | inline constexpr size_t get_thread_count() { return 1; }
    function get_thread_id (line 31) | inline constexpr size_t get_thread_id()    { return 0; }
    function assert_not_in_parallel (line 32) | inline void assert_not_in_parallel() {}
    function assert_in_parallel (line 33) | inline void assert_in_parallel() {}

FILE: External/bvh/prefix_sum.hpp
  type bvh (line 10) | namespace bvh {
    class PrefixSum (line 16) | class PrefixSum {
      method sum_in_parallel (line 20) | void sum_in_parallel(const T* input, T* output, size_t count, F f = ...

FILE: External/bvh/primitive_intersectors.hpp
  type bvh (line 8) | namespace bvh {
    type PrimitiveIntersector (line 12) | struct PrimitiveIntersector {
      method PrimitiveIntersector (line 13) | PrimitiveIntersector(const Bvh& bvh, const Primitive* primitives)
      method primitive_at (line 17) | std::pair<const Primitive&, size_t> primitive_at(size_t index) const {
    type ClosestPrimitiveIntersector (line 33) | struct ClosestPrimitiveIntersector : public PrimitiveIntersector<Bvh, ...
      type Result (line 37) | struct Result {
        method Scalar (line 41) | Scalar distance() const { return intersection.distance(); }
      method ClosestPrimitiveIntersector (line 44) | ClosestPrimitiveIntersector(const Bvh& bvh, const Primitive* primiti...
      method intersect (line 48) | std::optional<Result> intersect(size_t index, const Ray<Scalar>& ray...
    type AnyPrimitiveIntersector (line 58) | struct AnyPrimitiveIntersector : public PrimitiveIntersector<Bvh, Prim...
      type Result (line 61) | struct Result {
        method Scalar (line 63) | Scalar distance() const { return t; }
      method AnyPrimitiveIntersector (line 66) | AnyPrimitiveIntersector(const Bvh& bvh, const Primitive* primitives)
      method intersect (line 70) | std::optional<Result> intersect(size_t index, const Ray<Scalar>& ray...

FILE: External/bvh/radix_sort.hpp
  type bvh (line 11) | namespace bvh {
    class RadixSort (line 15) | class RadixSort {
      method if (line 40) | if (per_thread_data_size < data_size) {
  function make_key (line 89) | static typename SizedIntegerType<sizeof(T) * CHAR_BIT>::Unsigned make_ke...

FILE: External/bvh/ray.hpp
  type bvh (line 6) | namespace bvh {
    type Ray (line 10) | struct Ray {
      method Ray (line 16) | Ray() = default;
      method Ray (line 17) | Ray(const Vector3<Scalar>& origin,

FILE: External/bvh/sah_based_algorithm.hpp
  type bvh (line 6) | namespace bvh {
    class SahBasedAlgorithm (line 9) | class SahBasedAlgorithm {
      method Scalar (line 21) | Scalar compute_cost(const Bvh& bvh) const {

FILE: External/bvh/single_ray_traverser.hpp
  type bvh (line 11) | namespace bvh {
    class SingleRayTraverser (line 15) | class SingleRayTraverser {
      type Stack (line 22) | struct Stack {
        method push (line 28) | void push(const Element& t) {
        method Element (line 33) | Element pop() {
        method empty (line 38) | bool empty() const { return size == 0; }
      method bvh_always_inline (line 42) | bvh_always_inline
      method bvh_always_inline (line 66) | bvh_always_inline
      type Statistics (line 132) | struct Statistics {
      method SingleRayTraverser (line 137) | SingleRayTraverser(const Bvh& bvh)
      method bvh_always_inline (line 143) | bvh_always_inline
      method bvh_always_inline (line 159) | bvh_always_inline

FILE: External/bvh/spatial_split_bvh_builder.hpp
  type bvh (line 13) | namespace bvh {
    class SpatialSplitBvhBuildTask (line 15) | class SpatialSplitBvhBuildTask
      type WorkItem (line 114) | struct WorkItem : public TopDownBuildTask::WorkItem {
        method WorkItem (line 118) | WorkItem() = default;
        method WorkItem (line 119) | WorkItem(
      type Reference (line 132) | struct Reference {
      type Bin (line 138) | struct Bin {
      type ObjectSplit (line 145) | struct ObjectSplit {
        method ObjectSplit (line 153) | ObjectSplit(
      type SpatialSplit (line 163) | struct SpatialSplit {
        method SpatialSplit (line 168) | SpatialSplit(
      method ObjectSplit (line 191) | ObjectSplit find_object_split(size_t begin, size_t end, bool is_sort...
        method ObjectSplit (line 153) | ObjectSplit(
      method allocate_children (line 223) | std::pair<WorkItem, WorkItem> allocate_children(
      method apply_object_split (line 276) | std::pair<WorkItem, WorkItem> apply_object_split(Bvh& bvh, const Obj...
      method run_binning_pass (line 296) | std::optional<std::pair<Scalar, Scalar>>
      method SpatialSplit (line 348) | SpatialSplit find_spatial_split(const BoundingBox<Scalar>& node_bbox...
        method SpatialSplit (line 168) | SpatialSplit(
      method apply_spatial_split (line 365) | std::pair<WorkItem, WorkItem> apply_spatial_split(Bvh& bvh, const Sp...
      method SpatialSplitBvhBuildTask (line 474) | SpatialSplitBvhBuildTask(
      method SpatialSplitBvhBuildTask (line 491) | SpatialSplitBvhBuildTask(const SpatialSplitBvhBuildTask& other)
      method build (line 504) | std::optional<std::pair<WorkItem, WorkItem>> build(const WorkItem& i...
    class SpatialSplitBvhBuilder (line 23) | class SpatialSplitBvhBuilder : public TopDownBuilder, public SahBasedA...
      method SpatialSplitBvhBuilder (line 44) | SpatialSplitBvhBuilder(Bvh& bvh)
      method build (line 48) | size_t build(
    class SpatialSplitBvhBuildTask (line 110) | class SpatialSplitBvhBuildTask : public TopDownBuildTask {
      type WorkItem (line 114) | struct WorkItem : public TopDownBuildTask::WorkItem {
        method WorkItem (line 118) | WorkItem() = default;
        method WorkItem (line 119) | WorkItem(
      type Reference (line 132) | struct Reference {
      type Bin (line 138) | struct Bin {
      type ObjectSplit (line 145) | struct ObjectSplit {
        method ObjectSplit (line 153) | ObjectSplit(
      type SpatialSplit (line 163) | struct SpatialSplit {
        method SpatialSplit (line 168) | SpatialSplit(
      method ObjectSplit (line 191) | ObjectSplit find_object_split(size_t begin, size_t end, bool is_sort...
        method ObjectSplit (line 153) | ObjectSplit(
      method allocate_children (line 223) | std::pair<WorkItem, WorkItem> allocate_children(
      method apply_object_split (line 276) | std::pair<WorkItem, WorkItem> apply_object_split(Bvh& bvh, const Obj...
      method run_binning_pass (line 296) | std::optional<std::pair<Scalar, Scalar>>
      method SpatialSplit (line 348) | SpatialSplit find_spatial_split(const BoundingBox<Scalar>& node_bbox...
        method SpatialSplit (line 168) | SpatialSplit(
      method apply_spatial_split (line 365) | std::pair<WorkItem, WorkItem> apply_spatial_split(Bvh& bvh, const Sp...
      method SpatialSplitBvhBuildTask (line 474) | SpatialSplitBvhBuildTask(
      method SpatialSplitBvhBuildTask (line 491) | SpatialSplitBvhBuildTask(const SpatialSplitBvhBuildTask& other)
      method build (line 504) | std::optional<std::pair<WorkItem, WorkItem>> build(const WorkItem& i...

FILE: External/bvh/sphere.hpp
  type bvh (line 10) | namespace bvh {
    type Sphere (line 14) | struct Sphere  {
      type Intersection (line 15) | struct Intersection {
        method Scalar (line 18) | Scalar distance() const { return t; }
      method Sphere (line 27) | Sphere() = default;
      method Sphere (line 28) | Sphere(const Vector3<Scalar>& origin, Scalar radius)
      method center (line 32) | Vector3<Scalar> center() const {
      method bounding_box (line 36) | BoundingBox<Scalar> bounding_box() const {
      method intersect (line 41) | std::optional<Intersection> intersect(const Ray<Scalar>& ray) const {

FILE: External/bvh/sweep_sah_builder.hpp
  type bvh (line 13) | namespace bvh {
    class SweepSahBuildTask (line 15) | class SweepSahBuildTask
      method find_split (line 130) | std::pair<Scalar, size_t> find_split(int axis, size_t begin, size_t ...
      method SweepSahBuildTask (line 151) | SweepSahBuildTask(
      method build (line 166) | std::optional<std::pair<WorkItem, WorkItem>> build(const WorkItem& i...
    class SweepSahBuilder (line 21) | class SweepSahBuilder : public TopDownBuilder, public SahBasedAlgorith...
      method SweepSahBuilder (line 39) | SweepSahBuilder(Bvh& bvh)
      method build (line 43) | void build(
    class SweepSahBuildTask (line 115) | class SweepSahBuildTask : public TopDownBuildTask {
      method find_split (line 130) | std::pair<Scalar, size_t> find_split(int axis, size_t begin, size_t ...
      method SweepSahBuildTask (line 151) | SweepSahBuildTask(
      method build (line 166) | std::optional<std::pair<WorkItem, WorkItem>> build(const WorkItem& i...

FILE: External/bvh/top_down_builder.hpp
  type bvh (line 7) | namespace bvh {
    class TopDownBuildTask (line 10) | class TopDownBuildTask {
      type WorkItem (line 12) | struct WorkItem {
        method WorkItem (line 18) | WorkItem() = default;
        method WorkItem (line 19) | WorkItem(size_t node_index, size_t begin, size_t end, size_t depth)
        method work_size (line 23) | size_t work_size() const { return end - begin; }
    class TopDownBuilder (line 28) | class TopDownBuilder {
      method run_task (line 47) | void run_task(BuildTask& task, Args&&... args) {

FILE: External/bvh/triangle.hpp
  type bvh (line 12) | namespace bvh {
    type Triangle (line 18) | struct Triangle {
      type Intersection (line 19) | struct Intersection {
        method Scalar (line 21) | Scalar distance() const { return t; }
      method Triangle (line 29) | Triangle() = default;
      method Triangle (line 30) | Triangle(const Vector3<Scalar>& p0, const Vector3<Scalar>& p1, const...
      method p1 (line 36) | Vector3<Scalar> p1() const { return p0 - e1; }
      method p2 (line 37) | Vector3<Scalar> p2() const { return p0 + e2; }
      method bounding_box (line 39) | BoundingBox<Scalar> bounding_box() const {
      method center (line 46) | Vector3<Scalar> center() const {
      method edge (line 50) | std::pair<Vector3<Scalar>, Vector3<Scalar>> edge(size_t i) const {
      method Scalar (line 56) | Scalar area() const {
      method split (line 60) | std::pair<BoundingBox<Scalar>, BoundingBox<Scalar>> split(size_t axi...
      method intersect (line 95) | std::optional<Intersection> intersect(const Ray<Scalar>& ray) const {

FILE: External/bvh/utilities.hpp
  type bvh (line 16) | namespace bvh {
    function To (line 20) | To as(From from) {
    function product_sign (line 28) | inline float product_sign(float x, float y) {
    function product_sign (line 33) | inline double product_sign(double x, double y) {
    function fast_multiply_add (line 43) | inline float fast_multiply_add(float x, float y, float z) {
    function fast_multiply_add (line 51) | inline double fast_multiply_add(double x, double y, double z) {
    function T (line 62) | const T& robust_min(const T& x, const T& y) {
    function T (line 69) | const T& robust_max(const T& x, const T& y) {
    function atomic_max (line 74) | void atomic_max(std::atomic<T>& x, T y) {
    type SizedIntegerType (line 81) | struct SizedIntegerType {
    type SizedIntegerType<64> (line 88) | struct SizedIntegerType<64> {
    type SizedIntegerType<32> (line 94) | struct SizedIntegerType<32> {
    type SizedIntegerType<16> (line 100) | struct SizedIntegerType<16> {
    function T (line 107) | T add_ulp_magnitude(T x, unsigned ulps) {
    function round_up_log2 (line 113) | inline constexpr size_t round_up_log2(size_t i, size_t p = 0) {
    function count_leading_zeros (line 120) | size_t count_leading_zeros(T value) {
    function permute_primitives (line 137) | std::unique_ptr<Primitive[]> permute_primitives(const Primitive* primi...
    function compute_bounding_boxes_and_centers (line 147) | std::pair<std::unique_ptr<BoundingBox<Scalar>[]>, std::unique_ptr<Vect...
    function compute_bounding_boxes_union (line 163) | BoundingBox<Scalar> compute_bounding_boxes_union(const BoundingBox<Sca...

FILE: External/bvh/vector.hpp
  type bvh (line 13) | namespace bvh {
    type Vector (line 15) | struct Vector
      method Vector (line 37) | Vector() = default;
      method bvh_always_inline (line 38) | bvh_always_inline explicit Vector(Scalar s) { std::fill(values, valu...
      method bvh_always_inline (line 41) | bvh_always_inline explicit Vector(const Vector<Scalar, M>& other) {
      method bvh_always_inline (line 46) | bvh_always_inline Vector(Scalar first, Scalar second, Args... args) {
      method bvh_always_inline (line 51) | bvh_always_inline Vector(F f) {
      method bvh_always_inline (line 57) | bvh_always_inline void set(Args... args) {
      method bvh_always_inline (line 61) | bvh_always_inline Vector operator - () const {
      method bvh_always_inline (line 65) | bvh_always_inline Vector inverse() const {
      method bvh_always_inline (line 69) | bvh_always_inline Vector safe_inverse() const {
      method bvh_always_inline (line 76) | bvh_always_inline Vector& operator += (const Vector& other) {
      method bvh_always_inline (line 80) | bvh_always_inline Vector& operator -= (const Vector& other) {
      method bvh_always_inline (line 84) | bvh_always_inline Vector& operator *= (const Vector& other) {
      method bvh_always_inline (line 88) | bvh_always_inline Scalar& operator [] (size_t i) { return values[i]; }
      method bvh_always_inline (line 89) | bvh_always_inline Scalar  operator [] (size_t i) const { return valu...
    type VectorSetter (line 19) | struct VectorSetter {
      method bvh_always_inline (line 21) | bvh_always_inline static void set(Vector<Scalar, N>& v, Scalar s, Ar...
    type VectorSetter<N, Scalar, N> (line 28) | struct VectorSetter<N, Scalar, N> {
      method bvh_always_inline (line 29) | bvh_always_inline static void set(Vector<Scalar, N>&) {}
    type Vector (line 34) | struct Vector {
      method Vector (line 37) | Vector() = default;
      method bvh_always_inline (line 38) | bvh_always_inline explicit Vector(Scalar s) { std::fill(values, valu...
      method bvh_always_inline (line 41) | bvh_always_inline explicit Vector(const Vector<Scalar, M>& other) {
      method bvh_always_inline (line 46) | bvh_always_inline Vector(Scalar first, Scalar second, Args... args) {
      method bvh_always_inline (line 51) | bvh_always_inline Vector(F f) {
      method bvh_always_inline (line 57) | bvh_always_inline void set(Args... args) {
      method bvh_always_inline (line 61) | bvh_always_inline Vector operator - () const {
      method bvh_always_inline (line 65) | bvh_always_inline Vector inverse() const {
      method bvh_always_inline (line 69) | bvh_always_inline Vector safe_inverse() const {
      method bvh_always_inline (line 76) | bvh_always_inline Vector& operator += (const Vector& other) {
      method bvh_always_inline (line 80) | bvh_always_inline Vector& operator -= (const Vector& other) {
      method bvh_always_inline (line 84) | bvh_always_inline Vector& operator *= (const Vector& other) {
      method bvh_always_inline (line 88) | bvh_always_inline Scalar& operator [] (size_t i) { return values[i]; }
      method bvh_always_inline (line 89) | bvh_always_inline Scalar  operator [] (size_t i) const { return valu...
    function bvh_always_inline (line 93) | bvh_always_inline
    function bvh_always_inline (line 99) | bvh_always_inline
    function bvh_always_inline (line 105) | bvh_always_inline
    function bvh_always_inline (line 111) | bvh_always_inline
    function bvh_always_inline (line 117) | bvh_always_inline
    function bvh_always_inline (line 123) | bvh_always_inline
    function bvh_always_inline (line 129) | bvh_always_inline
    function bvh_always_inline (line 135) | bvh_always_inline
    function bvh_always_inline (line 144) | bvh_always_inline
    function bvh_always_inline (line 150) | bvh_always_inline
    function bvh_always_inline (line 160) | bvh_always_inline

FILE: External/stb/stb_rect_pack.h
  type stbrp_context (line 81) | typedef struct stbrp_context stbrp_context;
  type stbrp_node (line 82) | typedef struct stbrp_node    stbrp_node;
  type stbrp_rect (line 83) | typedef struct stbrp_rect    stbrp_rect;
  type stbrp_coord (line 85) | typedef int            stbrp_coord;
  type stbrp_rect (line 115) | struct stbrp_rect
  type stbrp_node (line 175) | struct stbrp_node
  type stbrp_context (line 181) | struct stbrp_context
  function STBRP_DEF (line 229) | STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
  function STBRP_DEF (line 241) | STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int ...
  function STBRP_DEF (line 261) | STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int ...
  function stbrp__skyline_find_min_y (line 287) | static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first...
  type stbrp__findresult (line 337) | typedef struct
  function stbrp__findresult (line 343) | static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, ...
  function stbrp__findresult (line 445) | static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *co...
  function rect_height_compare (line 524) | static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
  function rect_original_order (line 535) | static int STBRP__CDECL rect_original_order(const void *a, const void *b)
  function STBRP_DEF (line 542) | STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects...

FILE: External/tsl/bhopscotch_map.h
  function namespace (line 39) | namespace tsl {
  function explicit (line 130) | explicit bhopscotch_map(size_type bucket_count,
  function iterator (line 218) | iterator begin() noexcept { return m_ht.begin(); }
  function iterator (line 222) | iterator end() noexcept { return m_ht.end(); }
  function clear (line 237) | void clear() noexcept { m_ht.clear(); }
  function iterator (line 256) | iterator insert(const_iterator hint, const value_type& value) {
  function iterator (line 265) | iterator insert(const_iterator hint, value_type&& value) {
  function insert (line 275) | void insert(std::initializer_list<value_type> ilist) {
  function iterator (line 355) | iterator erase(iterator pos) { return m_ht.erase(pos); }
  function iterator (line 356) | iterator erase(const_iterator pos) { return m_ht.erase(pos); }
  function iterator (line 357) | iterator erase(const_iterator first, const_iterator last) { return m_ht....
  function size_type (line 358) | size_type erase(const key_type& key) { return m_ht.erase(key); }
  function size_type (line 364) | size_type erase(const key_type& key, std::size_t precalculated_hash) {
  function precalculated_hash (line 385) | size_t precalculated_hash) { return m_ht.erase(key, precalculated_hash); }
  function swap (line 390) | void swap(bhopscotch_map& other) { other.m_ht.swap(m_ht); }
  function T (line 403) | const T& at(const Key& key) const { return m_ht.at(key); }
  function T (line 408) | const T& at(const Key& key, std::size_t precalculated_hash) const { retu...
  function size_type (line 452) | size_type count(const Key& key) const { return m_ht.count(key); }
  function size_type (line 458) | size_type count(const Key& key, std::size_t precalculated_hash) const { ...
  function iterator (line 482) | iterator find(const Key& key) { return m_ht.find(key); }
  function iterator (line 488) | iterator find(const Key& key, std::size_t precalculated_hash) { return m...
  function const_iterator (line 490) | const_iterator find(const Key& key) const { return m_ht.find(key); }
  function const_iterator (line 495) | const_iterator find(const Key& key, std::size_t precalculated_hash) cons...
  function precalculated_hash (line 514) | size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); }
  function contains (line 533) | bool contains(const Key& key) const { return m_ht.contains(key); }
  function contains (line 539) | bool contains(const Key& key, std::size_t precalculated_hash) const {
  function max_load_factor (line 635) | void max_load_factor(float ml) { m_ht.max_load_factor(ml); }
  function rehash (line 637) | void rehash(size_type count_) { m_ht.rehash(count_); }
  function reserve (line 638) | void reserve(size_type count_) { m_ht.reserve(count_); }
  function iterator (line 655) | iterator mutable_iterator(const_iterator pos) {

FILE: External/tsl/bhopscotch_set.h
  function namespace (line 39) | namespace tsl {
  function explicit (line 113) | explicit bhopscotch_set(size_type bucket_count,
  function iterator (line 201) | iterator begin() noexcept { return m_ht.begin(); }
  function iterator (line 205) | iterator end() noexcept { return m_ht.end(); }
  function clear (line 220) | void clear() noexcept { m_ht.clear(); }
  function iterator (line 228) | iterator insert(const_iterator hint, const value_type& value) { return m...
  function iterator (line 229) | iterator insert(const_iterator hint, value_type&& value) { return m_ht.i...
  function insert (line 233) | void insert(std::initializer_list<value_type> ilist) { m_ht.insert(ilist...
  function iterator (line 264) | iterator erase(iterator pos) { return m_ht.erase(pos); }
  function iterator (line 265) | iterator erase(const_iterator pos) { return m_ht.erase(pos); }
  function iterator (line 266) | iterator erase(const_iterator first, const_iterator last) { return m_ht....
  function size_type (line 267) | size_type erase(const key_type& key) { return m_ht.erase(key); }
  function size_type (line 273) | size_type erase(const key_type& key, std::size_t precalculated_hash) {
  function precalculated_hash (line 294) | size_t precalculated_hash) { return m_ht.erase(key, precalculated_hash); }
  function swap (line 299) | void swap(bhopscotch_set& other) { other.m_ht.swap(m_ht); }
  function size_type (line 305) | size_type count(const Key& key) const { return m_ht.count(key); }
  function size_type (line 311) | size_type count(const Key& key, std::size_t precalculated_hash) const { ...
  function iterator (line 335) | iterator find(const Key& key) { return m_ht.find(key); }
  function iterator (line 341) | iterator find(const Key& key, std::size_t precalculated_hash) { return m...
  function const_iterator (line 343) | const_iterator find(const Key& key) const { return m_ht.find(key); }
  function const_iterator (line 348) | const_iterator find(const Key& key, std::size_t precalculated_hash) cons...
  function precalculated_hash (line 367) | size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); }
  function contains (line 389) | bool contains(const Key& key) const { return m_ht.contains(key); }
  function contains (line 395) | bool contains(const Key& key, std::size_t precalculated_hash) const {
  function max_load_factor (line 491) | void max_load_factor(float ml) { m_ht.max_load_factor(ml); }
  function rehash (line 493) | void rehash(size_type count_) { m_ht.rehash(count_); }
  function reserve (line 494) | void reserve(size_type count_) { m_ht.reserve(count_); }
  function iterator (line 512) | iterator mutable_iterator(const_iterator pos) {

FILE: External/tsl/hopscotch_growth_policy.h
  function namespace (line 68) | namespace tsl {

FILE: External/tsl/hopscotch_hash.h
  function namespace (line 52) | namespace tsl {
  function set_hash (line 181) | void set_hash(truncated_hash_type /*hash*/) noexcept {
  function set_hash (line 201) | void set_hash(truncated_hash_type hash) noexcept {
  function m_neighborhood_infos (line 244) | hopscotch_bucket(const hopscotch_bucket& bucket)
  function set_overflow (line 295) | void set_overflow(bool has_overflow) noexcept {
  function toggle_neighbor_presence (line 312) | void toggle_neighbor_presence(std::size_t ineighbor) noexcept {
  function check_neighbor_presence (line 318) | bool check_neighbor_presence(std::size_t ineighbor) const noexcept {
  function value_type (line 332) | const value_type& value() const noexcept {
  function swap_value_into_empty_bucket (line 346) | void swap_value_into_empty_bucket(hopscotch_bucket& empty_bucket) {
  function remove_value (line 358) | void remove_value() noexcept {
  function clear (line 365) | void clear() noexcept {
  function truncated_hash_type (line 374) | static truncated_hash_type truncate_hash(std::size_t hash) noexcept {
  function destroy_value (line 388) | void destroy_value() noexcept {
  function pointer (line 552) | pointer operator->() const {
  function iterator (line 751) | iterator begin() noexcept {
  function const_iterator (line 760) | const_iterator begin() const noexcept {
  function iterator (line 773) | iterator end() noexcept {
  function const_iterator (line 777) | const_iterator end() const noexcept {
  function clear (line 804) | void clear() noexcept {
  function iterator (line 841) | iterator insert(const_iterator hint, value_type&& value) {
  function iterator (line 951) | iterator erase(iterator pos) {
  function iterator (line 955) | iterator erase(const_iterator pos) {
  function iterator (line 970) | iterator erase(const_iterator first, const_iterator last) {
  function hash (line 989) | size_t hash) {
  function swap (line 1011) | void swap(hopscotch_hash& other) {
  function typename (line 1042) | typename U::value_type& at(const K& key) const {
  function typename (line 1047) | typename U::value_type& at(const K& key, std::size_t hash) const {
  function hash (line 1096) | size_t hash) {
  function size_type (line 1162) | size_type max_bucket_count() const {
  function max_load_factor (line 1183) | void max_load_factor(float ml) {
  function rehash (line 1189) | void rehash(size_type count_) {
  function reserve (line 1194) | void reserve(size_type count_) {
  function iterator (line 1213) | iterator mutable_iterator(const_iterator pos) {
  function iterator_overflow (line 1351) | iterator_overflow mutable_overflow_iterator(const_iterator_overflow it) {
  function iterator_overflow (line 1355) | iterator_overflow mutable_overflow_iterator(const_iterator_overflow it) {
  function iterator_overflow (line 1361) | iterator_overflow erase_from_overflow(const_iterator_overflow pos, std::...
  function erase_from_bucket (line 1388) | void erase_from_bucket(hopscotch_bucket& bucket_for_value, std::size_t i...
  function it (line 1465) | auto it = insert_in_overflow(ibucket_for_hash, std::forward<Args>(value_...
  function swap_empty_bucket_closer (line 1562) | bool swap_empty_bucket_closer(std::size_t& ibucket_empty_in_out) {
  function typename (line 1611) | typename U::value_type* find_value_impl(const K& key, std::size_t hash,
  function hopscotch_bucket (line 1685) | hopscotch_bucket* find_in_buckets(const K& key, std::size_t hash, const ...
  function USE_STORED_HASH_ON_REHASH (line 1769) | bool USE_STORED_HASH_ON_REHASH(size_type /*bucket_count*/) {
  function USE_STORED_HASH_ON_REHASH (line 1774) | bool USE_STORED_HASH_ON_REHASH(size_type bucket_count) {
  function hopscotch_bucket (line 1788) | hopscotch_bucket* static_empty_bucket_ptr() {

FILE: External/tsl/hopscotch_map.h
  function namespace (line 39) | namespace tsl {
  function explicit (line 142) | explicit hopscotch_map(size_type bucket_count,
  function iterator (line 229) | iterator begin() noexcept { return m_ht.begin(); }
  function iterator (line 233) | iterator end() noexcept { return m_ht.end(); }
  function clear (line 248) | void clear() noexcept { m_ht.clear(); }
  function iterator (line 267) | iterator insert(const_iterator hint, const value_type& value) {
  function iterator (line 276) | iterator insert(const_iterator hint, value_type&& value) {
  function insert (line 286) | void insert(std::initializer_list<value_type> ilist) {
  function iterator (line 367) | iterator erase(iterator pos) { return m_ht.erase(pos); }
  function iterator (line 368) | iterator erase(const_iterator pos) { return m_ht.erase(pos); }
  function iterator (line 369) | iterator erase(const_iterator first, const_iterator last) { return m_ht....
  function size_type (line 370) | size_type erase(const key_type& key) { return m_ht.erase(key); }
  function size_type (line 376) | size_type erase(const key_type& key, std::size_t precalculated_hash) {
  function precalculated_hash (line 394) | size_t precalculated_hash) {
  function swap (line 401) | void swap(hopscotch_map& other) { other.m_ht.swap(m_ht); }
  function T (line 415) | const T& at(const Key& key) const { return m_ht.at(key); }
  function T (line 420) | const T& at(const Key& key, std::size_t precalculated_hash) const { retu...
  function size_type (line 461) | size_type count(const Key& key) const { return m_ht.count(key); }
  function size_type (line 467) | size_type count(const Key& key, std::size_t precalculated_hash) const {
  function iterator (line 490) | iterator find(const Key& key) { return m_ht.find(key); }
  function iterator (line 496) | iterator find(const Key& key, std::size_t precalculated_hash) { return m...
  function const_iterator (line 498) | const_iterator find(const Key& key) const { return m_ht.find(key); }
  function const_iterator (line 503) | const_iterator find(const Key& key, std::size_t precalculated_hash) const {
  function precalculated_hash (line 521) | size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); }
  function contains (line 543) | bool contains(const Key& key) const { return m_ht.contains(key); }
  function contains (line 549) | bool contains(const Key& key, std::size_t precalculated_hash) const {
  function max_load_factor (line 641) | void max_load_factor(float ml) { m_ht.max_load_factor(ml); }
  function rehash (line 643) | void rehash(size_type count_) { m_ht.rehash(count_); }
  function reserve (line 644) | void reserve(size_type count_) { m_ht.reserve(count_); }
  function iterator (line 660) | iterator mutable_iterator(const_iterator pos) {

FILE: External/tsl/hopscotch_set.h
  function namespace (line 39) | namespace tsl {
  function explicit (line 126) | explicit hopscotch_set(size_type bucket_count,
  function iterator (line 213) | iterator begin() noexcept { return m_ht.begin(); }
  function iterator (line 217) | iterator end() noexcept { return m_ht.end(); }
  function clear (line 232) | void clear() noexcept { m_ht.clear(); }
  function iterator (line 240) | iterator insert(const_iterator hint, const value_type& value) { return m...
  function iterator (line 241) | iterator insert(const_iterator hint, value_type&& value) { return m_ht.i...
  function insert (line 245) | void insert(std::initializer_list<value_type> ilist) { m_ht.insert(ilist...
  function iterator (line 276) | iterator erase(iterator pos) { return m_ht.erase(pos); }
  function iterator (line 277) | iterator erase(const_iterator pos) { return m_ht.erase(pos); }
  function iterator (line 278) | iterator erase(const_iterator first, const_iterator last) { return m_ht....
  function size_type (line 279) | size_type erase(const key_type& key) { return m_ht.erase(key); }
  function size_type (line 285) | size_type erase(const key_type& key, std::size_t precalculated_hash) {
  function precalculated_hash (line 303) | size_t precalculated_hash) {
  function swap (line 310) | void swap(hopscotch_set& other) { other.m_ht.swap(m_ht); }
  function size_type (line 316) | size_type count(const Key& key) const { return m_ht.count(key); }
  function size_type (line 322) | size_type count(const Key& key, std::size_t precalculated_hash) const { ...
  function iterator (line 343) | iterator find(const Key& key) { return m_ht.find(key); }
  function iterator (line 349) | iterator find(const Key& key, std::size_t precalculated_hash) { return m...
  function const_iterator (line 351) | const_iterator find(const Key& key) const { return m_ht.find(key); }
  function const_iterator (line 356) | const_iterator find(const Key& key, std::size_t precalculated_hash) cons...
  function precalculated_hash (line 372) | size_t precalculated_hash) { return m_ht.find(key, precalculated_hash); }
  function contains (line 392) | bool contains(const Key& key) const { return m_ht.contains(key); }
  function contains (line 398) | bool contains(const Key& key, std::size_t precalculated_hash) const {
  function max_load_factor (line 489) | void max_load_factor(float ml) { m_ht.max_load_factor(ml); }
  function rehash (line 491) | void rehash(size_type count_) { m_ht.rehash(count_); }
  function reserve (line 492) | void reserve(size_type count_) { m_ht.reserve(count_); }
  function iterator (line 509) | iterator mutable_iterator(const_iterator pos) {

FILE: NEWorld.Base/Common/Console.cpp
  type LColorFunc (line 28) | namespace LColorFunc {
  type LColorFunc (line 115) | namespace LColorFunc {

FILE: NEWorld.Base/Common/Console.h
  function namespace (line 24) | namespace LColorFunc {
  function namespace (line 60) | namespace LColor {

FILE: NEWorld.Base/Common/Logger.cpp
  function convert (line 43) | std::string convert(int arg) {
  function getTimeString (line 56) | std::string getTimeString(const char dateSplit, const char midSplit, con...
  function setLogColor (line 69) | void setLogColor(const Logger::Level& level, std::stringstream& content) {
  function queryColorFunc (line 83) | LColorFunc::ColorFunc queryColorFunc(const char style) {
  function chConsumeStyled (line 96) | void chConsumeStyled(std::ostream& ostream, const char ch) {
  function transitStyleString (line 104) | auto transitStyleString(const std::string& str, Fn fn) {
  function lockedFlush (line 117) | void lockedFlush(std::ostream& stream, const std::string& string) {
  function flushConsole (line 123) | void flushConsole(const Logger::Level level, const std::string& string) {
  function flushFiles (line 131) | void flushFiles(const Logger::Level level, const std::string& string) {

FILE: NEWorld.Base/Common/Logger.h
  type class (line 28) | enum class

FILE: NEWorld.Base/Math/Vector2.h
  function noexcept (line 30) | const noexcept { return {X - r.X, Y - r.Y}; }

FILE: NEWorld.Base/Math/Vector3.h
  function noexcept (line 35) | const noexcept { return {X - r.X, Y - r.Y, Z - r.Z}; }

FILE: NEWorld.Base/Math/Vector4.h
  function noexcept (line 35) | const noexcept { return {X - r.X, Y - r.Y, Z - r.Z, W - r.W}; }

FILE: NEWorld.Base/System/FileSystem.h
  function namespace (line 5) | namespace NEWorld {
  function namespace (line 10) | namespace NEWorld {

FILE: NEWorld.Base/System/MessageBus.cpp
  function MessageBus (line 18) | MessageBus& MessageBus::Default() {

FILE: NEWorld.Base/System/MessageBus.h
  function class (line 11) | class MessageBus {

FILE: NEWorld.Game/Audio/Audio.h
  function namespace (line 3) | namespace NEWorld::Audio {

FILE: NEWorld.Game/AudioSystem.cpp
  type AudioSystem (line 3) | namespace AudioSystem {
    function Init (line 31) | void Init() {
    function Update (line 70) | void Update(ALfloat PlayerPos[3], bool BFall, bool BBlockClick, ALfloa...
    function ClickEvent (line 167) | void ClickEvent() {
    function UnInit (line 176) | void UnInit() {

FILE: NEWorld.Game/AudioSystem.h
  function namespace (line 5) | namespace AudioSystem {

FILE: NEWorld.Game/Command.h
  function class (line 6) | class Command {

FILE: NEWorld.Game/ControlContext.h
  function class (line 10) | class ControlContext {
  function KeyJustPressed (line 71) | [[nodiscard]] bool KeyJustPressed(int key) const noexcept {
  function ShouldDo (line 75) | [[nodiscard]] bool ShouldDo(Action action) {
  function MouseScrollCallback (line 86) | static void MouseScrollCallback(GLFWwindow*, double, double yOffset) {

FILE: NEWorld.Game/Frustum.h
  function class (line 3) | class Frustum {

FILE: NEWorld.Game/FunctionsKit.cpp
  function split (line 12) | std::vector<std::string> split(const std::string &str, const std::string...
  function MByteToWChar (line 27) | unsigned int MByteToWChar(wchar_t *dst, const char *src, unsigned int n) {
  function WCharToMByte (line 35) | unsigned int WCharToMByte(char *dst, const wchar_t *src, unsigned int n) {

FILE: NEWorld.Game/FunctionsKit.h
  function fastRand (line 15) | inline unsigned int fastRand() {
  function fastSrand (line 20) | inline void fastSrand(int seed) { g_seed = seed; }
  function std (line 24) | inline std::string boolstr(bool b) { return b ? "True" : "False"; }
  function rnd (line 26) | inline double rnd() { return static_cast<double>(fastRand()) / static_ca...
  function RoundInt (line 28) | inline int RoundInt(double d) { return static_cast<int>(lround(d)); }
  function Mutex_t (line 30) | inline Mutex_t MutexCreate() { return new std::mutex; }
  function MutexDestroy (line 32) | inline void MutexDestroy(Mutex_t _hMutex) { delete _hMutex; }
  function MutexLock (line 34) | inline void MutexLock(Mutex_t _hMutex) { _hMutex->lock(); }
  function MutexUnlock (line 36) | inline void MutexUnlock(Mutex_t _hMutex) { _hMutex->unlock(); }
  function wstrlen (line 42) | inline unsigned int wstrlen(const wchar_t *wstr) { return wcslen(wstr); }
  function SleepMs (line 44) | inline void SleepMs(unsigned int ms) { std::this_thread::sleep_for(std::...
  function timer (line 46) | inline double timer() {
  function DistanceSquare (line 52) | inline int DistanceSquare(int ix, int iy, int iz, int x, int y, int z) {

FILE: NEWorld.Game/GUI/GUI.cpp
  type GUI (line 10) | namespace GUI {
    function mapKey (line 11) | static Noesis::Key mapKey(int glfwKey) {
    function pushScene (line 181) | void pushScene(std::unique_ptr<Scene> scene) {
    function popScene (line 186) | void popScene() {
    function clearScenes (line 190) | void clearScenes() {
    function appStart (line 194) | void appStart() {

FILE: NEWorld.Game/GUI/GUI.h
  function namespace (line 11) | namespace GUI {

FILE: NEWorld.Game/GUI/InventorySlot.h
  function class (line 13) | class InventorySlot : public Noesis::UserControl

FILE: NEWorld.Game/GUI/Menus/MainMenu.cpp
  type Menus (line 18) | namespace Menus {
    class WorldModel (line 19) | class WorldModel : public NoesisApp::NotifyPropertyChangedBase
      method WorldModel (line 22) | WorldModel(std::string name) : mName(std::move(name)) {}
      method NS_IMPLEMENT_INLINE_REFLECTION (line 28) | NS_IMPLEMENT_INLINE_REFLECTION(WorldModel, NotifyPropertyChangedBase) {
    class GameMenuViewModel (line 33) | class GameMenuViewModel : public NoesisApp::NotifyPropertyChangedBase {
      method GameMenuViewModel (line 35) | GameMenuViewModel() {
      type State (line 42) | enum class State { MAIN_MENU, SETTINGS, SELECT_WORLD }
      method setState (line 52) | void setState(State state) noexcept {
      method getRenderDistance (line 76) | int getRenderDistance() const { return mRenderDistance; }
      method getRenderDistanceTick (line 77) | int getRenderDistanceTick() const noexcept { return mRenderDistanceT...
      method setRenderDistanceTick (line 78) | void setRenderDistanceTick(int renderDistanceTick) noexcept {
      method NS_IMPLEMENT_INLINE_REFLECTION (line 104) | NS_IMPLEMENT_INLINE_REFLECTION(GameMenuViewModel, NotifyPropertyChan...
    class MainMenu (line 120) | class MainMenu : public GUI::Scene {
      method MainMenu (line 122) | MainMenu() : Scene("MainMenu.xaml"){}
      method onViewBinding (line 126) | void onViewBinding() override {
      method onRender (line 159) | kls::coroutine::ValueAsync<void> onRender() override {
      method drawBackground (line 163) | void drawBackground() {
    function startMenu (line 253) | std::unique_ptr<GUI::Scene> startMenu() {

FILE: NEWorld.Game/GUI/Menus/Menus.h
  function namespace (line 4) | namespace Menus

FILE: NEWorld.Game/GUI/Noesis.h
  function namespace (line 5) | namespace GUI {

FILE: NEWorld.Game/GameSettings.h
  function class (line 6) | class GameSettings {

FILE: NEWorld.Game/GameView.cpp
  type NoesisApp (line 28) | namespace NoesisApp {
    class Window (line 29) | class Window
  class GameView (line 32) | class GameView
    type ItemMoveContext (line 112) | struct ItemMoveContext {
    method GameView (line 119) | GameView() : Scene("InGame.xaml", false), mViewModel(Noesis::MakePtr<G...
    method gameThread (line 121) | void gameThread() {
    method gameRender (line 163) | kls::coroutine::ValueAsync<void> gameRender() {
    method RenderEntities (line 346) | void RenderEntities() {
    method onRender (line 350) | kls::coroutine::ValueAsync<void> onRender() override {
    method drawBorder (line 356) | static void drawBorder(int x, int y, int z) {
    method debugInfo (line 403) | void debugInfo() const {
    method renderDestroy (line 448) | static void renderDestroy(float level, int x, int y, int z) {
    method saveScreenshot (line 512) | static void saveScreenshot(int x, int y, int w, int h, std::string fil...
    method createThumbnail (line 524) | void createThumbnail() {
    method onViewBinding (line 530) | void onViewBinding() override {
    method onLoad (line 591) | void onLoad() override {
    method onUpdate (line 625) | void onUpdate() override {
  class GameViewViewModel (line 37) | class GameViewViewModel : public NoesisApp::NotifyPropertyChangedBase {
    method setDebugInfo (line 43) | void setDebugInfo(std::string debugInfo) {
    method getGamePaused (line 50) | bool getGamePaused() const {
    method setGamePaused (line 54) | void setGamePaused(bool gamePaused) {
    method getBagOpen (line 61) | bool getBagOpen() const {
    method setBagOpen (line 65) | void setBagOpen(bool bagOpen) {
    method getHP (line 72) | double getHP() const { return mHealth; }
    method getHPMax (line 74) | double getHPMax() const { return mHealthMax; }
    method notifyHPChanges (line 76) | void notifyHPChanges(PlayerEntity *player) {
    method NS_IMPLEMENT_INLINE_REFLECTION (line 92) | NS_IMPLEMENT_INLINE_REFLECTION(GameViewViewModel, NotifyPropertyChange...
  class GameView (line 101) | class GameView : public virtual GUI::Scene, public Game {
    type ItemMoveContext (line 112) | struct ItemMoveContext {
    method GameView (line 119) | GameView() : Scene("InGame.xaml", false), mViewModel(Noesis::MakePtr<G...
    method gameThread (line 121) | void gameThread() {
    method gameRender (line 163) | kls::coroutine::ValueAsync<void> gameRender() {
    method RenderEntities (line 346) | void RenderEntities() {
    method onRender (line 350) | kls::coroutine::ValueAsync<void> onRender() override {
    method drawBorder (line 356) | static void drawBorder(int x, int y, int z) {
    method debugInfo (line 403) | void debugInfo() const {
    method renderDestroy (line 448) | static void renderDestroy(float level, int x, int y, int z) {
    method saveScreenshot (line 512) | static void saveScreenshot(int x, int y, int w, int h, std::string fil...
    method createThumbnail (line 524) | void createThumbnail() {
    method onViewBinding (line 530) | void onViewBinding() override {
    method onLoad (line 591) | void onLoad() override {
    method onUpdate (line 625) | void onUpdate() override {
  function pushGameView (line 680) | void pushGameView() { GUI::pushScene(std::make_unique<GameView>()); }

FILE: NEWorld.Game/Globalization.cpp
  type Globalization (line 7) | namespace Globalization {
    function LoadLang (line 14) | bool LoadLang(const std::string& lang) {
    function Load (line 30) | bool Load() {
    function GetStrbyid (line 48) | std::string GetStrbyid(int id) {
    function GetStrbyKey (line 52) | std::string GetStrbyKey(std::string key) {

FILE: NEWorld.Game/Globalization.h
  function namespace (line 5) | namespace Globalization {

FILE: NEWorld.Game/Items.cpp
  function loadItemsTextures (line 6) | void loadItemsTextures() {

FILE: NEWorld.Game/Items.h
  function class (line 5) | class ItemInfo {
  type BuiltInItems (line 13) | enum BuiltInItems {
  function isBlock (line 22) | inline bool isBlock(Item i) {
  function TextureID (line 26) | inline TextureID getItemTexture(Item i) {

FILE: NEWorld.Game/Menus.h
  function namespace (line 6) | namespace Menus {

FILE: NEWorld.Game/NEWorld.cpp
  function ApplicationBeforeLaunch (line 25) | void ApplicationBeforeLaunch() {
  function ApplicationAfterLaunch (line 35) | void ApplicationAfterLaunch() {
  function main (line 41) | int main() {
  function AppCleanUp (line 77) | void AppCleanUp() {

FILE: NEWorld.Game/Particles.cpp
  type Particles (line 7) | namespace Particles {
    function update (line 33) | void update(Particle &ptc) {
    function updateall (line 72) | void updateall() {
    function render (line 85) | void render(Renderer::BufferBuilder<> &builder, Particle &ptc) {
    function renderall (line 135) | void renderall(double xpos, double ypos, double zpos) {
    function throwParticle (line 157) | void throwParticle(Block pt, float x, float y, float z, float xs, floa...

FILE: NEWorld.Game/Particles.h
  function namespace (line 6) | namespace Particles {

FILE: NEWorld.Game/Renderer/BufferBuilder.h
  type class (line 12) | enum class

FILE: NEWorld.Game/Renderer/GL/Objects.h
  function namespace (line 7) | namespace Renderer {

FILE: NEWorld.Game/Renderer/GL/Pipeline.cpp
  function CollapseDefines (line 9) | auto CollapseDefines(const std::vector<std::string> &defines) noexcept {
  function PrintDebug (line 15) | void PrintDebug(GLuint program) {
  function Preprocess (line 33) | kls::temp::string Preprocess(std::string_view text, kls::temp::set<std::...
  function GLenum (line 56) | GLenum MapShaderTypes(Renderer::ShaderType type) noexcept {
  function CheckErrorShader (line 70) | void CheckErrorShader(GLuint res, const std::string &eMsg) {
  function CheckErrorProgram (line 83) | void CheckErrorProgram(GLuint res, const std::string &eMsg) {
  function GLuint (line 100) | GLuint FromFakePtr(Renderer::Internal::Object *ptr) noexcept {
  function MakeProgram (line 106) | auto MakeProgram(const kls::temp::unordered_map<Renderer::ShaderType, Re...
  function GLenum (line 124) | GLenum MapDataType(Renderer::DataType type) {
  function MakeVAO (line 138) | auto MakeVAO(const kls::temp::vector<Renderer::Internal::AttributeSpec> ...
  function ZipBinds (line 157) | auto ZipBinds(GLuint vao, const kls::temp::unordered_map<int, std::pair<...
  function GLenum (line 167) | GLenum CastTopology(Renderer::Topology topology) {
  function GLenum (line 187) | GLenum CastIndexType(Renderer::IndexType index) {
  class PipelineOGL (line 199) | class PipelineOGL : public Renderer::IPipeline {
    method PipelineOGL (line 201) | PipelineOGL(GLenum mode, std::vector<int> strides, GLuint vao, GLuint ...
    method Use (line 209) | void Use() override {
    method BindVertexBuffer (line 214) | void BindVertexBuffer(int bind, GLuint buffer, int offset) override {
    method BindIndexBuffer (line 218) | void BindIndexBuffer(GLuint buffer, Renderer::IndexType type) override {
    method Draw (line 223) | void Draw(int count, int first, int instance) override {
    method DrawIndexed (line 227) | void DrawIndexed(int count, int first, int instance) override {
    method SetUniform (line 234) | void SetUniform(GLint loc, float value) override {
    method SetUniform (line 238) | void SetUniform(GLint loc, int value) override {
    method SetUniform (line 242) | void SetUniform(GLint loc, float v0, float v1, float v2, float v3) ove...
    method SetUniform (line 246) | void SetUniform(GLint loc, float *value) override {
  function LoadFile (line 258) | kls::temp::string LoadFile(const std::string &path) {
  type Renderer (line 269) | namespace Renderer {
    function GLShader (line 270) | GLShader Compile(ShaderType type, std::string_view program, const std:...
    function GLShader (line 284) | GLShader CompileFile(ShaderType type, const std::string &path, const s...
    function Pipeline (line 289) | Pipeline PipelineBuilder::Build() {
    function GLuint (line 300) | GLuint GetDefaultQuadIndex() {

FILE: NEWorld.Game/Renderer/GL/Pipeline.h
  type class (line 8) | enum class
  type class (line 12) | enum class
  type class (line 16) | enum class
  function namespace (line 20) | namespace Internal {
  type IPipeline (line 38) | struct IPipeline {
  function Topology (line 58) | enum class Topology {

FILE: NEWorld.Game/Renderer/Renderer.cpp
  type Renderer (line 7) | namespace Renderer {
    type IndirectBaseVertex (line 56) | struct IndirectBaseVertex {
    function RenderBufferDirect (line 64) | void RenderBufferDirect(VBOID buffer, vtxCount vtxs) {
    function Pipeline (line 69) | Pipeline BuildPipeline(
    function initShaders (line 87) | void initShaders() {
    function destroyShaders (line 127) | void destroyShaders() {
    function BindPipeline (line 132) | void BindPipeline(int shaderID) {
    function EnableAdvancedShaders (line 137) | void EnableAdvancedShaders() {
    function EnableSimpleShaders (line 158) | void EnableSimpleShaders() {
    function EnableShaders (line 162) | void EnableShaders() {
    function DisableShaders (line 166) | void DisableShaders() {
    function StartShadowPass (line 171) | void StartShadowPass() {
    function EndShadowPass (line 179) | void EndShadowPass() {
    function Pipeline (line 189) | Pipeline &GetPipeline() {

FILE: NEWorld.Game/Renderer/Renderer.h
  function namespace (line 7) | namespace Renderer {

FILE: NEWorld.Game/Renderer/World/ChunkRenderer.cpp
  type WorldRenderer (line 8) | namespace WorldRenderer {
    class ChunkRenderContext (line 9) | class ChunkRenderContext {
      method ChunkRenderContext (line 13) | ChunkRenderContext(World::Chunk *chunk) {
      method Rebase (line 23) | void Rebase(int x, int y, int z) noexcept { mBase = (x + 1) * MX + (...
      method State (line 25) | auto State(int dx, int dy, int dz) noexcept { return mBStates[mBase ...
      method Brightness (line 27) | Brightness Lumin(int dx, int dy, int dz) noexcept { return mLumin[mB...
    type Face (line 35) | enum Face {
    function renderblock (line 40) | static void renderblock(Renderer::BufferBuilder<> &builder, ChunkRende...
    function RenderPrimitive_Depth (line 241) | static void RenderPrimitive_Depth(Renderer::BufferBuilder<> &builder, ...
    function RenderDepthModelEvaluate (line 265) | static kls::coroutine::ValueAsync<void> RenderDepthModelEvaluate(World...
    function RenderDepthModel (line 326) | static kls::coroutine::ValueAsync<void> RenderDepthModel(World::Chunk ...
    function BuildRenderEvaluate (line 333) | static kls::coroutine::ValueAsync<void> BuildRenderEvaluate(World::Chu...
    function RenderChunk (line 351) | static kls::coroutine::ValueAsync<void> RenderChunk(World::Chunk *c, C...

FILE: NEWorld.Game/Renderer/World/ChunkRenderer.h
  function namespace (line 8) | namespace WorldRenderer {

FILE: NEWorld.Game/Renderer/World/ShadowMaps.cpp
  type ShadowMaps (line 5) | namespace ShadowMaps {
    function BuildShadowMap (line 6) | void BuildShadowMap(
    function RenderShadowMap (line 40) | void RenderShadowMap(

FILE: NEWorld.Game/Renderer/World/ShadowMaps.h
  function namespace (line 5) | namespace ShadowMaps {

FILE: NEWorld.Game/Renderer/World/WorldRenderer.cpp
  type WorldRenderer (line 5) | namespace WorldRenderer {
    type SortEntry (line 17) | struct SortEntry {
    type SortCmp (line 22) | struct SortCmp {

FILE: NEWorld.Game/Renderer/World/WorldRenderer.h
  function namespace (line 8) | namespace WorldRenderer {

FILE: NEWorld.Game/Setup.cpp
  function splashScreen (line 13) | void splashScreen() {
  function createWindow (line 39) | void createWindow() {
  function message_callback (line 68) | void message_callback(GLenum source, GLenum type, GLuint id, GLenum seve...
  function setupScreen (line 124) | void setupScreen() {
  function setupNormalFog (line 169) | void setupNormalFog() {
  function loadTextures (line 178) | void loadTextures() {
  function WindowSizeFunc (line 205) | void WindowSizeFunc(GLFWwindow *win, int width, int height) {
  function MouseButtonFunc (line 214) | void MouseButtonFunc(GLFWwindow *, int button, int action, int) {
  function CharInputFunc (line 218) | void CharInputFunc(GLFWwindow *, unsigned int c) {

FILE: NEWorld.Game/Setup.h
  type GLFWwindow (line 3) | struct GLFWwindow

FILE: NEWorld.Game/Textures.cpp
  type Textures (line 10) | namespace Textures {
    function Init (line 12) | void Init() {
    function ubyte (line 18) | ubyte getTextureIndex(Block blockname, ubyte side) {
    function getTexcoordX (line 75) | double getTexcoordX(Item item, ubyte side) {
    function getTexcoordY (line 82) | double getTexcoordY(Item item, ubyte side) {
    function LoadRGBImage (line 89) | void LoadRGBImage(TEXTURE_RGB &tex, std::string Filename) {
    function LoadRGBAImage (line 117) | void LoadRGBAImage(TEXTURE_RGBA &tex, std::string Filename, std::strin...
    function TextureID (line 169) | TextureID LoadRGBTexture(std::string Filename) {
    function TextureID (line 181) | TextureID LoadFontTexture(std::string Filename) {
    function TextureID (line 215) | TextureID LoadRGBATexture(std::string Filename, std::string MkFilename) {
    function SaveRGBImage (line 227) | void SaveRGBImage(std::string filename, TEXTURE_RGB &image) {
    function Build2DMipmaps (line 246) | void Build2DMipmaps(GLenum format, int w, int h, int level, const ubyt...

FILE: NEWorld.Game/Textures.h
  function namespace (line 8) | namespace Textures {

FILE: NEWorld.Game/Tick.cpp
  function CreateTickPipeline (line 6) | std::shared_ptr<TickPipeline> CreateTickPipeline(std::vector<std::shared...

FILE: NEWorld.Game/Tick.h
  function PmrBase (line 7) | struct TickComponent: kls::PmrBase {
  function PmrBase (line 13) | struct TickPipeline: kls::PmrBase {

FILE: NEWorld.Game/Typedefs.h
  type ubyte (line 8) | typedef unsigned char ubyte;
  type blockprop (line 10) | typedef unsigned char blockprop;
  type Brightness (line 11) | typedef unsigned char Brightness;
  type TextureID (line 12) | typedef unsigned int TextureID;
  type Item (line 13) | typedef uint32_t Item;
  type VBOID (line 14) | typedef unsigned int VBOID;
  type vtxCount (line 15) | typedef int vtxCount;
  type chunkid (line 16) | typedef uint64_t chunkid;
  type onlineid (line 17) | typedef unsigned int onlineid;
  type std (line 19) | typedef std::mutex *Mutex_t;

FILE: NEWorld.Game/Universe/CommandHandler.h
  function class (line 10) | class CommandHandler {
  function registerCommands (line 20) | static void registerCommands() {

FILE: NEWorld.Game/Universe/Entity/Entity.cpp
  function Int3 (line 5) | Int3 Entity::getChunkPosition() const noexcept

FILE: NEWorld.Game/Universe/Entity/Entity.h
  type RenderProperties (line 7) | struct RenderProperties {
  function class (line 12) | class Entity {

FILE: NEWorld.Game/Universe/Entity/PlayerEntity.cpp
  function RenderProperties (line 26) | RenderProperties PlayerEntity::renderUpdate(const ControlContext& contro...

FILE: NEWorld.Game/Universe/Entity/PlayerEntity.h
  type ItemStack (line 7) | struct ItemStack {
  function GameMode (line 12) | enum class GameMode { Survival, Creative };

FILE: NEWorld.Game/Universe/Entity/bvh.cpp
  type AABBIntersector (line 9) | struct AABBIntersector : public bvh::PrimitiveIntersector<Bvh, Primitive...
    method AABBIntersector (line 10) | AABBIntersector(const Bvh& bvh, const Primitive* primitives)
    method intersect (line 15) | bool intersect(size_t index, const BoundingBox& box, bool is_leaf) {
  function aabb_intersect (line 25) | static void aabb_intersect(const Bvh& bvh, size_t index, AABBIntersector...

FILE: NEWorld.Game/Universe/Entity/bvh.h
  function Vector3 (line 17) | inline Vector3 toBvhVec(const Double3& v) { return {v.X, v.Y, v.Z}; }
  function class (line 19) | class EntityBVH {
  function namespace (line 31) | namespace AABB {

FILE: NEWorld.Game/Universe/Game.h
  function class (line 9) | class Game : public CommandHandler {
  function EntitiesMovement (line 91) | void EntitiesMovement() {
  function ProcessInteract (line 101) | void ProcessInteract(Double3 startPosition, double heading, double lookU...
  function saveGame (line 213) | static void saveGame() {
  function loadGame (line 222) | static bool loadGame() {

FILE: NEWorld.Game/Universe/World/BlockRegistry.cpp
  function TableExtract (line 15) | void TableExtract(const nlohmann::json& cfgTree) {
  function TableDump (line 32) | void TableDump(nlohmann::json& cfgTree) {

FILE: NEWorld.Game/Universe/World/BlockRegistry.h
  function class (line 6) | class BlockRegistry {

FILE: NEWorld.Game/Universe/World/Blocks.cpp
  type Blocks (line 5) | namespace Blocks {
    class Grass (line 44) | class Grass : public BlockType {
      method Grass (line 46) | Grass()
      method OnRandomTick (line 49) | void OnRandomTick(const Int3& position, Block) noexcept override {
    class Dirt (line 59) | class Dirt : public BlockType {
      method Dirt (line 61) | Dirt()
      method OnRandomTick (line 64) | void OnRandomTick(const Int3& position, Block) noexcept override {
    class Leaf (line 84) | class Leaf : public BlockType {
      method Leaf (line 86) | Leaf()
      method AfterBlockDestroy (line 89) | void AfterBlockDestroy(const Int3& position, Block) noexcept override {
    class Tnt (line 98) | class Tnt : public BlockType {
      method Tnt (line 100) | Tnt()
      method AfterBlockPlace (line 103) | void AfterBlockPlace(const Int3& position, Block) noexcept override {

FILE: NEWorld.Game/Universe/World/Blocks.h
  function namespace (line 9) | namespace Blocks {

FILE: NEWorld.Game/Universe/World/Chunk.cpp
  type World (line 4) | namespace World {
    function BoundingBox (line 9) | BoundingBox Chunk::getBaseAABB() {

FILE: NEWorld.Game/Universe/World/Chunk.h
  function namespace (line 14) | namespace World {

FILE: NEWorld.Game/Universe/World/ChunkPtrArray.cpp
  type World (line 4) | namespace World {

FILE: NEWorld.Game/Universe/World/ChunkPtrArray.h
  function namespace (line 5) | namespace World {

FILE: NEWorld.Game/Universe/World/Data/BitStorage.h
  function namespace (line 11) | namespace World::Data {
  function class (line 22) | class BitsDenseView {
  function Set (line 43) | void Set(const unsigned int index, const uint64_t val) noexcept {
  function Get (line 62) | [[nodiscard]] unsigned int Get(const unsigned int index) noexcept {
  function noexcept (line 115) | [[nodiscard]] auto Bits() const noexcept { return mBits; }
  function noexcept (line 117) | [[nodiscard]] auto Size() const noexcept { return mSize; }
  function noexcept (line 119) | [[nodiscard]] auto Raw() noexcept { return mData; }
  function noexcept (line 121) | [[nodiscard]] auto Raw() const noexcept { return mData; }
  function noexcept (line 123) | [[nodiscard]] auto RawSize() const noexcept { return mDataSize; }
  function class (line 131) | class BitsSparseView {
  function Set (line 148) | void Set(const unsigned int index, const int val) noexcept {
  function Get (line 161) | [[nodiscard]] int Get(const unsigned int index) const noexcept {
  function GetSet (line 173) | [[nodiscard]] int GetSet(const unsigned int index, const int val) noexce...
  function noexcept (line 185) | [[nodiscard]] auto Size() const noexcept { return mSize; }
  function noexcept (line 187) | [[nodiscard]] auto Raw() noexcept { return mData; }
  function noexcept (line 189) | [[nodiscard]] auto Raw() const noexcept { return mData; }
  function noexcept (line 191) | [[nodiscard]] auto MaxBits() const noexcept { return 8 * (1 << mFlag); }
  function noexcept (line 192) | [[nodiscard]] auto RawSize() const noexcept { return mSize << mFlag; }
  function T (line 205) | [[nodiscard]] const T &A(const unsigned int x) const noexcept { return r...
  function class (line 214) | class BitsDense : public BitsDenseView {
  function class (line 239) | class BitsSparse : public BitsSparseView {

FILE: NEWorld.Game/Universe/World/Data/ChunkStorage.cpp
  type World::Data (line 3) | namespace World::Data {

FILE: NEWorld.Game/Universe/World/Data/ChunkStorage.h
  function namespace (line 8) | namespace World {
  function namespace (line 17) | namespace World::Data {
  function class (line 198) | class ChunkStorage {

FILE: NEWorld.Game/Universe/World/OrderedArray.h
  function Iterator (line 21) | [[nodiscard]] Iterator end() noexcept { return mEnd; }
  function ConstIterator (line 22) | [[nodiscard]] ConstIterator end() const noexcept { return mEnd; }
  function Clear (line 39) | void Clear() noexcept { mEnd = begin(); }
  function noexcept (line 41) | [[nodiscard]] auto Count() const noexcept { return end() - begin(); }

FILE: NEWorld.Game/Universe/World/TerrainGen/Carve.cpp
  type World::TerrainGen (line 1) | namespace World::TerrainGen {

FILE: NEWorld.Game/Universe/World/TerrainGen/Generate.h
  function namespace (line 6) | namespace World::TerrainGen {

FILE: NEWorld.Game/Universe/World/TerrainGen/Heights.h
  function namespace (line 9) | namespace World::TerrainGen {

FILE: NEWorld.Game/Universe/World/TerrainGen/Noise.h
  function namespace (line 5) | namespace World::TerrainGen {

FILE: NEWorld.Game/Universe/World/World.cpp
  type World (line 9) | namespace World {
    function Init (line 28) | void Init() {
    function LowerChunkBound (line 43) | auto LowerChunkBound(chunkid cid) noexcept {
    function Chunk (line 49) | Chunk *AddChunk(Int3 vec) {
    function Chunk (line 69) | Chunk *GetChunk(Int3 vec) {
    function DeleteChunk (line 94) | void DeleteChunk(Int3 vec) {
    function getHitboxes (line 110) | std::vector<BoundingBox> getHitboxes(const BoundingBox& box) {
    function inWater (line 127) | bool inWater(const BoundingBox &box) {
    function updateblock (line 142) | void updateblock(int x, int y, int z, bool blockchanged, int depth) {
    function ChunkHintMatch (line 240) | bool ChunkHintMatch(const Int3 c, Chunk *const cptr) noexcept { return...
    function Block (line 242) | Block GetBlock(const Int3 v, Block mask, Chunk *const hint) {
    function Brightness (line 253) | Brightness GetBrightness(Int3 v, Chunk *const hint) {
    function Chunk (line 264) | Chunk *GetChunkNoneLazy(const Int3 c) noexcept {
    function SetBlock (line 268) | void SetBlock(Int3 v, Block block, Chunk *hint) {
    function SetBrightness (line 283) | void SetBrightness(Int3 v, Brightness brightness, Chunk *hint) {
    function chunkUpdated (line 296) | bool chunkUpdated(const Int3 vec) {
    function setChunkUpdated (line 302) | void setChunkUpdated(int x, int y, int z, bool value) {
    function sortChunkLoadUnloadList (line 310) | void sortChunkLoadUnloadList(Int3 pos) {
    function saveAllChunks (line 329) | void saveAllChunks() {
    function destroyAllChunks (line 332) | void destroyAllChunks() {
    function buildtree (line 351) | void buildtree(Int3 pos) {
    function explode (line 415) | void explode(int x, int y, int z, int r, Chunk *c) {
    function PutBlock (line 440) | void PutBlock(const Int3 v, Block block) {
    function PickBlock (line 448) | void PickBlock(const Int3 v) {

FILE: NEWorld.Game/Universe/World/World.h
  function namespace (line 12) | namespace World {

FILE: NoesisGUI/bin2h.py
  function bin2h (line 4) | def bin2h(filein, fileout):
  function main (line 24) | def main():
Condensed preview — 159 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (947K chars).
[
  {
    "path": ".gitattributes",
    "chars": 487,
    "preview": "# Auto detect text files and perform LF normalization\n* text=auto\n# Custom for Visual Studio\n*.cs     diff=csharp\n# Stan"
  },
  {
    "path": ".gitignore",
    "chars": 3045,
    "preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
  },
  {
    "path": ".gitmodules",
    "chars": 95,
    "preview": "[submodule \"Kaleidoscope\"]\n\tpath = Kaleidoscope\n\turl = https://github.com/NEWorldProject/klsxx\n"
  },
  {
    "path": "Assets/GUI/InGame.xaml",
    "chars": 4787,
    "preview": "<Grid xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n      xmlns:x=\"http://schemas.microsoft.com/winf"
  },
  {
    "path": "Assets/GUI/InventorySlot.xaml",
    "chars": 2620,
    "preview": "<UserControl\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n\txmlns:x=\"http://schemas.microsoft.com/w"
  },
  {
    "path": "Assets/GUI/MainMenu.xaml",
    "chars": 11531,
    "preview": "<Grid xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n      xmlns:x=\"http://schemas.microsoft.com/winf"
  },
  {
    "path": "Assets/GUI/Theme/Brushes.xaml",
    "chars": 5928,
    "preview": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n                    xmlns:x=\"http"
  },
  {
    "path": "Assets/GUI/Theme/Colors.xaml",
    "chars": 752,
    "preview": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n                    xmlns:x=\"http"
  },
  {
    "path": "Assets/GUI/Theme/Fonts.xaml",
    "chars": 468,
    "preview": "<ResourceDictionary\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.m"
  },
  {
    "path": "Assets/GUI/Theme/NEWorld.xaml",
    "chars": 474,
    "preview": "<ResourceDictionary\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.m"
  },
  {
    "path": "Assets/GUI/Theme/Styles.xaml",
    "chars": 189244,
    "preview": "<ResourceDictionary\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n  xmlns:x=\"http://schemas.micro"
  },
  {
    "path": "Assets/Shaders/Depth.fsh",
    "chars": 169,
    "preview": "#version 450\nlayout(location = 0) out vec4 color;\nvoid main() {\n\tfloat shade = (gl_FragCoord.z / gl_FragCoord.w + 1.0) *"
  },
  {
    "path": "Assets/Shaders/Depth.vsh",
    "chars": 144,
    "preview": "#version 450 compatibility\nlayout(location = 4) in vec3 vCrood;\nvoid main() {\n\tgl_Position = gl_ModelViewProjectionMatri"
  },
  {
    "path": "Assets/Shaders/Main.fsh",
    "chars": 3148,
    "preview": "#version 450 compatibility\n#define SMOOTH_SHADOW\n\nconst mat4 normalize = mat4(\n\t0.5, 0.0, 0.0, 0.0,\n\t0.0, 0.5, 0.0, 0.0,"
  },
  {
    "path": "Assets/Shaders/Main.vsh",
    "chars": 440,
    "preview": "#version 450 compatibility\n\nlayout(location = 1) in float VertexAttrib;\nlayout(location = 2) in vec2 vTexCrood;\nlayout(l"
  },
  {
    "path": "Assets/Shaders/Particle.fsh",
    "chars": 220,
    "preview": "#version 450\n\nlayout(location=0) uniform sampler2D Tex;\n\nin vOut {\n    vec2 fTexCrood;\n    flat vec2 fShade;\n};\nout vec4"
  },
  {
    "path": "Assets/Shaders/Particle.vsh",
    "chars": 316,
    "preview": "#version 450 compatibility\n\nlayout(location = 1) in vec2 vTexCrood;\nlayout(location = 2) in vec2 vShade;\nlayout(location"
  },
  {
    "path": "Assets/Shaders/Shadow.fsh",
    "chars": 101,
    "preview": "#version 450\nlayout(location = 0) out vec4 color;\nvoid main() {\n\tcolor = vec4(1.0, 1.0, 1.0, 1.0);\n}\n"
  },
  {
    "path": "Assets/Shaders/Shadow.vsh",
    "chars": 144,
    "preview": "#version 450 compatibility\nlayout(location = 4) in vec3 vCrood;\nvoid main() {\n\tgl_Position = gl_ModelViewProjectionMatri"
  },
  {
    "path": "Assets/Shaders/Simple.fsh",
    "chars": 193,
    "preview": "#version 450\n\nlayout(location=0) uniform sampler2D Tex;\n\nin vOut {\n\tvec2 fTexCrood;\n\tvec3 fShade;\n};\nout vec4 fragment;\n"
  },
  {
    "path": "Assets/Shaders/Simple.vsh",
    "chars": 311,
    "preview": "#version 450 compatibility\n\nlayout(location = 2) in vec2 vTexCrood;\nlayout(location = 3) in vec3 vShade;\nlayout(location"
  },
  {
    "path": "Assets/Translations/Keys.json",
    "chars": 1774,
    "preview": "[\n\"NEWorld.yes\",\n\"NEWorld.no\",\n\"NEWorld.enabled\",\n\"NEWorld.disabled\",\n\"NEWorld.Blocks.Air\",\n\"NEWorld.Blocks.Rock\",\n\"NEWo"
  },
  {
    "path": "Assets/Translations/Langs.txt",
    "chars": 19,
    "preview": "3\nen_US\nzh_CN\nzh_TW"
  },
  {
    "path": "Assets/Translations/en_US.lang",
    "chars": 1276,
    "preview": "English\nEnglish\nYes\nNo\nEnabled\nDisabled\nAir\nRock\nGrass\nDirt\nStone\nPlank\nWood\nBedrock\nLeaves\nGlass\nWater\nLava\nGlowstone\nS"
  },
  {
    "path": "Assets/Translations/zh_CN.lang",
    "chars": 838,
    "preview": "Chinese_Simplified\n中文(简体)\n是\n否\n开启\n关闭\n空气\n岩石\n草\n泥土\n石头\n木板\n原木\n基岩\n树叶\n玻璃块\n水\n岩浆\n萤石\n沙子\n水泥\n冰\n煤块\n铁块\nTNT\nNull Block\n开始游戏\n>> 选项 ...\n退出"
  },
  {
    "path": "Assets/Translations/zh_TW.lang",
    "chars": 849,
    "preview": "Traditional_Chinese\n中文(繁體)\n是\n否\n開啟\n關閉\n空氣\n石頭\n草方塊\n泥土\n碎石\n木材\n原木\n基岩\n樹葉\n玻璃\n水\n岩漿\n螢光石\n沙\n水泥\n冰\n煤炭磚\n鐵磚\nTNT\nNull方塊\n開始遊戲\n>>選項…\n退出\n===="
  },
  {
    "path": "CMakeLists.txt",
    "chars": 1553,
    "preview": "cmake_minimum_required(VERSION 3.10)\n\ninclude(Kaleidoscope/Build/Config.cmake)\nproject(NEWorld)\nkls_configure()\n\nkls_def"
  },
  {
    "path": "External/bvh/binned_sah_builder.hpp",
    "chars": 8815,
    "preview": "#ifndef BVH_BINNED_SAH_BUILDER_HPP\n#define BVH_BINNED_SAH_BUILDER_HPP\n\n#include <optional>\n\n#include \"bvh/bvh.hpp\"\n#incl"
  },
  {
    "path": "External/bvh/bottom_up_algorithm.hpp",
    "chars": 2485,
    "preview": "#ifndef BVH_BOTTOM_UP_ALGORITHM_HPP\n#define BVH_BOTTOM_UP_ALGORITHM_HPP\n\n#include <memory>\n#include <cstddef>\n\n#include "
  },
  {
    "path": "External/bvh/bounding_box.hpp",
    "chars": 2490,
    "preview": "#ifndef BVH_BOUNDING_BOX_HPP\n#define BVH_BOUNDING_BOX_HPP\n\n#include \"bvh/vector.hpp\"\n\nnamespace bvh {\n\n/// A bounding bo"
  },
  {
    "path": "External/bvh/bvh.hpp",
    "chars": 3302,
    "preview": "#ifndef BVH_BVH_HPP\n#define BVH_BVH_HPP\n\n#include <climits>\n#include <memory>\n#include <cassert>\n\n#include \"bvh/bounding"
  },
  {
    "path": "External/bvh/heuristic_primitive_splitter.hpp",
    "chars": 6602,
    "preview": "#ifndef BVH_HEURISTIC_PRIMITIVE_SPLITTER_HPP\n#define BVH_HEURISTIC_PRIMITIVE_SPLITTER_HPP\n\n#include <algorithm>\n#include"
  },
  {
    "path": "External/bvh/hierarchy_refitter.hpp",
    "chars": 1373,
    "preview": "#ifndef BVH_HIERARCHY_REFITTER_HPP\n#define BVH_HIERARCHY_REFITTER_HPP\n\n#include \"bvh/bvh.hpp\"\n#include \"bvh/bottom_up_al"
  },
  {
    "path": "External/bvh/leaf_collapser.hpp",
    "chars": 6785,
    "preview": "#ifndef BVH_LEAF_COLLAPSER_HPP\n#define BVH_LEAF_COLLAPSER_HPP\n\n#include <memory>\n\n#include \"bvh/bvh.hpp\"\n#include \"bvh/s"
  },
  {
    "path": "External/bvh/linear_bvh_builder.hpp",
    "chars": 7208,
    "preview": "#ifndef BVH_LINEAR_BVH_BUILDER_HPP\n#define BVH_LINEAR_BVH_BUILDER_HPP\n\n#include <cstdint>\n#include <cassert>\n#include <n"
  },
  {
    "path": "External/bvh/locally_ordered_clustering_builder.hpp",
    "chars": 9681,
    "preview": "#ifndef BVH_LOCALLY_ORDERED_CLUSTERING_BUILDER_HPP\n#define BVH_LOCALLY_ORDERED_CLUSTERING_BUILDER_HPP\n\n#include <numeric"
  },
  {
    "path": "External/bvh/morton.hpp",
    "chars": 2046,
    "preview": "#ifndef BVH_MORTON_HPP\n#define BVH_MORTON_HPP\n\n#include <cstddef>\n#include <climits>\n#include <cassert>\n\n#include \"bvh/u"
  },
  {
    "path": "External/bvh/morton_code_based_builder.hpp",
    "chars": 3069,
    "preview": "#ifndef BVH_MORTON_CODE_BASED_BUILDER_HPP\n#define BVH_MORTON_CODE_BASED_BUILDER_HPP\n\n#include <algorithm>\n#include <memo"
  },
  {
    "path": "External/bvh/node_intersectors.hpp",
    "chars": 3875,
    "preview": "#ifndef BVH_NODE_INTERSECTORS_HPP\n#define BVH_NODE_INTERSECTORS_HPP\n\n#include <cmath>\n\n#include \"bvh/vector.hpp\"\n#includ"
  },
  {
    "path": "External/bvh/node_layout_optimizer.hpp",
    "chars": 3295,
    "preview": "#ifndef BVH_NODE_LAYOUT_OPTIMIZER_HPP\n#define BVH_NODE_LAYOUT_OPTIMIZER_HPP\n\n#include <memory>\n\n#include \"bvh/bvh.hpp\"\n#"
  },
  {
    "path": "External/bvh/parallel_reinsertion_optimizer.hpp",
    "chars": 8539,
    "preview": "#ifndef BVH_PARALLEL_REINSERTION_OPTIMIZER_HPP\n#define BVH_PARALLEL_REINSERTION_OPTIMIZER_HPP\n\n#include <cassert>\n\n#incl"
  },
  {
    "path": "External/bvh/platform.hpp",
    "chars": 963,
    "preview": "#ifndef BVH_PLATFORM_HPP\n#define BVH_PLATFORM_HPP\n\n#include <cstddef>\n#include <cassert>\n\n#ifdef _OPENMP\n#include <omp.h"
  },
  {
    "path": "External/bvh/prefix_sum.hpp",
    "chars": 2016,
    "preview": "#ifndef BVH_PREFIX_SUM_HPP\n#define BVH_PREFIX_SUM_HPP\n\n#include <functional>\n#include <memory>\n#include <numeric>\n\n#incl"
  },
  {
    "path": "External/bvh/primitive_intersectors.hpp",
    "chars": 2613,
    "preview": "#ifndef BVH_PRIMITIVE_INTERSECTORS_HPP\n#define BVH_PRIMITIVE_INTERSECTORS_HPP\n\n#include <optional>\n\n#include \"bvh/ray.hp"
  },
  {
    "path": "External/bvh/radix_sort.hpp",
    "chars": 3483,
    "preview": "#ifndef BVH_RADIX_SORT_HPP\n#define BVH_RADIX_SORT_HPP\n\n#include <memory>\n#include <algorithm>\n#include <cstddef>\n\n#inclu"
  },
  {
    "path": "External/bvh/ray.hpp",
    "chars": 642,
    "preview": "#ifndef BVH_RAY_HPP\n#define BVH_RAY_HPP\n\n#include \"bvh/vector.hpp\"\n\nnamespace bvh {\n\n/// A ray, defined by an origin and"
  },
  {
    "path": "External/bvh/sah_based_algorithm.hpp",
    "chars": 1066,
    "preview": "#ifndef BVH_SAH_BASED_ALGORITHM_HPP\n#define BVH_SAH_BASED_ALGORITHM_HPP\n\n#include \"bvh/bvh.hpp\"\n\nnamespace bvh {\n\ntempla"
  },
  {
    "path": "External/bvh/single_ray_traverser.hpp",
    "chars": 6068,
    "preview": "#ifndef BVH_SINGLE_RAY_TRAVERSAL_HPP\n#define BVH_SINGLE_RAY_TRAVERSAL_HPP\n\n#include <cassert>\n\n#include \"bvh/bvh.hpp\"\n#i"
  },
  {
    "path": "External/bvh/spatial_split_bvh_builder.hpp",
    "chars": 23923,
    "preview": "#ifndef BVH_SPATIAL_SPLIT_BVH_BUILDER_HPP\n#define BVH_SPATIAL_SPLIT_BVH_BUILDER_HPP\n\n#include <optional>\n#include <algor"
  },
  {
    "path": "External/bvh/sphere.hpp",
    "chars": 1737,
    "preview": "#ifndef BVH_SPHERE_HPP\n#define BVH_SPHERE_HPP\n\n#include <optional>\n\n#include \"bvh/vector.hpp\"\n#include \"bvh/bounding_box"
  },
  {
    "path": "External/bvh/sweep_sah_builder.hpp",
    "chars": 9898,
    "preview": "#ifndef BVH_SWEEP_SAH_BUILDER_HPP\n#define BVH_SWEEP_SAH_BUILDER_HPP\n\n#include <array>\n#include <optional>\n\n#include \"bvh"
  },
  {
    "path": "External/bvh/top_down_builder.hpp",
    "chars": 2379,
    "preview": "#ifndef BVH_TOP_DOWN_BUILDER_HPP\n#define BVH_TOP_DOWN_BUILDER_HPP\n\n#include <stack>\n#include <cassert>\n\nnamespace bvh {\n"
  },
  {
    "path": "External/bvh/triangle.hpp",
    "chars": 3700,
    "preview": "#ifndef BVH_TRIANGLE_HPP\n#define BVH_TRIANGLE_HPP\n\n#include <optional>\n#include <cassert>\n\n#include \"bvh/utilities.hpp\"\n"
  },
  {
    "path": "External/bvh/utilities.hpp",
    "chars": 5423,
    "preview": "#ifndef BVH_UTILITIES_HPP\n#define BVH_UTILITIES_HPP\n\n#include <cstring>\n#include <cstdint>\n#include <atomic>\n#include <m"
  },
  {
    "path": "External/bvh/vector.hpp",
    "chars": 5108,
    "preview": "#ifndef BVH_VECTOR_HPP\n#define BVH_VECTOR_HPP\n\n#include <cstddef>\n#include <algorithm>\n#include <array>\n#include <cmath>"
  },
  {
    "path": "External/stb/stb_rect_pack.h",
    "chars": 20199,
    "preview": "// stb_rect_pack.h - v1.01 - public domain - rectangle packing\n// Sean Barrett 2014\n//\n// Useful for e.g. packing rectan"
  },
  {
    "path": "External/tsl/bhopscotch_map.h",
    "chars": 27276,
    "preview": "/**\n * MIT License\n * \n * Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>\n * \n * Permission is hereby g"
  },
  {
    "path": "External/tsl/bhopscotch_set.h",
    "chars": 22064,
    "preview": "/**\n * MIT License\n * \n * Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>\n * \n * Permission is hereby g"
  },
  {
    "path": "External/tsl/hopscotch_growth_policy.h",
    "chars": 11849,
    "preview": "/**\n * MIT License\n * \n * Copyright (c) 2018 Thibaut Goetghebuer-Planchon <tessil@gmx.com>\n * \n * Permission is hereby g"
  },
  {
    "path": "External/tsl/hopscotch_hash.h",
    "chars": 70089,
    "preview": "/**\n * MIT License\n * \n * Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>\n * \n * Permission is hereby g"
  },
  {
    "path": "External/tsl/hopscotch_map.h",
    "chars": 26906,
    "preview": "/**\n * MIT License\n * \n * Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>\n * \n * Permission is hereby g"
  },
  {
    "path": "External/tsl/hopscotch_set.h",
    "chars": 21931,
    "preview": "/**\n * MIT License\n * \n * Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>\n * \n * Permission is hereby g"
  },
  {
    "path": "NEWorld.Base/Common/Console.cpp",
    "chars": 4892,
    "preview": "// \n// Core: Console.cpp\n// NEWorld: A Free Game with Similar Rules to Minecraft.\n// Copyright (C) 2015-2018 NEWorld Tea"
  },
  {
    "path": "NEWorld.Base/Common/Console.h",
    "chars": 2418,
    "preview": "// \n// Core: Console.h\n// NEWorld: A Free Game with Similar Rules to Minecraft.\n// Copyright (C) 2015-2018 NEWorld Team\n"
  },
  {
    "path": "NEWorld.Base/Common/Logger.cpp",
    "chars": 6257,
    "preview": "// \n// Core: Logger.cpp\n// NEWorld: A Free Game with Similar Rules to Minecraft.\n// Copyright (C) 2015-2018 NEWorld Team"
  },
  {
    "path": "NEWorld.Base/Common/Logger.h",
    "chars": 2374,
    "preview": "// \n// Core: Logger.h\n// NEWorld: A Free Game with Similar Rules to Minecraft.\n// Copyright (C) 2015-2018 NEWorld Team\n/"
  },
  {
    "path": "NEWorld.Base/Math/Vector2.h",
    "chars": 6819,
    "preview": "#pragma once\n\n#include <cmath>\n#include <algorithm>\n#include <type_traits>\n\ntemplate<class T, class = std::enable_if<std"
  },
  {
    "path": "NEWorld.Base/Math/Vector3.h",
    "chars": 8203,
    "preview": "#pragma once\n\n#include <cmath>\n#include <algorithm>\n#include <type_traits>\n\ntemplate<class T, class = std::enable_if<std"
  },
  {
    "path": "NEWorld.Base/Math/Vector4.h",
    "chars": 8128,
    "preview": "#pragma once\n\n#include <cmath>\n#include <algorithm>\n#include <type_traits>\n\ntemplate<class T, class = std::enable_if<std"
  },
  {
    "path": "NEWorld.Base/System/FileSystem.h",
    "chars": 341,
    "preview": "#pragma once\n\n#if __has_include(<filesystem>)\n#include <filesystem>\nnamespace NEWorld {\n    namespace filesystem = std::"
  },
  {
    "path": "NEWorld.Base/System/MessageBus.cpp",
    "chars": 722,
    "preview": "#include \"MessageBus.h\"\n\nstd::vector<std::shared_ptr<kls::PmrBase>> MessageBus::SlotBase::PrepareInvokeList() {\n    std:"
  },
  {
    "path": "NEWorld.Base/System/MessageBus.h",
    "chars": 2363,
    "preview": "#pragma once\n\n#include <mutex>\n#include <string>\n#include <memory>\n#include <vector>\n#include <functional>\n#include <uno"
  },
  {
    "path": "NEWorld.Game/Audio/Audio.cpp",
    "chars": 19,
    "preview": "#include \"Audio.h\"\n"
  },
  {
    "path": "NEWorld.Game/Audio/Audio.h",
    "chars": 44,
    "preview": "#pragma once\n\nnamespace NEWorld::Audio {\n\n}\n"
  },
  {
    "path": "NEWorld.Game/AudioSystem.cpp",
    "chars": 6178,
    "preview": "#include\"AudioSystem.h\"\n\nnamespace AudioSystem {\n    //ALDevice Device;\n    //Gain\n    ALfloat BGMGain = 0.1f;//背景音乐\n   "
  },
  {
    "path": "NEWorld.Game/AudioSystem.h",
    "chars": 1032,
    "preview": "#pragma once\n\n#include <al.h>\n\nnamespace AudioSystem {\n    //extern ALDevice Device;\n    //Gain\n    extern ALfloat BGMGa"
  },
  {
    "path": "NEWorld.Game/Command.h",
    "chars": 386,
    "preview": "#pragma once\n\n#include <utility>\n#include <functional>\n\nclass Command {\npublic:\n    Command(std::string _identifier, std"
  },
  {
    "path": "NEWorld.Game/ControlContext.h",
    "chars": 3040,
    "preview": "#pragma once\n#include \"stdinclude.h\"\n#include <GLFW/glfw3.h>\n#include <array>\n#include \"Math/Vector2.h\"\n#include \"Functi"
  },
  {
    "path": "NEWorld.Game/Definitions.cpp",
    "chars": 1375,
    "preview": "#include \"Definitions.h\"\n\n//Global Vars\nfloat FOVyNormal = 60.0f;\nfloat mousemove = 0.2f;\nint viewdistance = 8;\nint clou"
  },
  {
    "path": "NEWorld.Game/Definitions.h",
    "chars": 1822,
    "preview": "#pragma once\n#ifdef NDEBUG\n#pragma comment(linker, \"/SUBSYSTEM:\\\"WINDOWS\\\" /ENTRY:\\\"mainCRTStartup\\\"\")\n#endif\n\n#include "
  },
  {
    "path": "NEWorld.Game/Dispatch.cpp",
    "chars": 243,
    "preview": "#include \"Dispatch.h\"\n#include <thread>\n\nnamespace {\n\tauto sessDefault = kls::coroutine::CreateScalingFIFOExecutor(1, st"
  },
  {
    "path": "NEWorld.Game/Dispatch.h",
    "chars": 99,
    "preview": "#pragma once\n\n#include \"kls/coroutine/Executor.h\"\n\nkls::coroutine::IExecutor * GetSessionDefault();"
  },
  {
    "path": "NEWorld.Game/Frustum.cpp",
    "chars": 4113,
    "preview": "#include \"Frustum.h\"\n\n#define _USE_MATH_DEFINES\n\n#include <cmath>\n#include <cstring>\n\nvoid Frustum::LoadIdentity() {\n   "
  },
  {
    "path": "NEWorld.Game/Frustum.h",
    "chars": 2004,
    "preview": "#pragma once\n\nclass Frustum {\nprivate:\n    float frus[24], clip[16];\n    float proj[16], modl[16];\n\npublic:\n    //AABB w"
  },
  {
    "path": "NEWorld.Game/FunctionsKit.cpp",
    "chars": 1163,
    "preview": "#include \"FunctionsKit.h\"\n\n#if __has_include(<Windows.h>)\n#define WIN32_LEAN_AND_MEAN\n#define NOMINMAX\n#define NEWORLD_W"
  },
  {
    "path": "NEWorld.Game/FunctionsKit.h",
    "chars": 1628,
    "preview": "#pragma once\n\n#include \"stdinclude.h\"\n#include \"Typedefs.h\"\n#include <chrono>\n#include <vector>\n#include <sstream>\n#incl"
  },
  {
    "path": "NEWorld.Game/GUI/GUI.cpp",
    "chars": 7207,
    "preview": "#include <deque>\n#include \"GUI.h\"\n#include <NsRender/GLFactory.h>\n#include <NoesisPCH.h>\n#include \"Noesis.h\"\n#include \"S"
  },
  {
    "path": "NEWorld.Game/GUI/GUI.h",
    "chars": 1891,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n#include <memory>\n#include <NsCore/Ptr.h>\n#include <NsGui/IView.h>\n#include <NsGu"
  },
  {
    "path": "NEWorld.Game/GUI/InventorySlot.cpp",
    "chars": 1585,
    "preview": "#include \"InventorySlot.h\"\n\n#include <unordered_map>\n\n#include \"Definitions.h\"\n#include \"Textures.h\"\n#include \"Typedefs."
  },
  {
    "path": "NEWorld.Game/GUI/InventorySlot.h",
    "chars": 1875,
    "preview": "#include <unordered_map>\n\n#include \"Typedefs.h\"\n#include \"NsGui/CroppedBitmap.h\"\n#include \"NsGui/Image.h\"\n#include \"NsGu"
  },
  {
    "path": "NEWorld.Game/GUI/Menus/MainMenu.cpp",
    "chars": 10517,
    "preview": "#include \"Menus.h\"\n#include \"../GUI.h\"\n#include \"NsRender/GLFactory.h\"\n#include \"NsGui/Grid.h\"\n#include \"NsGui/Button.h\""
  },
  {
    "path": "NEWorld.Game/GUI/Menus/Menus.h",
    "chars": 105,
    "preview": "#include <memory>\n#include \"GUI/GUI.h\"\n\nnamespace Menus\n{\n    std::unique_ptr<GUI::Scene> startMenu();\n}\n"
  },
  {
    "path": "NEWorld.Game/GUI/Noesis.cpp",
    "chars": 3340,
    "preview": "#include \"Noesis.h\"\n\n#define GLEW_NO_GLU\n#include <GL/glew.h>\n#include <NsApp/StyleInteraction.h>\n#include <NsApp/EventT"
  },
  {
    "path": "NEWorld.Game/GUI/Noesis.h",
    "chars": 199,
    "preview": "#pragma once\n#include \"NsCore/Ptr.h\"\n#include \"NsRender/RenderDevice.h\"\n\nnamespace GUI {\n    void noesisSetup();\n    voi"
  },
  {
    "path": "NEWorld.Game/GameSettings.cpp",
    "chars": 2270,
    "preview": "#include \"GameSettings.h\"\n#include <sstream>\n#include <fstream>\n#include <map>\n#include \"Definitions.h\"\n#include \"Global"
  },
  {
    "path": "NEWorld.Game/GameSettings.h",
    "chars": 715,
    "preview": "#pragma once\n#include <string>\n#include <sstream>\n#include <unordered_map>\n\nclass GameSettings {\npublic:\n\tGameSettings()"
  },
  {
    "path": "NEWorld.Game/GameView.cpp",
    "chars": 27133,
    "preview": "#include \"GameView.h\"\n\n#include <optional>\n#include <utility>\n#include <Renderer/World/ShadowMaps.h>\n#include \"Universe/"
  },
  {
    "path": "NEWorld.Game/GameView.h",
    "chars": 35,
    "preview": "#pragma once\n\nvoid pushGameView();\n"
  },
  {
    "path": "NEWorld.Game/Globalization.cpp",
    "chars": 1328,
    "preview": "#include <fstream>\n#include \"Globalization.h\"\n#include <map>\n#include <nlohmann/json.hpp>\n#include <iostream>\n\nnamespace"
  },
  {
    "path": "NEWorld.Game/Globalization.h",
    "chars": 307,
    "preview": "#pragma once\n\n#include <string>\n\nnamespace Globalization {\n    struct Line {\n        std::string str;\n        int id;\n  "
  },
  {
    "path": "NEWorld.Game/Items.cpp",
    "chars": 382,
    "preview": "#include \"Items.h\"\n#include \"Textures.h\"\n\nItemInfo itemsinfo[] = {STICK, APPLE};\n\nvoid loadItemsTextures() {\n    itemsin"
  },
  {
    "path": "NEWorld.Game/Items.h",
    "chars": 536,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n\nclass ItemInfo {\npublic:\n    ItemInfo(Item itemid, TextureID itemtexture = 0) : "
  },
  {
    "path": "NEWorld.Game/Menus.h",
    "chars": 348,
    "preview": "#pragma once\n\n#include \"Globalization.h\"\n\nusing Globalization::GetStrbyKey;\nnamespace Menus {\n    void options();\n\n    v"
  },
  {
    "path": "NEWorld.Game/NEWorld.cpp",
    "chars": 2164,
    "preview": "//==============================   Initialize   ================================//\n//==============================初始化("
  },
  {
    "path": "NEWorld.Game/Particles.cpp",
    "chars": 7692,
    "preview": "#include \"Particles.h\"\n#include \"Universe/World/World.h\"\n#include \"Textures.h\"\n#include \"Renderer/BufferBuilder.h\"\n#incl"
  },
  {
    "path": "NEWorld.Game/Particles.h",
    "chars": 1000,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n#include \"Universe/Entity/bvh.h\"\n\nnamespace Particles {\n    const int PARTICALE_M"
  },
  {
    "path": "NEWorld.Game/Renderer/BufferBuilder.h",
    "chars": 3635,
    "preview": "#pragma once\n\n#include <array>\n#include <algorithm>\n#include \"Definitions.h\"\n#include <kls/temp/STL.h>\n#include <kls/cor"
  },
  {
    "path": "NEWorld.Game/Renderer/GL/Objects.cpp",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NEWorld.Game/Renderer/GL/Objects.h",
    "chars": 115,
    "preview": "#pragma once\n\n#include \"stdinclude.h\"\n#include \"Temp/Vector.h\"\n#include \"Temp/Unordered.h\"\n\nnamespace Renderer {\n}\n"
  },
  {
    "path": "NEWorld.Game/Renderer/GL/Pipeline.cpp",
    "chars": 11803,
    "preview": "#include <fstream>\n#include \"Pipeline.h\"\n#include \"FunctionsKit.h\"\n#include <kls/temp/STL.h>\n#include <Common/Logger.h>\n"
  },
  {
    "path": "NEWorld.Game/Renderer/GL/Pipeline.h",
    "chars": 3546,
    "preview": "#pragma once\n\n#include <string_view>\n#include \"stdinclude.h\"\n#include <kls/temp/STL.h>\n\nnamespace Renderer {\n    enum cl"
  },
  {
    "path": "NEWorld.Game/Renderer/Renderer.cpp",
    "chars": 6708,
    "preview": "#include \"Renderer.h\"\n#include <algorithm>\n#include <Common/Logger.h>\n#include \"Frustum.h\"\n#include \"BufferBuilder.h\"\n\nn"
  },
  {
    "path": "NEWorld.Game/Renderer/Renderer.h",
    "chars": 765,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n#include \"GL/Pipeline.h\"\n#include <cstring>\n\nnamespace Renderer {\n    //我猜你肯定不敢看R"
  },
  {
    "path": "NEWorld.Game/Renderer/World/ChunkRenderer.cpp",
    "chars": 18375,
    "preview": "#include \"ChunkRenderer.h\"\n#include \"Renderer/Renderer.h\"\n#include \"Universe/World/World.h\"\n#include \"Renderer/BufferBui"
  },
  {
    "path": "NEWorld.Game/Renderer/World/ChunkRenderer.h",
    "chars": 1973,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n#include \"Textures.h\"\n#include \"Universe/World/World.h\"\n#include <kls/coroutine/A"
  },
  {
    "path": "NEWorld.Game/Renderer/World/ShadowMaps.cpp",
    "chars": 2647,
    "preview": "#include \"ShadowMaps.h\"\n#include \"Universe/World/World.h\"\n#include \"Renderer/Renderer.h\"\n\nnamespace ShadowMaps {\n    voi"
  },
  {
    "path": "NEWorld.Game/Renderer/World/ShadowMaps.h",
    "chars": 546,
    "preview": "#pragma once\n\n#include \"Renderer/World/WorldRenderer.h\"\n\nnamespace ShadowMaps {\n    void BuildShadowMap(\n            Wor"
  },
  {
    "path": "NEWorld.Game/Renderer/World/WorldRenderer.cpp",
    "chars": 5293,
    "preview": "#include <queue>\n#include \"WorldRenderer.h\"\n#include <kls/coroutine/Operation.h>\n\nnamespace WorldRenderer {\n    int MaxC"
  },
  {
    "path": "NEWorld.Game/Renderer/World/WorldRenderer.h",
    "chars": 1349,
    "preview": "#pragma once\n\n#include \"Renderer/Renderer.h\"\n#include \"ChunkRenderer.h\"\n#include <kls/temp/STL.h>\n#include <kls/thread/S"
  },
  {
    "path": "NEWorld.Game/Setup.cpp",
    "chars": 8818,
    "preview": "#include <iostream>\n#include \"Setup.h\"\n\n#include \"ControlContext.h\"\n#include \"Definitions.h\"\n#include \"Textures.h\"\n#incl"
  },
  {
    "path": "NEWorld.Game/Setup.h",
    "chars": 384,
    "preview": "#pragma once\n\nstruct GLFWwindow;\n\nvoid splashScreen();\n\nvoid createWindow();\n\nvoid setupScreen();\n\nvoid setupNormalFog()"
  },
  {
    "path": "NEWorld.Game/Textures.cpp",
    "chars": 10750,
    "preview": "#include \"Textures.h\"\n#include \"Items.h\"\n#include \"Universe/World/Blocks.h\"\n#include <cstring>\n#include <fstream>\n#inclu"
  },
  {
    "path": "NEWorld.Game/Textures.h",
    "chars": 1790,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n\nextern int BLOCKTEXTURE_SIZE, BLOCKTEXTURE_UNITSIZE, filter;\nconst short BITMAP_"
  },
  {
    "path": "NEWorld.Game/Tick.cpp",
    "chars": 3656,
    "preview": "#include \"Tick.h\"\n#include <unordered_map>\n#include <kls/temp/STL.h>\n#include <kls/coroutine/Operation.h>\n\nstd::shared_p"
  },
  {
    "path": "NEWorld.Game/Tick.h",
    "chars": 501,
    "preview": "#pragma once\n\n#include <vector>\n#include <kls/Object.h>\n#include <kls/coroutine/Async.h>\n\nstruct TickComponent: kls::Pmr"
  },
  {
    "path": "NEWorld.Game/Typedefs.h",
    "chars": 435,
    "preview": "#pragma once\n//Types/constants define\n\n#include <cstdint>\n#include <thread>\n#include <mutex>\n\ntypedef unsigned char ubyt"
  },
  {
    "path": "NEWorld.Game/Universe/CommandHandler.h",
    "chars": 1966,
    "preview": "#pragma once\n\n#include \"Command.h\"\n#include \"Universe/World/Blocks.h\"\n#include \"Universe/World/World.h\"\n#include \"Items."
  },
  {
    "path": "NEWorld.Game/Universe/Entity/Entity.cpp",
    "chars": 1366,
    "preview": "#include \"Entity.h\"\n\n#include \"Universe/World/World.h\"\n\nInt3 Entity::getChunkPosition() const noexcept\n{ return Int3(mPo"
  },
  {
    "path": "NEWorld.Game/Universe/Entity/Entity.h",
    "chars": 2215,
    "preview": "#pragma once\n\n#include \"bvh.h\"\n#include \"Definitions.h\"\n#include \"Math/Vector3.h\"\n\nstruct RenderProperties {\n    Double3"
  },
  {
    "path": "NEWorld.Game/Universe/Entity/PlayerEntity.cpp",
    "chars": 9321,
    "preview": "#include \"PlayerEntity.h\"\n#include <fstream>\n#include <sstream>\n\n#include \"ControlContext.h\"\n#include \"Universe/World/Bl"
  },
  {
    "path": "NEWorld.Game/Universe/Entity/PlayerEntity.h",
    "chars": 2771,
    "preview": "#pragma once\n\n#include \"ControlContext.h\"\n#include \"Entity.h\"\n#include \"Universe/World/Blocks.h\"\n\nstruct ItemStack {\n\tIt"
  },
  {
    "path": "NEWorld.Game/Universe/Entity/bvh.cpp",
    "chars": 2529,
    "preview": "#include \"bvh.h\"\n\n#include <bvh/sweep_sah_builder.hpp>\n#include <bvh/locally_ordered_clustering_builder.hpp>\n#include <b"
  },
  {
    "path": "NEWorld.Game/Universe/Entity/bvh.h",
    "chars": 2544,
    "preview": "#pragma once\n\n#include <bvh/bvh.hpp>\n#include <bvh/vector.hpp>\n#include <bvh/ray.hpp>\n\n#include \"Math/Vector3.h\"\n\nusing "
  },
  {
    "path": "NEWorld.Game/Universe/Game.h",
    "chars": 8325,
    "preview": "#pragma once\n\n#include \"CommandHandler.h\"\n#include \"ControlContext.h\"\n#include \"Common/Logger.h\"\n#include \"Entity/Entity"
  },
  {
    "path": "NEWorld.Game/Universe/World/BlockRegistry.cpp",
    "chars": 3207,
    "preview": "#include \"BlockRegistry.h\"\n#include <nlohmann/json.hpp>\n#include <unordered_map>\n#include <vector>\n#include <mutex>\n#inc"
  },
  {
    "path": "NEWorld.Game/Universe/World/BlockRegistry.h",
    "chars": 592,
    "preview": "#pragma once\n\n#include \"Blocks.h\"\n#include \"System/FileSystem.h\"\n\nclass BlockRegistry {\npublic:\n    static void Register"
  },
  {
    "path": "NEWorld.Game/Universe/World/Blocks.cpp",
    "chars": 4825,
    "preview": "#include \"Items.h\"\n#include \"Blocks.h\"\n#include \"World.h\"\n\nnamespace Blocks {\n    BlockType::~BlockType() noexcept = def"
  },
  {
    "path": "NEWorld.Game/Universe/World/Blocks.h",
    "chars": 1873,
    "preview": "#pragma once\n\n#include <utility>\n#include <utility>\n#include <Math/Vector3.h>\n#include \"Definitions.h\"\n#include \"Global"
  },
  {
    "path": "NEWorld.Game/Universe/World/Chunk.cpp",
    "chars": 367,
    "preview": "#include \"Chunk.h\"\n#include \"World.h\"\n\nnamespace World {\n    Chunk::~Chunk() {\n        unloadedChunksCount++;\n    }\n\n   "
  },
  {
    "path": "NEWorld.Game/Universe/World/Chunk.h",
    "chars": 3911,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n#include \"Blocks.h\"\n#include \"Frustum.h\"\n#include <cstring>\n#include <kls/Object"
  },
  {
    "path": "NEWorld.Game/Universe/World/ChunkPtrArray.cpp",
    "chars": 984,
    "preview": "#include \"ChunkPtrArray.h\"\n#include <cstring>\n\nnamespace World {\n    void ChunkPtrArray::Create(int s) {\n        size = "
  },
  {
    "path": "NEWorld.Game/Universe/World/ChunkPtrArray.h",
    "chars": 1098,
    "preview": "#pragma once\n\n#include \"Math/Vector3.h\"\n\nnamespace World {\n    class Chunk;\n\n    class ChunkPtrArray {\n    public:\n     "
  },
  {
    "path": "NEWorld.Game/Universe/World/Data/BitStorage.h",
    "chars": 9256,
    "preview": "#pragma once\n\n#include <cmath>\n#include <memory>\n#include <cstddef>\n#include <cstring>\n#include <cstdint>\n#include <cass"
  },
  {
    "path": "NEWorld.Game/Universe/World/Data/ChunkStorage.cpp",
    "chars": 3406,
    "preview": "#include \"ChunkStorage.h\"\n\nnamespace World::Data {\n    ChunkStorage::ChunkStorage(int bits) noexcept\n            :mT(Che"
  },
  {
    "path": "NEWorld.Game/Universe/World/Data/ChunkStorage.h",
    "chars": 8065,
    "preview": "#pragma once\n\n#include <array>\n#include <vector>\n#include <algorithm>\n#include \"BitStorage.h\"\n\nnamespace World {\n    con"
  },
  {
    "path": "NEWorld.Game/Universe/World/OrderedArray.h",
    "chars": 1573,
    "preview": "#pragma once\n\n#include <array>\n#include <utility>\n#include <algorithm>\n#include <functional>\n#include <type_traits>\n\ntem"
  },
  {
    "path": "NEWorld.Game/Universe/World/TerrainGen/Carve.cpp",
    "chars": 2562,
    "preview": "namespace World::TerrainGen {\n    /*\n    void buildtree(Int3 pos) {\n        auto [x, y, z] = pos.Data;\n        //对生成条件进行"
  },
  {
    "path": "NEWorld.Game/Universe/World/TerrainGen/Generate.h",
    "chars": 4801,
    "preview": "#pragma once\n\n#include \"Heights.h\"\n#include \"Universe/World/Chunk.h\"\n\nnamespace World::TerrainGen {\n    class Generate {"
  },
  {
    "path": "NEWorld.Game/Universe/World/TerrainGen/Heights.h",
    "chars": 2612,
    "preview": "#pragma once\n\n#include \"Noise.h\"\n#include <bit>\n#include <atomic>\n#include <kls/Object.h>\n#include <tsl/hopscotch_map.h>"
  },
  {
    "path": "NEWorld.Game/Universe/World/TerrainGen/Noise.h",
    "chars": 2473,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n\nnamespace World::TerrainGen {\n    static constexpr int WaterLevel = 30;\n    stat"
  },
  {
    "path": "NEWorld.Game/Universe/World/World.cpp",
    "chars": 17261,
    "preview": "#include \"World.h\"\n#include \"Particles.h\"\n#include <cmath>\n#include <algorithm>\n#include \"System/FileSystem.h\"\n#include"
  },
  {
    "path": "NEWorld.Game/Universe/World/World.h",
    "chars": 2577,
    "preview": "#pragma once\n\n#include \"Definitions.h\"\n#include \"ChunkPtrArray.h\"\n#include \"Chunk.h\"\n#include \"Blocks.h\"\n#include \"Order"
  },
  {
    "path": "NEWorld.Game/resource.h",
    "chars": 373,
    "preview": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ 生成的包含文件。\n// 供 resource.rc 使用\n//\n\n// Next default values for new objects\n//"
  },
  {
    "path": "NEWorld.Game/resource.rc",
    "chars": 28,
    "preview": "GLFW_ICON ICON \"neworld.ico\""
  },
  {
    "path": "NEWorld.Game/stdinclude.h",
    "chars": 332,
    "preview": "#pragma once\n\n#include <thread>\n#include <mutex>\n\n#define _USE_MATH_DEFINES\n#ifndef M_PI\n#define M_PI 3.1415926535897932"
  },
  {
    "path": "NoesisGUI/CMake/FindNoesis.cmake",
    "chars": 1002,
    "preview": "# modified from https://github.com/rschurade/Ingnomia\n\nfind_path(NOESIS_INCLUDE_DIR\n\tNAMES\n\t\tNoesisPCH.h\n\tHINTS\n\t\t${NOES"
  },
  {
    "path": "NoesisGUI/CMakeLists.txt",
    "chars": 1615,
    "preview": "cmake_minimum_required(VERSION 3.10)\n\nproject(NEWorld)\nset(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE"
  },
  {
    "path": "NoesisGUI/bin2h.py",
    "chars": 977,
    "preview": "#!/usr/bin/env python\nfrom pathlib import Path\n\ndef bin2h(filein, fileout):\n    with open(filein, \"rb\") as fd:\n        d"
  },
  {
    "path": "README.md",
    "chars": 1368,
    "preview": "# NEWorld\n\n![Screenshot](https://raw.githubusercontent.com/Infinideastudio/NEWorld/refactor/Docs/old.png)\n\nNEWorld is a "
  }
]

About this extraction

This page contains the full source code of the Infinideastudio/NEWorld GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 159 files (876.3 KB), approximately 229.8k tokens, and a symbol index with 785 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!