diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bdc3535
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,108 @@
+# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
+[Bb]in/
+[Oo]bj/
+
+# mstest test results
+TestResults
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+[Dd]ebug/
+[Rr]elease/
+x64/
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.log
+*.vspscc
+*.vssscc
+.builds
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# 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
+*.Publish.xml
+
+# NuGet Packages Directory
+packages
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+[Bb]in
+[Oo]bj
+sql
+TestResults
+[Tt]est[Rr]esult*
+*.Cache
+ClientBin
+[Ss]tyle[Cc]op.*
+~$*
+*.dbmdl
+Generated_Code #added for RIA/Silverlight projects
+
+# 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
diff --git a/Odyssey/Demos/AlignTableCellMiddleCenterHS.png b/Odyssey/Demos/AlignTableCellMiddleCenterHS.png
new file mode 100644
index 0000000..34014a1
Binary files /dev/null and b/Odyssey/Demos/AlignTableCellMiddleCenterHS.png differ
diff --git a/Odyssey/Demos/App.xaml b/Odyssey/Demos/App.xaml
new file mode 100644
index 0000000..a335e37
--- /dev/null
+++ b/Odyssey/Demos/App.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/Odyssey/Demos/App.xaml.cs b/Odyssey/Demos/App.xaml.cs
new file mode 100644
index 0000000..4d1351a
--- /dev/null
+++ b/Odyssey/Demos/App.xaml.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace Demos
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/Odyssey/Demos/BreadcrumbWithDataSource.xaml b/Odyssey/Demos/BreadcrumbWithDataSource.xaml
new file mode 100644
index 0000000..24199bd
--- /dev/null
+++ b/Odyssey/Demos/BreadcrumbWithDataSource.xaml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Odyssey/Demos/BreadcrumbWithDataSource.xaml.cs b/Odyssey/Demos/BreadcrumbWithDataSource.xaml.cs
new file mode 100644
index 0000000..ecdc693
--- /dev/null
+++ b/Odyssey/Demos/BreadcrumbWithDataSource.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Demos
+{
+ ///
+ /// Interaction logic for Window1.xaml
+ ///
+ public partial class BreadcrumbDS : Window
+ {
+ public BreadcrumbDS()
+ {
+
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Odyssey/Demos/Demos.csproj b/Odyssey/Demos/Demos.csproj
new file mode 100644
index 0000000..eb19a5e
--- /dev/null
+++ b/Odyssey/Demos/Demos.csproj
@@ -0,0 +1,188 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {4F736E6C-D570-4882-B521-93819C059E82}
+ WinExe
+ Properties
+ Demos
+ Demos
+ v3.5
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ SAK
+ SAK
+ SAK
+ SAK
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+ 3.5
+
+
+ 3.5
+
+
+ 3.5
+
+
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ App.xaml
+ Code
+
+
+ MainDemo.xaml
+ Code
+
+
+
+
+ BreadcrumbWithDataSource.xaml
+
+
+
+ Main.xaml
+
+
+ Outlook.xaml
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ RibbonDemo.xaml
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+ Always
+
+
+
+
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}
+ Odyssey
+
+
+
+
+
\ No newline at end of file
diff --git a/Odyssey/Demos/FolderItem.cs b/Odyssey/Demos/FolderItem.cs
new file mode 100644
index 0000000..e15e633
--- /dev/null
+++ b/Odyssey/Demos/FolderItem.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Controls;
+using System.Windows.Media.Imaging;
+using System.Windows.Media;
+using System.IO;
+
+namespace Demos
+{
+ public class FolderItem
+ {
+ public string Folder { get; set; }
+ public ImageSource Image { get; set; }
+
+ public FolderItem()
+ : base()
+ {
+ ImageSourceConverter isc = new ImageSourceConverter();
+ Image = isc.ConvertFrom("openfolderHS.png") as ImageSource;
+ }
+ }
+}
diff --git a/Odyssey/Demos/Main.xaml b/Odyssey/Demos/Main.xaml
new file mode 100644
index 0000000..fa87a52
--- /dev/null
+++ b/Odyssey/Demos/Main.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Odyssey/Demos/Main.xaml.cs b/Odyssey/Demos/Main.xaml.cs
new file mode 100644
index 0000000..4cdf858
--- /dev/null
+++ b/Odyssey/Demos/Main.xaml.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using Demos.Ribbon;
+
+namespace Demos
+{
+ ///
+ /// Interaction logic for Main.xaml
+ ///
+ public partial class Main : Window
+ {
+ public Main()
+ {
+ InitializeComponent();
+ }
+
+ private void OutlookClick(object sender, RoutedEventArgs e)
+ {
+ Outlook outlook = new Outlook();
+ outlook.ShowDialog();
+ }
+
+ private void ExplorerBarClick(object sender, RoutedEventArgs e)
+ {
+ ExplorerBar explorerBar = new ExplorerBar();
+ explorerBar.ShowDialog();
+ }
+
+ private void BreadcrumbBarClick(object sender, RoutedEventArgs e)
+ {
+ BreadcrumbDS bds = new BreadcrumbDS();
+ bds.ShowDialog();
+ }
+
+ private void RibbonBarClick(object sender, RoutedEventArgs e)
+ {
+ RibbonDemo ribbonDemo = new RibbonDemo();
+ ribbonDemo.Show();
+ }
+ }
+}
diff --git a/Odyssey/Demos/MainDemo.xaml b/Odyssey/Demos/MainDemo.xaml
new file mode 100644
index 0000000..5bd41f0
--- /dev/null
+++ b/Odyssey/Demos/MainDemo.xaml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Odyssey/Demos/MainDemo.xaml.cs b/Odyssey/Demos/MainDemo.xaml.cs
new file mode 100644
index 0000000..33f6a6c
--- /dev/null
+++ b/Odyssey/Demos/MainDemo.xaml.cs
@@ -0,0 +1,208 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Odyssey.Controls;
+using System.Windows.Media.Animation;
+
+namespace Demos
+{
+ //BUGFIX: Corrected a glitch when the SubItems of a Breadrumb where reopened. This caused the SelectedItem to be set to null and therefore alls trails after the breadcrumb where removed.
+
+ ///
+ /// Interaction logic for Window1.xaml
+ ///
+ public partial class ExplorerBar : Window
+ {
+ public ExplorerBar()
+ {
+ InitializeComponent();
+ }
+
+ #region ExplorerBar
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ Background = Brushes.LightSteelBlue;
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ text3.Visibility = text3.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
+ text1.Visibility = text1.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
+ }
+
+
+ private void Button_Click_3(object sender, RoutedEventArgs e)
+ {
+ expander1.IsMinimized ^= true;
+ }
+
+ private void Button_Click_4(object sender, RoutedEventArgs e)
+ {
+ expander2.IsMinimized ^= true;
+ }
+
+ private void Animate1Click(object sender, RoutedEventArgs e)
+ {
+ expander2.IsExpanded ^= true;
+ expander1.IsMinimized ^= true;
+
+ }
+ private void Animate2Click(object sender, RoutedEventArgs e)
+ {
+ //text2.Visibility = text2.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
+ expander1.IsExpanded ^= true;
+ expander2.IsExpanded ^= true;
+ }
+ #endregion
+
+ #region BreadcrumbBar
+ ///
+ /// A BreadcrumbItem needs to populate it's Items. This can be due to the fact that a new BreadcrumbItem is selected, and thus
+ /// it's Items must be populated to determine whether this BreadcrumbItem show a dropdown button,
+ /// or when the Path property of the BreadcrumbBar is changed and therefore the Breadcrumbs must be populated from the new path.
+ ///
+ private void BreadcrumbBar_PopulateItems(object sender, Odyssey.Controls.BreadcrumbItemEventArgs e)
+ {
+ BreadcrumbItem item = e.Item;
+ if (item.Items.Count == 0)
+ {
+ PopulateFolders(item);
+ e.Handled = true;
+ }
+ }
+
+ ///
+ /// Gets a collection of all drives on the computer.
+ ///
+ private static IEnumerable GetDrives(string separatorString)
+ {
+ int separatorLength = separatorString.Length;
+ var folders = from drive in System.IO.Directory.GetLogicalDrives() select drive.EndsWith(separatorString) ? drive.Remove(drive.Length - separatorLength) : drive;
+ return folders.AsEnumerable();
+ }
+
+ ///
+ /// Populate the Items of the specified BreadcrumbItem with the sub folders if necassary.
+ ///
+ ///
+ private static void PopulateFolders(BreadcrumbItem item)
+ {
+ List folderItems = GetFolderItemsFromBreadcrumb(item);
+ item.ItemsSource = folderItems;
+ }
+
+ ///
+ /// Gets a list of FolderItems that are the subfolders of the specified BreadcrumbItem.
+ ///
+ private static List GetFolderItemsFromBreadcrumb(BreadcrumbItem item)
+ {
+ BreadcrumbBar bar = item.BreadcrumbBar;
+ string path = bar.PathFromBreadcrumbItem(item);
+ string trace = item.TraceValue;
+ string[] subFolders;
+ if (trace.Equals("Computer"))
+ {
+ subFolders = GetDrives(bar.SeparatorString).ToArray();
+ }
+ else
+ {
+ try
+ {
+ subFolders = (from dir in System.IO.Directory.GetDirectories(path + "\\") select System.IO.Path.GetFileName(dir)).ToArray();
+ }
+ catch
+ {
+ //maybe we don't have access!
+ subFolders = new string[] { };
+ }
+ }
+ List folderItems = (from folder in subFolders orderby folder select new FolderItem { Folder = folder }).ToList();
+ return folderItems;
+ }
+
+ ///
+ /// Convert the path from visual to logical or vice versa:
+ ///
+ private void BreadcrumbBar_PathConversion(object sender, PathConversionEventArgs e)
+ {
+ if (e.Mode == PathConversionEventArgs.ConversionMode.DisplayToEdit)
+ {
+ if (e.DisplayPath.StartsWith(@"Computer\", StringComparison.OrdinalIgnoreCase))
+ {
+ e.EditPath = e.DisplayPath.Remove(0, 9);
+ }
+ else if (e.DisplayPath.StartsWith(@"Network\", StringComparison.OrdinalIgnoreCase))
+ {
+ string editPath = e.DisplayPath.Remove(0, 8);
+ editPath = @"\\" + editPath.Replace('\\', '/');
+ e.EditPath = editPath;
+ }
+ }
+ else
+ {
+ if (e.EditPath.StartsWith("c:", StringComparison.OrdinalIgnoreCase))
+ {
+ e.DisplayPath = @"Desktop\Computer\" + e.EditPath;
+ }
+ else if (e.EditPath.StartsWith(@"\\"))
+ {
+ e.DisplayPath = @"Desktop\Network\" + e.EditPath.Remove(0, 2).Replace('/', '\\');
+ }
+ }
+ }
+
+ ///
+ /// Show a progress bar animation for demonstation purpose.
+ ///
+ private void RefreshClick(object sender, RoutedEventArgs e)
+ {
+ DoubleAnimation da = new DoubleAnimation(100, new Duration(new TimeSpan(0, 0, 2)));
+ da.FillBehavior = FillBehavior.Stop;
+ bar.BeginAnimation(BreadcrumbBar.ProgressValueProperty, da);
+ }
+
+ ///
+ /// The dropdown menu of a BreadcrumbItem was pressed, so delete the current folders, and repopulate the folders
+ /// to ensure actual data.
+ ///
+ private void bar_BreadcrumbItemDropDownOpened(object sender, BreadcrumbItemEventArgs e)
+ {
+ BreadcrumbItem item = e.Item;
+
+ // only repopulate, if the BreadcrumbItem is dynamically generated which means, item.Data is a pointer to itself:
+ if (!(item.Data is BreadcrumbItem))
+ {
+ UpdateFolderItems(item);
+ }
+ }
+
+ ///
+ /// Update the list of Subfolders from a BreadcrumbItem.
+ ///
+ private void UpdateFolderItems(BreadcrumbItem item)
+ {
+ List actualFolders = GetFolderItemsFromBreadcrumb(item);
+ List currentFolders = item.ItemsSource as List;
+ currentFolders.Clear();
+ currentFolders.AddRange(actualFolders);
+
+ }
+
+ public void ShowStaticBreadcrumbBar(object sender, RoutedEventArgs e)
+ {
+ BreadcrumbDS ds = new BreadcrumbDS();
+ ds.ShowDialog();
+ }
+ #endregion
+ }
+}
diff --git a/Odyssey/Demos/Outlook.xaml b/Odyssey/Demos/Outlook.xaml
new file mode 100644
index 0000000..0acd681
--- /dev/null
+++ b/Odyssey/Demos/Outlook.xaml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Toggle2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Toggle1
+ Toggle2
+
+
+
+
+
diff --git a/Odyssey/Demos/Outlook.xaml.cs b/Odyssey/Demos/Outlook.xaml.cs
new file mode 100644
index 0000000..5142c58
--- /dev/null
+++ b/Odyssey/Demos/Outlook.xaml.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using Odyssey.Controls;
+using Odyssey.Controls.Classes;
+
+namespace Demos
+{
+ ///
+ /// Interaction logic for Outlook.xaml
+ ///
+ public partial class Outlook : Window
+ {
+ public Outlook()
+ {
+ InitializeComponent();
+ }
+
+
+ private void OutlookBarIncClick(object sender, RoutedEventArgs e)
+ {
+ bar.MaxNumberOfButtons++;
+ }
+
+ private void OutlookBarDecClick(object sender, RoutedEventArgs e)
+ {
+ bar.MaxNumberOfButtons--;
+ }
+
+ private void bar_SelectedSectionChanged(object sender, RoutedPropertyChangedEventArgs e)
+ {
+ if (IsInitialized)
+ {
+ label.Text = e.NewValue.Header.ToString();
+ }
+ }
+
+
+ private void BlueSkinClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.OfficeBlue;
+
+ }
+
+ private void SilverSkinClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.OfficeSilver;
+ }
+
+ private void BlackSkinClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.OfficeBlack;
+ }
+
+
+ }
+}
diff --git a/Odyssey/Demos/Properties/AssemblyInfo.cs b/Odyssey/Demos/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4edad3a
--- /dev/null
+++ b/Odyssey/Demos/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Odyssey Demos")]
+[assembly: AssemblyDescription("Demonstation of the Odyssey controls.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("tomssoftware.net")]
+[assembly: AssemblyProduct("Odyssey Demos")]
+[assembly: AssemblyCopyright("Copyright © Thomas Gerber 2008-2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.*")]
+[assembly: AssemblyFileVersion("1.0.1.100")]
diff --git a/Odyssey/Demos/Properties/Resources.Designer.cs b/Odyssey/Demos/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..4181dff
--- /dev/null
+++ b/Odyssey/Demos/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3053
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Demos.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Demos.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Odyssey/Demos/Properties/Resources.resx b/Odyssey/Demos/Properties/Resources.resx
new file mode 100644
index 0000000..ffecec8
--- /dev/null
+++ b/Odyssey/Demos/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Odyssey/Demos/Properties/Settings.Designer.cs b/Odyssey/Demos/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..e161cd0
--- /dev/null
+++ b/Odyssey/Demos/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3053
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Demos.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Odyssey/Demos/Properties/Settings.settings b/Odyssey/Demos/Properties/Settings.settings
new file mode 100644
index 0000000..8f2fd95
--- /dev/null
+++ b/Odyssey/Demos/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Odyssey/Demos/Ribbon/RibbonDemo.xaml b/Odyssey/Demos/Ribbon/RibbonDemo.xaml
new file mode 100644
index 0000000..8880cec
--- /dev/null
+++ b/Odyssey/Demos/Ribbon/RibbonDemo.xaml
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Close Demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Check me
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Radio 1
+ Radio 2
+ Radio 3
+ Radio 4
+ Radio 5
+ Radio 6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Odyssey/Demos/Ribbon/RibbonDemo.xaml.cs b/Odyssey/Demos/Ribbon/RibbonDemo.xaml.cs
new file mode 100644
index 0000000..0143536
--- /dev/null
+++ b/Odyssey/Demos/Ribbon/RibbonDemo.xaml.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using Odyssey.Controls.Classes;
+using Odyssey.Controls;
+
+namespace Demos.Ribbon
+{
+ ///
+ /// Interaction logic for RibbonDemo.xaml
+ ///
+ public partial class RibbonDemo : RibbonWindow
+ {
+ public RibbonDemo()
+ {
+ InitializeComponent();
+ }
+
+ private void Win7Click(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.Windows7;
+ }
+
+ private void VistaClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.Vista;
+ }
+
+ private void OfficeBlueClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.OfficeBlue;
+ }
+
+ private void OfficeSilverClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.OfficeSilver;
+ }
+
+ private void OfficeBlackClick(object sender, RoutedEventArgs e)
+ {
+ SkinManager.SkinId = SkinId.OfficeBlack;
+ }
+
+ private void Context1Click(object sender, RoutedEventArgs e)
+ {
+ ribbonBar.ContextualTabSet = ribbonBar.ContextualTabSets[0];
+ }
+
+ private void Context2Click(object sender, RoutedEventArgs e)
+ {
+ ribbonBar.ContextualTabSet = ribbonBar.ContextualTabSets[1];
+ }
+
+ private void ContextOffClick(object sender, RoutedEventArgs e)
+ {
+ ribbonBar.ContextualTabSet = null;
+ }
+
+
+ private void ShowBelowClick(object sender, RoutedEventArgs e)
+ {
+ ribbonBar.ToolbarPlacement = QAPlacement.Bottom;
+ }
+
+ private void ShowAboveClick(object sender, RoutedEventArgs e)
+ {
+ ribbonBar.ToolbarPlacement = QAPlacement.Top;
+ }
+
+ private void CloseDemoClick(object sender, RoutedEventArgs e)
+ {
+ Close();
+ }
+
+ private void RibbonGroup_LaunchDialog(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show("Launcher");
+ }
+
+ }
+}
diff --git a/Odyssey/Demos/Ribbon/ThumbnailConverter.cs b/Odyssey/Demos/Ribbon/ThumbnailConverter.cs
new file mode 100644
index 0000000..0f96f72
--- /dev/null
+++ b/Odyssey/Demos/Ribbon/ThumbnailConverter.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows.Data;
+using Odyssey.Controls;
+
+namespace Demos
+{
+ public class ThumbnailConverter:IValueConverter
+ {
+ #region IValueConverter Members
+
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ RibbonThumbnail tn = value as RibbonThumbnail;
+ if (tn == null) return value;
+
+ string s = System.IO.Path.GetFileName(tn.ImageSource.ToString());
+ return s;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/Odyssey/Demos/Web.png b/Odyssey/Demos/Web.png
new file mode 100644
index 0000000..4782ae8
Binary files /dev/null and b/Odyssey/Demos/Web.png differ
diff --git a/Odyssey/Demos/img/cut16.png b/Odyssey/Demos/img/cut16.png
new file mode 100644
index 0000000..018912d
Binary files /dev/null and b/Odyssey/Demos/img/cut16.png differ
diff --git a/Odyssey/Demos/img/cut32.png b/Odyssey/Demos/img/cut32.png
new file mode 100644
index 0000000..171599b
Binary files /dev/null and b/Odyssey/Demos/img/cut32.png differ
diff --git a/Odyssey/Demos/img/delete16.png b/Odyssey/Demos/img/delete16.png
new file mode 100644
index 0000000..9d69207
Binary files /dev/null and b/Odyssey/Demos/img/delete16.png differ
diff --git a/Odyssey/Demos/img/delete32.png b/Odyssey/Demos/img/delete32.png
new file mode 100644
index 0000000..0046040
Binary files /dev/null and b/Odyssey/Demos/img/delete32.png differ
diff --git a/Odyssey/Demos/img/favorites16.png b/Odyssey/Demos/img/favorites16.png
new file mode 100644
index 0000000..d50109d
Binary files /dev/null and b/Odyssey/Demos/img/favorites16.png differ
diff --git a/Odyssey/Demos/img/favorites32.png b/Odyssey/Demos/img/favorites32.png
new file mode 100644
index 0000000..838b799
Binary files /dev/null and b/Odyssey/Demos/img/favorites32.png differ
diff --git a/Odyssey/Demos/img/folder16.png b/Odyssey/Demos/img/folder16.png
new file mode 100644
index 0000000..ca4ff48
Binary files /dev/null and b/Odyssey/Demos/img/folder16.png differ
diff --git a/Odyssey/Demos/img/folder32.png b/Odyssey/Demos/img/folder32.png
new file mode 100644
index 0000000..5a0b338
Binary files /dev/null and b/Odyssey/Demos/img/folder32.png differ
diff --git a/Odyssey/Demos/img/history16.png b/Odyssey/Demos/img/history16.png
new file mode 100644
index 0000000..a1a5277
Binary files /dev/null and b/Odyssey/Demos/img/history16.png differ
diff --git a/Odyssey/Demos/img/history32.png b/Odyssey/Demos/img/history32.png
new file mode 100644
index 0000000..e02f5b9
Binary files /dev/null and b/Odyssey/Demos/img/history32.png differ
diff --git a/Odyssey/Demos/img/home16.png b/Odyssey/Demos/img/home16.png
new file mode 100644
index 0000000..edee1ae
Binary files /dev/null and b/Odyssey/Demos/img/home16.png differ
diff --git a/Odyssey/Demos/img/home32.png b/Odyssey/Demos/img/home32.png
new file mode 100644
index 0000000..2c1eda1
Binary files /dev/null and b/Odyssey/Demos/img/home32.png differ
diff --git a/Odyssey/Demos/img/mail16.png b/Odyssey/Demos/img/mail16.png
new file mode 100644
index 0000000..62ce00a
Binary files /dev/null and b/Odyssey/Demos/img/mail16.png differ
diff --git a/Odyssey/Demos/img/mail32.png b/Odyssey/Demos/img/mail32.png
new file mode 100644
index 0000000..95d6106
Binary files /dev/null and b/Odyssey/Demos/img/mail32.png differ
diff --git a/Odyssey/Demos/img/paste16.png b/Odyssey/Demos/img/paste16.png
new file mode 100644
index 0000000..f618e48
Binary files /dev/null and b/Odyssey/Demos/img/paste16.png differ
diff --git a/Odyssey/Demos/img/paste32.png b/Odyssey/Demos/img/paste32.png
new file mode 100644
index 0000000..f09085e
Binary files /dev/null and b/Odyssey/Demos/img/paste32.png differ
diff --git a/Odyssey/Demos/img/props16.png b/Odyssey/Demos/img/props16.png
new file mode 100644
index 0000000..8ea4173
Binary files /dev/null and b/Odyssey/Demos/img/props16.png differ
diff --git a/Odyssey/Demos/img/props32.png b/Odyssey/Demos/img/props32.png
new file mode 100644
index 0000000..262cbd4
Binary files /dev/null and b/Odyssey/Demos/img/props32.png differ
diff --git a/Odyssey/Demos/img/save16.png b/Odyssey/Demos/img/save16.png
new file mode 100644
index 0000000..613a0d8
Binary files /dev/null and b/Odyssey/Demos/img/save16.png differ
diff --git a/Odyssey/Demos/img/save32.png b/Odyssey/Demos/img/save32.png
new file mode 100644
index 0000000..4d0e44e
Binary files /dev/null and b/Odyssey/Demos/img/save32.png differ
diff --git a/Odyssey/Demos/img/search16.png b/Odyssey/Demos/img/search16.png
new file mode 100644
index 0000000..50a2390
Binary files /dev/null and b/Odyssey/Demos/img/search16.png differ
diff --git a/Odyssey/Demos/img/search32.png b/Odyssey/Demos/img/search32.png
new file mode 100644
index 0000000..59b25e8
Binary files /dev/null and b/Odyssey/Demos/img/search32.png differ
diff --git a/Odyssey/Demos/img/undo16.png b/Odyssey/Demos/img/undo16.png
new file mode 100644
index 0000000..ccf24ca
Binary files /dev/null and b/Odyssey/Demos/img/undo16.png differ
diff --git a/Odyssey/Demos/img/undo32.png b/Odyssey/Demos/img/undo32.png
new file mode 100644
index 0000000..fff1cd9
Binary files /dev/null and b/Odyssey/Demos/img/undo32.png differ
diff --git a/Odyssey/Demos/openfolderHS.png b/Odyssey/Demos/openfolderHS.png
new file mode 100644
index 0000000..0bc670e
Binary files /dev/null and b/Odyssey/Demos/openfolderHS.png differ
diff --git a/Odyssey/Odyssey.sln b/Odyssey/Odyssey.sln
new file mode 100644
index 0000000..cdf9549
--- /dev/null
+++ b/Odyssey/Odyssey.sln
@@ -0,0 +1,72 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Odyssey", "Odyssey\Odyssey.csproj", "{333FDC55-6B47-4A64-A2DF-A4C5823FAC74}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demos", "Demos\Demos.csproj", "{4F736E6C-D570-4882-B521-93819C059E82}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{642DE219-C13C-407C-AD40-51A1D4D03EE5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PasswordSafe", "..\PasswordSafe\PasswordSafe\PasswordSafe.csproj", "{24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PasswordSafe.Data", "..\PasswordSafe\PasswordSafe.Data\PasswordSafe.Data.csproj", "{E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}"
+EndProject
+Global
+ GlobalSection(TeamFoundationVersionControl) = preSolution
+ SccNumberOfProjects = 5
+ SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
+ SccTeamFoundationServer = https://tfs08.codeplex.com/
+ SccLocalPath0 = .
+ SccProjectUniqueName1 = Demos\\Demos.csproj
+ SccProjectName1 = Demos
+ SccLocalPath1 = Demos
+ SccProjectUniqueName2 = Odyssey\\Odyssey.csproj
+ SccProjectName2 = Odyssey
+ SccLocalPath2 = Odyssey
+ SccProjectUniqueName3 = ..\\PasswordSafe\\PasswordSafe\\PasswordSafe.csproj
+ SccProjectName3 = ../PasswordSafe/PasswordSafe
+ SccLocalPath3 = ..\\PasswordSafe\\PasswordSafe
+ SccProjectUniqueName4 = ..\\PasswordSafe\\PasswordSafe.Data\\PasswordSafe.Data.csproj
+ SccProjectName4 = ../PasswordSafe/PasswordSafe.Data
+ SccLocalPath4 = ..\\PasswordSafe\\PasswordSafe.Data
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Debug|x86.ActiveCfg = Debug|x86
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Debug|x86.Build.0 = Debug|x86
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Release|x86.ActiveCfg = Release|x86
+ {333FDC55-6B47-4A64-A2DF-A4C5823FAC74}.Release|x86.Build.0 = Release|x86
+ {4F736E6C-D570-4882-B521-93819C059E82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F736E6C-D570-4882-B521-93819C059E82}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F736E6C-D570-4882-B521-93819C059E82}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4F736E6C-D570-4882-B521-93819C059E82}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F736E6C-D570-4882-B521-93819C059E82}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F736E6C-D570-4882-B521-93819C059E82}.Release|x86.ActiveCfg = Release|Any CPU
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Debug|x86.ActiveCfg = Debug|x86
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Debug|x86.Build.0 = Debug|x86
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Release|Any CPU.Build.0 = Release|Any CPU
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Release|x86.ActiveCfg = Release|x86
+ {24CBC0A1-F7C4-45A0-8D58-E1BB1B4F0629}.Release|x86.Build.0 = Release|x86
+ {E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E4DA0115-54F3-4DA0-813B-CDEBF4D205E5}.Release|x86.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Odyssey/Odyssey/BreadcrumbBar/ApplyPropertiesEventArgs.cs b/Odyssey/Odyssey/BreadcrumbBar/ApplyPropertiesEventArgs.cs
new file mode 100644
index 0000000..8be0a5e
--- /dev/null
+++ b/Odyssey/Odyssey/BreadcrumbBar/ApplyPropertiesEventArgs.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Media;
+
+#region Licence
+// Copyright (c) 2008 Thomas Gerber
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#endregion
+namespace Odyssey.Controls
+{
+ public class ApplyPropertiesEventArgs:RoutedEventArgs
+ {
+ public ApplyPropertiesEventArgs(object item, BreadcrumbItem breadcrumb, RoutedEvent routedEvent)
+ : base(routedEvent)
+ {
+ Item = item;
+ Breadcrumb = breadcrumb;
+
+ }
+
+ ///
+ /// The breadcrumb for which to apply the properites.
+ ///
+ public BreadcrumbItem Breadcrumb { get; private set; }
+
+ ///
+ /// The data item of the breadcrumb.
+ ///
+ public object Item { get; private set; }
+
+ public ImageSource Image { get; set; }
+
+ ///
+ /// The trace that is used to show the title of a breadcrumb.
+ ///
+ public object Trace { get; set; }
+
+ ///
+ /// The trace that is used to build the path.
+ /// This can be used to remove the trace of the root item in the path, if necassary.
+ ///
+ public string TraceValue { get; set; }
+ }
+
+ public delegate void ApplyPropertiesEventHandler(object sender, ApplyPropertiesEventArgs e);
+}
diff --git a/Odyssey/Odyssey/BreadcrumbBar/BreadcrumbBar.cs b/Odyssey/Odyssey/BreadcrumbBar/BreadcrumbBar.cs
new file mode 100644
index 0000000..b91ec65
--- /dev/null
+++ b/Odyssey/Odyssey/BreadcrumbBar/BreadcrumbBar.cs
@@ -0,0 +1,1399 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.ComponentModel;
+using System.Collections;
+using System.Diagnostics;
+using System.Collections.ObjectModel;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+
+#region changelog
+// Version 1.3.17:
+// - preserved underscores for headers.
+// reported by bigbigllama on http://www.codeproject.com/KB/tree/WPFBreadcrumbBar.aspx
+// thanx for your help.
+#endregion
+#region Licence
+// Copyright (c) 2008 Thomas Gerber
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#endregion
+namespace Odyssey.Controls
+{
+
+ ///TODO: Enable async popuplation on demand.
+ ///
+ /// A breadcrumb bar the contains breadcrumb items, a dropdown control, additional buttons and a progress bar.
+ ///
+ [ContentProperty("Root")]
+ [TemplatePart(Name = partComboBox)]
+ [TemplatePart(Name = partRoot)]
+ public class BreadcrumbBar : Control, IAddChild
+ {
+ private const string partComboBox = "PART_ComboBox";
+ private const string partRoot = "PART_Root";
+
+ ///
+ /// Gets the number of the first breadcrumb to hide in the path if descending breadcrumbs are selected.
+ ///
+ int BreadcrumbsToHide
+ {
+ get { return HideRootNode ? 1 : 0; }
+ }
+
+
+
+ ///
+ /// Gets or sets wether the root node is removed from the breadcrumb bar if any child node is selected.
+ /// This is a dependency property.
+ ///
+ public bool HideRootNode
+ {
+ get { return (bool)GetValue(HideRootNodeProperty); }
+ set { SetValue(HideRootNodeProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for HideRootNode. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty HideRootNodeProperty =
+ DependencyProperty.Register("HideRootNode", typeof(bool), typeof(BreadcrumbBar), new UIPropertyMetadata(true));
+
+
+
+ #region Dependency Properties
+
+ public static readonly DependencyProperty HasDropDownItemsProperty =
+ DependencyProperty.Register("HasDropDownItems", typeof(bool), typeof(BreadcrumbBar), new UIPropertyMetadata(false));
+
+
+ public static readonly DependencyProperty DropDownItemsPanelProperty =
+ DependencyProperty.Register("DropDownItemsPanel", typeof(ItemsPanelTemplate), typeof(BreadcrumbBar), new UIPropertyMetadata(null));
+
+ private static readonly DependencyPropertyKey IsRootSelectedPropertyKey =
+ DependencyProperty.RegisterReadOnly("IsRootSelected", typeof(bool), typeof(BreadcrumbBar), new UIPropertyMetadata(true));
+
+ public static readonly DependencyProperty IsRootSelectedProperty = IsRootSelectedPropertyKey.DependencyProperty;
+
+ public static readonly DependencyProperty DropDownItemTemplateProperty =
+ DependencyProperty.Register("DropDownItemTemplate", typeof(DataTemplate), typeof(BreadcrumbBar), new UIPropertyMetadata(null));
+
+ public static readonly DependencyProperty IsEditableProperty =
+ DependencyProperty.Register("IsEditable", typeof(bool), typeof(BreadcrumbBar), new UIPropertyMetadata(true));
+
+ public static readonly DependencyProperty DropDownItemTemplateSelectorProperty =
+ DependencyProperty.Register("DropDownItemTemplateSelector", typeof(DataTemplateSelector), typeof(BreadcrumbBar), new UIPropertyMetadata(null));
+
+ public static readonly DependencyProperty OverflowItemTemplateSelectorProperty =
+ DependencyProperty.Register("OverflowItemTemplateSelector", typeof(DataTemplateSelector), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null,
+ FrameworkPropertyMetadataOptions.Inherits));
+
+ public static readonly DependencyProperty OverflowItemTemplateProperty =
+ DependencyProperty.Register("OverflowItemTemplate", typeof(DataTemplate), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null,
+ FrameworkPropertyMetadataOptions.Inherits));
+
+ private static readonly DependencyPropertyKey CollapsedTracesPropertyKey =
+ DependencyProperty.RegisterReadOnly("CollapsedTraces", typeof(IEnumerable), typeof(BreadcrumbBar), new UIPropertyMetadata(null));
+ public static readonly DependencyProperty CollapsedTracesProperty = CollapsedTracesPropertyKey.DependencyProperty;
+
+ public static readonly DependencyProperty RootProperty =
+ DependencyProperty.Register("Root", typeof(object), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null,
+ FrameworkPropertyMetadataOptions.AffectsMeasure |
+ FrameworkPropertyMetadataOptions.AffectsRender |
+ FrameworkPropertyMetadataOptions.AffectsArrange,
+ OnRootPropertyChanged));
+
+ public static readonly DependencyProperty SelectedItemProperty =
+ DependencyProperty.Register("SelectedItem", typeof(object), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null,
+ FrameworkPropertyMetadataOptions.AffectsArrange |
+ FrameworkPropertyMetadataOptions.AffectsMeasure |
+ FrameworkPropertyMetadataOptions.AffectsMeasure,
+ OnSelectedItemPropertyChanged));
+
+ private static readonly DependencyPropertyKey SelectedBreadcrumbPropertyKey =
+ DependencyProperty.RegisterReadOnly("SelectedBreadcrumb", typeof(BreadcrumbItem), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null,
+ FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.AffectsArrange,
+ OnSelectedBreadcrumbPropertyChanged));
+ public static readonly DependencyProperty SelectedBreadcrumbProperty = SelectedBreadcrumbPropertyKey.DependencyProperty;
+
+ public static readonly DependencyProperty IsOverflowPressedProperty =
+ DependencyProperty.Register("IsOverflowPressed", typeof(bool), typeof(BreadcrumbBar), new UIPropertyMetadata(false, OverflowPressedChanged));
+
+ private static readonly DependencyPropertyKey RootItemPropertyKey =
+ DependencyProperty.RegisterReadOnly("RootItem", typeof(BreadcrumbItem), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null,
+ FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsMeasure,
+ OnRootItemPropertyChanged
+ ));
+ private static readonly DependencyProperty RootItemProperty = RootItemPropertyKey.DependencyProperty;
+
+ private static void OnRootItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ ((BreadcrumbBar)d).OnRootItemChanged((BreadcrumbItem)e.OldValue, (BreadcrumbItem)e.NewValue);
+ }
+
+ protected virtual void OnRootItemChanged(BreadcrumbItem oldValue, BreadcrumbItem newValue)
+ {
+ }
+
+ public static readonly DependencyProperty BreadcrumbItemTemplateSelectorProperty =
+ DependencyProperty.Register("BreadcrumbItemTemplateSelector", typeof(DataTemplateSelector), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.Inherits));
+
+ public static readonly DependencyProperty BreadcrumbItemTemplateProperty =
+ DependencyProperty.Register("BreadcrumbItemTemplate", typeof(DataTemplate), typeof(BreadcrumbBar), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.Inherits));
+
+ private static readonly DependencyPropertyKey OverflowModePropertyKey =
+ DependencyProperty.RegisterReadOnly("OverflowMode", typeof(BreadcrumbButton.ButtonMode), typeof(BreadcrumbBar),
+ new FrameworkPropertyMetadata(BreadcrumbButton.ButtonMode.Overflow,
+ FrameworkPropertyMetadataOptions.AffectsRender));
+
+ public static readonly DependencyProperty OverflowModeProperty = OverflowModePropertyKey.DependencyProperty;
+
+ public static readonly DependencyProperty IsDropDownOpenProperty =
+ DependencyProperty.Register("IsDropDownOpen", typeof(bool), typeof(BreadcrumbBar), new UIPropertyMetadata(false, IsDropDownOpenChanged));
+
+ public static readonly DependencyProperty SeparatorStringProperty =
+ DependencyProperty.Register("SeparatorString", typeof(string), typeof(BreadcrumbBar), new UIPropertyMetadata("\\"));
+
+ public static readonly DependencyProperty PathProperty =
+ DependencyProperty.Register("Path", typeof(string), typeof(BreadcrumbBar), new FrameworkPropertyMetadata("",FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, PathPropertyChanged));
+
+ public static readonly DependencyProperty DropDownItemsSourceProperty =
+ DependencyProperty.Register("DropDownItemsSource", typeof(IEnumerable), typeof(BreadcrumbBar), new UIPropertyMetadata(null, OnDropDownItemsSourcePropertyChanged));
+
+
+ public static readonly DependencyProperty SelectedDropDownIndexProperty =
+ DependencyProperty.Register("SelectedDropDownIndex", typeof(int), typeof(BreadcrumbBar), new UIPropertyMetadata(-1));
+
+ public static readonly DependencyProperty ProgressValueProperty =
+ DependencyProperty.Register("ProgressValue", typeof(double), typeof(BreadcrumbBar),
+ new UIPropertyMetadata((double)0.0, ProgressValuePropertyChanged, CoerceProgressValue));
+
+ public static readonly DependencyProperty ProgressMaximumProperty =
+ DependencyProperty.Register("ProgressMaximum", typeof(double), typeof(BreadcrumbBar), new UIPropertyMetadata(100.0, null, CoerceProgressMaximum));
+
+ public static readonly DependencyProperty ProgressMinimumProperty =
+ DependencyProperty.Register("ProgressMinimum", typeof(double), typeof(BreadcrumbBar), new UIPropertyMetadata(0.0, null, CoerceProgressMinimum));
+
+ #endregion
+
+ #region RoutedEvents
+
+ public static readonly RoutedEvent BreadcrumbItemDropDownOpenedEvent = EventManager.RegisterRoutedEvent("BreadcrumbItemDropDownOpened",
+ RoutingStrategy.Bubble, typeof(BreadcrumbItemEventHandler), typeof(BreadcrumbBar));
+
+ public static readonly RoutedEvent BreadcrumbItemDropDownClosedEvent = EventManager.RegisterRoutedEvent("BreadcrumbItemDropDownClosed",
+ RoutingStrategy.Bubble, typeof(BreadcrumbItemEventHandler), typeof(BreadcrumbBar));
+
+ public static readonly RoutedEvent ProgressValueChangedEvent = EventManager.RegisterRoutedEvent("ProgressValueChanged",
+ RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BreadcrumbBar));
+
+ public static readonly RoutedEvent ApplyPropertiesEvent = EventManager.RegisterRoutedEvent("ApplyProperties",
+ RoutingStrategy.Bubble, typeof(ApplyPropertiesEventHandler), typeof(BreadcrumbBar));
+
+
+ public static readonly RoutedEvent SelectedBreadcrumbChangedEvent = EventManager.RegisterRoutedEvent("SelectedBreadcrumbChanged",
+ RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(BreadcrumbBar));
+
+ public static readonly RoutedEvent PathChangedEvent = EventManager.RegisterRoutedEvent("PathChanged",
+ RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(BreadcrumbBar));
+
+ ///
+ /// Occurs before acessing the Items property of a BreadcrumbItem. This event can be used to populate the Items on demand.
+ ///
+ public static readonly RoutedEvent PopulateItemsEvent = EventManager.RegisterRoutedEvent("PopulateItems",
+ RoutingStrategy.Bubble, typeof(BreadcrumbItemEventHandler), typeof(BreadcrumbBar));
+
+ ///
+ /// Occurs when a path needs to be converted between display path and edit path.
+ ///
+ public static readonly RoutedEvent PathConversionEvent = EventManager.RegisterRoutedEvent("PathConversion",
+ RoutingStrategy.Bubble, typeof(PathConversionEventHandler), typeof(BreadcrumbBar));
+
+ #endregion
+
+ ///
+ /// This command shows the drop down part of the combobox.
+ ///
+ public static RoutedUICommand ShowDropDownCommand
+ {
+ get { return showDropDownCommand; }
+ }
+
+ private static RoutedUICommand showDropDownCommand = new RoutedUICommand("Show DropDown", "ShowDropDownCommand", typeof(BreadcrumbBar));
+
+ ///
+ /// This command selects the BreadcrumbItem that is specified as Parameter.
+ ///
+ public static RoutedUICommand SelectTraceCommand
+ {
+ get { return selectTraceCommand; }
+ }
+
+ ///
+ /// This command selects the root.
+ ///
+ public static RoutedUICommand SelectRootCommand
+ {
+ get { return selectRootCommand; }
+ }
+
+ private static RoutedUICommand selectRootCommand = new RoutedUICommand("Select", "SelectRootCommand", typeof(BreadcrumbBar));
+ private static RoutedUICommand selectTraceCommand = new RoutedUICommand("Select", "SelectTraceCommand", typeof(BreadcrumbBar));
+
+
+ static BreadcrumbBar()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(BreadcrumbBar), new FrameworkPropertyMetadata(typeof(BreadcrumbBar)));
+ BorderThicknessProperty.OverrideMetadata(typeof(BreadcrumbBar), new FrameworkPropertyMetadata(new Thickness(1)));
+ BorderBrushProperty.OverrideMetadata(typeof(BreadcrumbBar), new FrameworkPropertyMetadata(Brushes.Black));
+ Color c = new Color();
+ c.R = 245; c.G = 245; c.B = 245; c.A = 255;
+ BackgroundProperty.OverrideMetadata(typeof(BreadcrumbBar), new FrameworkPropertyMetadata(new SolidColorBrush(c)));
+
+ CommandManager.RegisterClassCommandBinding(typeof(FrameworkElement), new CommandBinding(selectRootCommand, SelectRootCommandExecuted));
+ CommandManager.RegisterClassCommandBinding(typeof(FrameworkElement), new CommandBinding(selectTraceCommand, SelectTraceCommandExecuted));
+ CommandManager.RegisterClassCommandBinding(typeof(FrameworkElement), new CommandBinding(showDropDownCommand, ShowDropDownExecuted));
+ }
+
+ // A helper class to store the DropDownItems since ItemCollection has no public creator:
+ private ItemsControl comboBoxControlItems;
+
+ ///
+ /// Creates a new BreadcrumbBar.
+ ///
+ public BreadcrumbBar()
+ : base()
+ {
+ comboBoxControlItems = new ItemsControl();
+ Binding b = new Binding("HasItems");
+ b.Source = comboBoxControlItems;
+ this.SetBinding(BreadcrumbBar.HasDropDownItemsProperty, b);
+
+ traces = new ObservableCollection