1. Christian Specht
  2. MissileSharp

Commits

Christian Specht  committed 15a3ec7 Draft

style launcher window with MahApps.Metro

  • Participants
  • Parent commits 15f17db
  • Branches default

Comments (0)

Files changed (8)

File src/MissileSharp.Launcher/MissileSharp.Launcher.csproj

View file
  • Ignore whitespace
     <Reference Include="Autofac.Configuration">
       <HintPath>..\packages\Autofac.2.6.3.862\lib\NET40\Autofac.Configuration.dll</HintPath>
     </Reference>
+    <Reference Include="MahApps.Metro">
+      <HintPath>..\packages\MahApps.Metro.0.10.0.0\lib\net40\MahApps.Metro.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Windows.Interactivity">
+      <HintPath>..\packages\MahApps.Metro.0.10.0.0\lib\net40\System.Windows.Interactivity.dll</HintPath>
+    </Reference>
     <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />

File src/MissileSharp.Launcher/Views/MainWindow.xaml

View file
  • Ignore whitespace
-<Window x:Class="MissileSharp.Launcher.MainWindow"
+<Controls:MetroWindow x:Class="MissileSharp.Launcher.MainWindow"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
         Title="MissileSharp Launcher" Height="350" Width="525">
+    <Window.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </Window.Resources>
     <Grid>
         <ListBox ItemsSource="{Binding CommandSets}">
             <ListBox.ItemContainerStyle>
             </ListBox.ItemTemplate>
         </ListBox>
     </Grid>
-</Window>
+</Controls:MetroWindow>

File src/MissileSharp.Launcher/Views/MainWindow.xaml.cs

View file
  • Ignore whitespace
-using System.Windows;
+using MahApps.Metro.Controls;
 
 namespace MissileSharp.Launcher
 {
     /// <summary>
     /// Interaction logic for MainWindow.xaml
     /// </summary>
-    public partial class MainWindow : Window
+    public partial class MainWindow : MetroWindow
     {
         public MainWindow()
         {

File src/MissileSharp.Launcher/packages.config

View file
  • Ignore whitespace
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="Autofac" version="2.6.3.862" />
+  <package id="MahApps.Metro" version="0.10.0.0" />
 </packages>

File src/packages/MahApps.Metro.0.10.0.0/MahApps.Metro.0.10.0.0.nupkg

  • Ignore whitespace
Binary file added.

File src/packages/MahApps.Metro.0.10.0.0/lib/net40/MahApps.Metro.dll

  • Ignore whitespace
Binary file added.

File src/packages/MahApps.Metro.0.10.0.0/lib/net40/System.Windows.Interactivity.dll

  • Ignore whitespace
Binary file added.

File src/packages/MahApps.Metro.0.10.0.0/tools/install.ps1

View file
  • Ignore whitespace
+param($rootPath, $toolsPath, $package, $project)
+
+$project.DTE.ItemOperations.Navigate('http://mahapps.com/MahApps.Metro/')