diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.xaml.cs index 0e396c6f..51dbd00d 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.xaml.cs @@ -1,27 +1,27 @@ -using FirstFloor.ModernUI.Presentation; -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace FirstFloor.ModernUI.App -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - /// - /// Raises the event. - /// - /// A that contains the event data. - protected override void OnStartup(StartupEventArgs e) - { - base.OnStartup(e); - } - } -} +using FirstFloor.ModernUI.Presentation; +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace FirstFloor.ModernUI.App +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/BingImage.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/BingImage.cs index 012fe02a..5c53d6f6 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/BingImage.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/BingImage.cs @@ -1,81 +1,81 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Xml.Linq; -using System.Xml.XPath; - -namespace FirstFloor.ModernUI.App -{ - /// - /// Provides an attached property determining the current Bing image and assigning it to an image or imagebrush. - /// - public static class BingImage - { - public static readonly DependencyProperty UseBingImageProperty = DependencyProperty.RegisterAttached("UseBingImage", typeof(bool), typeof(BingImage), new PropertyMetadata(OnUseBingImageChanged)); - - private static BitmapImage cachedBingImage; - - private static async void OnUseBingImageChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) - { - var newValue = (bool)e.NewValue; - var image = o as Image; - var imageBrush = o as ImageBrush; - - if (!newValue || (image == null && imageBrush == null)) { - return; - } - - if (cachedBingImage == null) { - var url = await GetCurrentBingImageUrl(); - if (url != null) { - cachedBingImage = new BitmapImage(url); - } - } - - if (cachedBingImage != null){ - if (image != null) { - image.Source = cachedBingImage; - } - else if (imageBrush != null) { - imageBrush.ImageSource = cachedBingImage; - } - } - } - - private static async Task GetCurrentBingImageUrl() - { - var client = new HttpClient(); - var result = await client.GetAsync("http://www.bing.com/hpimagearchive.aspx?format=xml&idx=0&n=2&mbl=1&mkt=en-ww"); - if (result.IsSuccessStatusCode) { - using (var stream = await result.Content.ReadAsStreamAsync()) { - var doc = XDocument.Load(stream); - - var url = (string)doc.XPathSelectElement("/images/image/url"); - - return new Uri(string.Format(CultureInfo.InvariantCulture, "http://bing.com{0}", url), UriKind.Absolute); - } - } - - return null; - } - - - public static bool GetUseBingImage(DependencyObject o) - { - return (bool)o.GetValue(UseBingImageProperty); - } - - public static void SetUseBingImage(DependencyObject o, bool value) - { - o.SetValue(UseBingImageProperty, value); - } - } -} +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Xml.Linq; +using System.Xml.XPath; + +namespace FirstFloor.ModernUI.App +{ + /// + /// Provides an attached property determining the current Bing image and assigning it to an image or imagebrush. + /// + public static class BingImage + { + public static readonly DependencyProperty UseBingImageProperty = DependencyProperty.RegisterAttached("UseBingImage", typeof(bool), typeof(BingImage), new PropertyMetadata(OnUseBingImageChanged)); + + private static BitmapImage cachedBingImage; + + private static async void OnUseBingImageChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) + { + var newValue = (bool)e.NewValue; + var image = o as Image; + var imageBrush = o as ImageBrush; + + if (!newValue || (image == null && imageBrush == null)) { + return; + } + + if (cachedBingImage == null) { + var url = await GetCurrentBingImageUrl(); + if (url != null) { + cachedBingImage = new BitmapImage(url); + } + } + + if (cachedBingImage != null){ + if (image != null) { + image.Source = cachedBingImage; + } + else if (imageBrush != null) { + imageBrush.ImageSource = cachedBingImage; + } + } + } + + private static async Task GetCurrentBingImageUrl() + { + var client = new HttpClient(); + var result = await client.GetAsync("http://www.bing.com/hpimagearchive.aspx?format=xml&idx=0&n=2&mbl=1&mkt=en-ww"); + if (result.IsSuccessStatusCode) { + using (var stream = await result.Content.ReadAsStreamAsync()) { + var doc = XDocument.Load(stream); + + var url = (string)doc.XPathSelectElement("/images/image/url"); + + return new Uri(string.Format(CultureInfo.InvariantCulture, "http://bing.com{0}", url), UriKind.Absolute); + } + } + + return null; + } + + + public static bool GetUseBingImage(DependencyObject o) + { + return (bool)o.GetValue(UseBingImageProperty); + } + + public static void SetUseBingImage(DependencyObject o, bool value) + { + o.SetValue(UseBingImageProperty, value); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderImages.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderImages.xaml.cs index f01aaa2b..24d86673 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderImages.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderImages.xaml.cs @@ -1,47 +1,47 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ContentLoaderImages.xaml - /// - public partial class ContentLoaderImages : UserControl - { - public ContentLoaderImages() - { - InitializeComponent(); - - LoadImageLinks(); - } - - private async void LoadImageLinks() - { - var loader = (FlickrImageLoader)Tab.ContentLoader; - - try { - // load image links and assign to tab list - this.Tab.Links = await loader.GetInterestingnessListAsync(); - - // select first link - this.Tab.SelectedSource = this.Tab.Links.Select(l => l.Source).FirstOrDefault(); - } - catch (Exception e) { - ModernDialog.ShowMessage(e.Message, "Failure", MessageBoxButton.OK); - } - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ContentLoaderImages.xaml + /// + public partial class ContentLoaderImages : UserControl + { + public ContentLoaderImages() + { + InitializeComponent(); + + LoadImageLinks(); + } + + private async void LoadImageLinks() + { + var loader = (FlickrImageLoader)Tab.ContentLoader; + + try { + // load image links and assign to tab list + this.Tab.Links = await loader.GetInterestingnessListAsync(); + + // select first link + this.Tab.SelectedSource = this.Tab.Links.Select(l => l.Source).FirstOrDefault(); + } + catch (Exception e) { + ModernDialog.ShowMessage(e.Message, "Failure", MessageBoxButton.OK); + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderIntro.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderIntro.xaml.cs index 6bde9564..fc7419d6 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderIntro.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderIntro.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ContentLoaderIntro.xaml - /// - public partial class ContentLoaderIntro : UserControl - { - public ContentLoaderIntro() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ContentLoaderIntro.xaml + /// + public partial class ContentLoaderIntro : UserControl + { + public ContentLoaderIntro() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernBBCodeBlock.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernBBCodeBlock.xaml.cs index e25f6e5b..c6399d5b 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernBBCodeBlock.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernBBCodeBlock.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsModernBBCodeBlock.xaml - /// - public partial class ControlsModernBBCodeBlock : UserControl - { - public ControlsModernBBCodeBlock() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsModernBBCodeBlock.xaml + /// + public partial class ControlsModernBBCodeBlock : UserControl + { + public ControlsModernBBCodeBlock() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernButton.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernButton.xaml.cs index cfba4874..e83fb747 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernButton.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernButton.xaml.cs @@ -1,56 +1,56 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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.Xml.Linq; - -namespace FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsModernButton.xaml - /// - public partial class ControlsModernButton : UserControl - { - public ControlsModernButton() - { - InitializeComponent(); - - // find all embedded XAML icon files - var assembly = GetType().Assembly; - var iconResourceNames = from name in assembly.GetManifestResourceNames() - where name.StartsWith("FirstFloor.ModernUI.App.Assets.appbar.") - select name; - - - foreach (var name in iconResourceNames) { - // load the resource stream - using (var stream = assembly.GetManifestResourceStream(name)) { - // parse the icon data using xml - var doc = XDocument.Load(stream); - - var path = doc.Root.Element("{http://schemas.microsoft.com/winfx/2006/xaml/presentation}Path"); - if (path != null) { - var data = (string)path.Attribute("Data"); - - // create a modern button and add it to the button panel - ButtonPanel.Children.Add(new ModernButton { - IconData = PathGeometry.Parse(data), - Margin = new Thickness(0, 0, 8, 0) - }); - } - } - } - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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.Xml.Linq; + +namespace FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsModernButton.xaml + /// + public partial class ControlsModernButton : UserControl + { + public ControlsModernButton() + { + InitializeComponent(); + + // find all embedded XAML icon files + var assembly = GetType().Assembly; + var iconResourceNames = from name in assembly.GetManifestResourceNames() + where name.StartsWith("FirstFloor.ModernUI.App.Assets.appbar.") + select name; + + + foreach (var name in iconResourceNames) { + // load the resource stream + using (var stream = assembly.GetManifestResourceStream(name)) { + // parse the icon data using xml + var doc = XDocument.Load(stream); + + var path = doc.Root.Element("{http://schemas.microsoft.com/winfx/2006/xaml/presentation}Path"); + if (path != null) { + var data = (string)path.Attribute("Data"); + + // create a modern button and add it to the button panel + ButtonPanel.Children.Add(new ModernButton { + IconData = PathGeometry.Parse(data), + Margin = new Thickness(0, 0, 8, 0) + }); + } + } + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernDialog.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernDialog.xaml.cs index a60e8abe..04d06a44 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernDialog.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernDialog.xaml.cs @@ -1,56 +1,56 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsModernDialog.xaml - /// - public partial class ControlsModernDialog : UserControl - { - public ControlsModernDialog() - { - InitializeComponent(); - } - - private void CommonDialog_Click(object sender, RoutedEventArgs e) - { - var dlg = new ModernDialog { - Title = "Common dialog", - Content = new LoremIpsum() - }; - dlg.Buttons = new Button[] { dlg.OkButton, dlg.CancelButton}; - dlg.ShowDialog(); - - this.dialogResult.Text = dlg.DialogResult.HasValue ? dlg.DialogResult.ToString() : ""; - this.dialogMessageBoxResult.Text = dlg.MessageBoxResult.ToString(); - } - - private void MessageDialog_Click(object sender, RoutedEventArgs e) - { - MessageBoxButton btn = MessageBoxButton.OK; - if (true == ok.IsChecked) btn = MessageBoxButton.OK; - else if (true == okcancel.IsChecked) btn = MessageBoxButton.OKCancel; - else if (true == yesno.IsChecked) btn = MessageBoxButton.YesNo; - else if (true == yesnocancel.IsChecked) btn = MessageBoxButton.YesNoCancel; - - var result = ModernDialog.ShowMessage("This is a simple Modern UI styled message dialog. Do you like it?", "Message Dialog", btn); - - this.msgboxResult.Text = result.ToString(); - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsModernDialog.xaml + /// + public partial class ControlsModernDialog : UserControl + { + public ControlsModernDialog() + { + InitializeComponent(); + } + + private void CommonDialog_Click(object sender, RoutedEventArgs e) + { + var dlg = new ModernDialog { + Title = "Common dialog", + Content = new LoremIpsum() + }; + dlg.Buttons = new Button[] { dlg.OkButton, dlg.CancelButton}; + dlg.ShowDialog(); + + this.dialogResult.Text = dlg.DialogResult.HasValue ? dlg.DialogResult.ToString() : ""; + this.dialogMessageBoxResult.Text = dlg.MessageBoxResult.ToString(); + } + + private void MessageDialog_Click(object sender, RoutedEventArgs e) + { + MessageBoxButton btn = MessageBoxButton.OK; + if (true == ok.IsChecked) btn = MessageBoxButton.OK; + else if (true == okcancel.IsChecked) btn = MessageBoxButton.OKCancel; + else if (true == yesno.IsChecked) btn = MessageBoxButton.YesNo; + else if (true == yesnocancel.IsChecked) btn = MessageBoxButton.YesNoCancel; + + var result = ModernDialog.ShowMessage("This is a simple Modern UI styled message dialog. Do you like it?", "Message Dialog", btn); + + this.msgboxResult.Text = result.ToString(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernFrame.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernFrame.xaml.cs index a59d4b44..8ab0494f 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernFrame.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernFrame.xaml.cs @@ -1,65 +1,65 @@ -using FirstFloor.ModernUI.Windows.Navigation; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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; - -namespace FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsModernFrame.xaml - /// - public partial class ControlsModernFrame : UserControl - { - private string eventLogMessage; - - public ControlsModernFrame() - { - InitializeComponent(); - - this.TextEvents.Text = eventLogMessage; - } - - private void LogMessage(string message, params object[] o) - { - message = string.Format(CultureInfo.CurrentUICulture, message, o); - - if (this.TextEvents == null) { - this.eventLogMessage += message; - } - else { - this.TextEvents.AppendText(message); - } - } - - private void Frame_FragmentNavigation(object sender, FragmentNavigationEventArgs e) - { - LogMessage("FragmentNavigation: {0}\r\n", e.Fragment); - } - - private void Frame_Navigated(object sender, NavigationEventArgs e) - { - LogMessage("Navigated: [{0}] {1}\r\n", e.NavigationType, e.Source); - } - - private void Frame_Navigating(object sender, NavigatingCancelEventArgs e) - { - LogMessage("Navigating: [{0}] {1}\r\n", e.NavigationType, e.Source); - } - - private void Frame_NavigationFailed(object sender, NavigationFailedEventArgs e) - { - LogMessage("NavigationFailed: {0}\r\n", e.Error.Message); - } - } -} +using FirstFloor.ModernUI.Windows.Navigation; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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; + +namespace FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsModernFrame.xaml + /// + public partial class ControlsModernFrame : UserControl + { + private string eventLogMessage; + + public ControlsModernFrame() + { + InitializeComponent(); + + this.TextEvents.Text = eventLogMessage; + } + + private void LogMessage(string message, params object[] o) + { + message = string.Format(CultureInfo.CurrentUICulture, message, o); + + if (this.TextEvents == null) { + this.eventLogMessage += message; + } + else { + this.TextEvents.AppendText(message); + } + } + + private void Frame_FragmentNavigation(object sender, FragmentNavigationEventArgs e) + { + LogMessage("FragmentNavigation: {0}\r\n", e.Fragment); + } + + private void Frame_Navigated(object sender, NavigationEventArgs e) + { + LogMessage("Navigated: [{0}] {1}\r\n", e.NavigationType, e.Source); + } + + private void Frame_Navigating(object sender, NavigatingCancelEventArgs e) + { + LogMessage("Navigating: [{0}] {1}\r\n", e.NavigationType, e.Source); + } + + private void Frame_NavigationFailed(object sender, NavigationFailedEventArgs e) + { + LogMessage("NavigationFailed: {0}\r\n", e.Error.Message); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernMenu.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernMenu.xaml.cs index 5b170fe2..5cf423cb 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernMenu.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernMenu.xaml.cs @@ -1,65 +1,65 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsModernMenu.xaml - /// - public partial class ControlsModernMenu : UserControl - { - private int groupId = 2; - private int linkId = 5; - - public ControlsModernMenu() - { - InitializeComponent(); - - // add group command - this.AddGroup.Command = new RelayCommand(o => { - this.Menu.LinkGroups.Add(new LinkGroup { - DisplayName = string.Format(CultureInfo.InvariantCulture, "group {0}", - ++groupId) - }); - }); - - // add link to selected group command - this.AddLink.Command = new RelayCommand(o => { - this.Menu.SelectedLinkGroup.Links.Add(new Link { - DisplayName = string.Format(CultureInfo.InvariantCulture, "link {0}", ++linkId), - Source = new Uri(string.Format(CultureInfo.InvariantCulture, "/link{0}", linkId), UriKind.Relative) - }); - }, o => this.Menu.SelectedLinkGroup != null); - - // remove selected group command - this.RemoveGroup.Command = new RelayCommand(o => { - this.Menu.LinkGroups.Remove(this.Menu.SelectedLinkGroup); - }, o => this.Menu.SelectedLinkGroup != null); - - // remove selected linkcommand - this.RemoveLink.Command = new RelayCommand(o => { - this.Menu.SelectedLinkGroup.Links.Remove(this.Menu.SelectedLink); - }, o => this.Menu.SelectedLinkGroup != null && this.Menu.SelectedLink != null); - - // log SourceChanged events - this.Menu.SelectedSourceChanged += (o, e) => { - Debug.WriteLine("SelectedSourceChanged: {0}", e.Source); - }; - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsModernMenu.xaml + /// + public partial class ControlsModernMenu : UserControl + { + private int groupId = 2; + private int linkId = 5; + + public ControlsModernMenu() + { + InitializeComponent(); + + // add group command + this.AddGroup.Command = new RelayCommand(o => { + this.Menu.LinkGroups.Add(new LinkGroup { + DisplayName = string.Format(CultureInfo.InvariantCulture, "group {0}", + ++groupId) + }); + }); + + // add link to selected group command + this.AddLink.Command = new RelayCommand(o => { + this.Menu.SelectedLinkGroup.Links.Add(new Link { + DisplayName = string.Format(CultureInfo.InvariantCulture, "link {0}", ++linkId), + Source = new Uri(string.Format(CultureInfo.InvariantCulture, "/link{0}", linkId), UriKind.Relative) + }); + }, o => this.Menu.SelectedLinkGroup != null); + + // remove selected group command + this.RemoveGroup.Command = new RelayCommand(o => { + this.Menu.LinkGroups.Remove(this.Menu.SelectedLinkGroup); + }, o => this.Menu.SelectedLinkGroup != null); + + // remove selected linkcommand + this.RemoveLink.Command = new RelayCommand(o => { + this.Menu.SelectedLinkGroup.Links.Remove(this.Menu.SelectedLink); + }, o => this.Menu.SelectedLinkGroup != null && this.Menu.SelectedLink != null); + + // log SourceChanged events + this.Menu.SelectedSourceChanged += (o, e) => { + Debug.WriteLine("SelectedSourceChanged: {0}", e.Source); + }; + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernProgressRing.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernProgressRing.xaml.cs index 6579ff72..d4d5a8f8 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernProgressRing.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernProgressRing.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsModernProgressRing.xaml - /// - public partial class ControlsModernProgressRing : UserControl - { - public ControlsModernProgressRing() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsModernProgressRing.xaml + /// + public partial class ControlsModernProgressRing : UserControl + { + public ControlsModernProgressRing() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesButton.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesButton.xaml.cs index a371e141..2595cf3c 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesButton.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesButton.xaml.cs @@ -1,33 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesButton.xaml - /// - public partial class ControlsStylesButton : UserControl - { - public ControlsStylesButton() - { - InitializeComponent(); - } - - private void CheckBox_Indeterminate(object sender, RoutedEventArgs e) - { - - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesButton.xaml + /// + public partial class ControlsStylesButton : UserControl + { + public ControlsStylesButton() + { + InitializeComponent(); + } + + private void CheckBox_Indeterminate(object sender, RoutedEventArgs e) + { + + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDataGrid.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDataGrid.xaml.cs index 7597aa4e..53ad35e5 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDataGrid.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDataGrid.xaml.cs @@ -1,63 +1,63 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - // taken from MSDN (http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.aspx) - public enum OrderStatus { None, New, Processing, Shipped, Received }; - public class Customer - { - public string FirstName { get; set; } - public string LastName { get; set; } - public string Email { get; set; } - public bool IsMember { get; set; } - public OrderStatus Status { get; set; } - } - - - /// - /// Interaction logic for ControlsStylesDataGrid.xaml - /// - public partial class ControlsStylesDataGrid : UserControl - { - public ControlsStylesDataGrid() - { - InitializeComponent(); - - ObservableCollection custdata = GetData(); - - //Bind the DataGrid to the customer data - DG1.DataContext = custdata; - } - - private ObservableCollection GetData() - { - var customers = new ObservableCollection(); - customers.Add(new Customer { FirstName = "Orlando", LastName = "Gee", Email = "orlando0@adventure-works.com", IsMember = true, Status = OrderStatus.New }); - customers.Add(new Customer { FirstName = "Keith", LastName = "Harris", Email = "keith0@adventure-works.com", IsMember = true, Status = OrderStatus.Received }); - customers.Add(new Customer { FirstName = "Donna", LastName = "Carreras", Email = "donna0@adventure-works.com", IsMember = false, Status = OrderStatus.None }); - customers.Add(new Customer { FirstName = "Janet", LastName = "Gates", Email = "janet0@adventure-works.com", IsMember = true, Status = OrderStatus.Shipped }); - customers.Add(new Customer { FirstName = "Lucy", LastName = "Harrington", Email = "lucy0@adventure-works.com", IsMember = false, Status = OrderStatus.New }); - customers.Add(new Customer { FirstName = "Rosmarie", LastName = "Carroll", Email = "rosmarie0@adventure-works.com", IsMember = true, Status = OrderStatus.Processing }); - customers.Add(new Customer { FirstName = "Dominic", LastName = "Gash", Email = "dominic0@adventure-works.com", IsMember = true, Status = OrderStatus.Received }); - customers.Add(new Customer { FirstName = "Kathleen", LastName = "Garza", Email = "kathleen0@adventure-works.com", IsMember = false, Status = OrderStatus.None }); - customers.Add(new Customer { FirstName = "Katherine", LastName = "Harding", Email = "katherine0@adventure-works.com", IsMember = true, Status = OrderStatus.Shipped }); - customers.Add(new Customer { FirstName = "Johnny", LastName = "Caprio", Email = "johnny0@adventure-works.com", IsMember = false, Status = OrderStatus.Processing }); - - return customers; - } - } -} +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + // taken from MSDN (http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.aspx) + public enum OrderStatus { None, New, Processing, Shipped, Received }; + public class Customer + { + public string FirstName { get; set; } + public string LastName { get; set; } + public string Email { get; set; } + public bool IsMember { get; set; } + public OrderStatus Status { get; set; } + } + + + /// + /// Interaction logic for ControlsStylesDataGrid.xaml + /// + public partial class ControlsStylesDataGrid : UserControl + { + public ControlsStylesDataGrid() + { + InitializeComponent(); + + ObservableCollection custdata = GetData(); + + //Bind the DataGrid to the customer data + DG1.DataContext = custdata; + } + + private ObservableCollection GetData() + { + var customers = new ObservableCollection(); + customers.Add(new Customer { FirstName = "Orlando", LastName = "Gee", Email = "orlando0@adventure-works.com", IsMember = true, Status = OrderStatus.New }); + customers.Add(new Customer { FirstName = "Keith", LastName = "Harris", Email = "keith0@adventure-works.com", IsMember = true, Status = OrderStatus.Received }); + customers.Add(new Customer { FirstName = "Donna", LastName = "Carreras", Email = "donna0@adventure-works.com", IsMember = false, Status = OrderStatus.None }); + customers.Add(new Customer { FirstName = "Janet", LastName = "Gates", Email = "janet0@adventure-works.com", IsMember = true, Status = OrderStatus.Shipped }); + customers.Add(new Customer { FirstName = "Lucy", LastName = "Harrington", Email = "lucy0@adventure-works.com", IsMember = false, Status = OrderStatus.New }); + customers.Add(new Customer { FirstName = "Rosmarie", LastName = "Carroll", Email = "rosmarie0@adventure-works.com", IsMember = true, Status = OrderStatus.Processing }); + customers.Add(new Customer { FirstName = "Dominic", LastName = "Gash", Email = "dominic0@adventure-works.com", IsMember = true, Status = OrderStatus.Received }); + customers.Add(new Customer { FirstName = "Kathleen", LastName = "Garza", Email = "kathleen0@adventure-works.com", IsMember = false, Status = OrderStatus.None }); + customers.Add(new Customer { FirstName = "Katherine", LastName = "Harding", Email = "katherine0@adventure-works.com", IsMember = true, Status = OrderStatus.Shipped }); + customers.Add(new Customer { FirstName = "Johnny", LastName = "Caprio", Email = "johnny0@adventure-works.com", IsMember = false, Status = OrderStatus.Processing }); + + return customers; + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDate.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDate.xaml.cs index 3a3b4e25..7ff3d00b 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDate.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesDate.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesDate.xaml - /// - public partial class ControlsStylesDate : UserControl - { - public ControlsStylesDate() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesDate.xaml + /// + public partial class ControlsStylesDate : UserControl + { + public ControlsStylesDate() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesItemsControl.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesItemsControl.xaml.cs index 15000bdd..a5064dd0 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesItemsControl.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesItemsControl.xaml.cs @@ -1,57 +1,57 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesItemsControl.xaml - /// - public partial class ControlsStylesItemsControl : UserControl - { - public ControlsStylesItemsControl() - { - InitializeComponent(); - } - - private MenuItem CreateSubMenu(string header) - { - var item = new MenuItem { Header = header }; - item.Items.Add(new MenuItem { Header = "Item 1" }); - item.Items.Add("Item 2"); - item.Items.Add(new Separator()); - item.Items.Add("Item 3"); - return item; - } - - private void ShowContextMenu_Click(object sender, RoutedEventArgs e) - { - var contextMenu = new ContextMenu(); - - contextMenu.Items.Add(new MenuItem { Header = "Item" }); - contextMenu.Items.Add(new MenuItem { Header = "Item with gesture", InputGestureText="Ctrl+C" }); - contextMenu.Items.Add(new MenuItem { Header = "Item, disabled", IsEnabled = false }); - contextMenu.Items.Add(new MenuItem { Header = "Item, checked", IsChecked = true }); - contextMenu.Items.Add(new MenuItem { Header = "Item, checked and disabled", IsChecked = true, IsEnabled = false }); - contextMenu.Items.Add(new Separator()); - contextMenu.Items.Add(CreateSubMenu("Item with submenu")); - - var menu = CreateSubMenu("Item with submenu, disabled"); - menu.IsEnabled = false; - contextMenu.Items.Add(menu); - - contextMenu.IsOpen = true; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesItemsControl.xaml + /// + public partial class ControlsStylesItemsControl : UserControl + { + public ControlsStylesItemsControl() + { + InitializeComponent(); + } + + private MenuItem CreateSubMenu(string header) + { + var item = new MenuItem { Header = header }; + item.Items.Add(new MenuItem { Header = "Item 1" }); + item.Items.Add("Item 2"); + item.Items.Add(new Separator()); + item.Items.Add("Item 3"); + return item; + } + + private void ShowContextMenu_Click(object sender, RoutedEventArgs e) + { + var contextMenu = new ContextMenu(); + + contextMenu.Items.Add(new MenuItem { Header = "Item" }); + contextMenu.Items.Add(new MenuItem { Header = "Item with gesture", InputGestureText="Ctrl+C" }); + contextMenu.Items.Add(new MenuItem { Header = "Item, disabled", IsEnabled = false }); + contextMenu.Items.Add(new MenuItem { Header = "Item, checked", IsChecked = true }); + contextMenu.Items.Add(new MenuItem { Header = "Item, checked and disabled", IsChecked = true, IsEnabled = false }); + contextMenu.Items.Add(new Separator()); + contextMenu.Items.Add(CreateSubMenu("Item with submenu")); + + var menu = CreateSubMenu("Item with submenu, disabled"); + menu.IsEnabled = false; + contextMenu.Items.Add(menu); + + contextMenu.IsOpen = true; + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesProgressBar.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesProgressBar.xaml.cs index 6bb4066a..3a28947e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesProgressBar.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesProgressBar.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesProgressBar.xaml - /// - public partial class ControlsStylesProgressBar : UserControl - { - public ControlsStylesProgressBar() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesProgressBar.xaml + /// + public partial class ControlsStylesProgressBar : UserControl + { + public ControlsStylesProgressBar() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSampleForm.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSampleForm.xaml.cs index 19e9c8de..dcbcca73 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSampleForm.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSampleForm.xaml.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesSampleForm.xaml - /// - public partial class ControlsStylesSampleForm : UserControl - { - public ControlsStylesSampleForm() - { - InitializeComponent(); - - this.Loaded += OnLoaded; - } - - void OnLoaded(object sender, RoutedEventArgs e) - { - // select first control on the form - Keyboard.Focus(this.TextFirstName); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesSampleForm.xaml + /// + public partial class ControlsStylesSampleForm : UserControl + { + public ControlsStylesSampleForm() + { + InitializeComponent(); + + this.Loaded += OnLoaded; + } + + void OnLoaded(object sender, RoutedEventArgs e) + { + // select first control on the form + Keyboard.Focus(this.TextFirstName); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSlider.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSlider.xaml.cs index 0d28bcc0..534d7f37 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSlider.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesSlider.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesSlider.xaml - /// - public partial class ControlsStylesSlider : UserControl - { - public ControlsStylesSlider() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesSlider.xaml + /// + public partial class ControlsStylesSlider : UserControl + { + public ControlsStylesSlider() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesText.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesText.xaml.cs index 4896040b..63446d39 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesText.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsStylesText.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for ControlsStylesText.xaml - /// - public partial class ControlsStylesText : UserControl - { - public ControlsStylesText() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for ControlsStylesText.xaml + /// + public partial class ControlsStylesText : UserControl + { + public ControlsStylesText() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsum.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsum.xaml.cs index 71b2b238..07ddc4ba 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsum.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsum.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for LoremIpsum.xaml - /// - public partial class LoremIpsum : UserControl - { - public LoremIpsum() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for LoremIpsum.xaml + /// + public partial class LoremIpsum : UserControl + { + public LoremIpsum() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumList.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumList.xaml.cs index af00d517..4535426c 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumList.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumList.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for LoremIpsumList.xaml - /// - public partial class LoremIpsumList : UserControl - { - public LoremIpsumList() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for LoremIpsumList.xaml + /// + public partial class LoremIpsumList : UserControl + { + public LoremIpsumList() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumSplit.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumSplit.xaml.cs index 06c74591..27911ff6 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumSplit.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/LoremIpsumSplit.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for LoremIpsumSplit.xaml - /// - public partial class LoremIpsumSplit : UserControl - { - public LoremIpsumSplit() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for LoremIpsumSplit.xaml + /// + public partial class LoremIpsumSplit : UserControl + { + public LoremIpsumSplit() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/CancelNavigateSample.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/CancelNavigateSample.xaml.cs index a971adc7..233ca192 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/CancelNavigateSample.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/CancelNavigateSample.xaml.cs @@ -1,66 +1,66 @@ -using FirstFloor.ModernUI.Windows; -using FirstFloor.ModernUI.Windows.Controls; -using FirstFloor.ModernUI.Windows.Navigation; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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; - -namespace FirstFloor.ModernUI.App.Content.ModernFrame -{ - /// - /// Interaction logic for CancelNavigateSample.xaml - /// - public partial class CancelNavigateSample : UserControl, IContent - { - public CancelNavigateSample() - { - InitializeComponent(); - } - - public void OnFragmentNavigation(FragmentNavigationEventArgs e) - { - // display the current navigated fragment - fragmentNav.BBCode = string.Format(CultureInfo.CurrentUICulture, "Current navigation fragment: '[b]{0}[/b]'", e.Fragment); - } - - public void OnNavigatedFrom(NavigationEventArgs e) - { - } - - public void OnNavigatedTo(NavigationEventArgs e) - { - // clear fragment text - fragmentNav.BBCode = null; - } - - public void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - // ask user if navigating away is ok - string frameDescription; - if (e.IsParentFrameNavigating){ - frameDescription = "A parent frame"; - } - else { - frameDescription = "This frame"; - } - - // modern message dialog supports BBCode tags - var question = string.Format(CultureInfo.CurrentUICulture, "[b]{0}[/b] is about to navigate to new content. Do you want to allow this?", frameDescription); - - if (MessageBoxResult.No == ModernDialog.ShowMessage(question, "navigate", System.Windows.MessageBoxButton.YesNo)) { - e.Cancel = true; - } - } - } -} +using FirstFloor.ModernUI.Windows; +using FirstFloor.ModernUI.Windows.Controls; +using FirstFloor.ModernUI.Windows.Navigation; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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; + +namespace FirstFloor.ModernUI.App.Content.ModernFrame +{ + /// + /// Interaction logic for CancelNavigateSample.xaml + /// + public partial class CancelNavigateSample : UserControl, IContent + { + public CancelNavigateSample() + { + InitializeComponent(); + } + + public void OnFragmentNavigation(FragmentNavigationEventArgs e) + { + // display the current navigated fragment + fragmentNav.BBCode = string.Format(CultureInfo.CurrentUICulture, "Current navigation fragment: '[b]{0}[/b]'", e.Fragment); + } + + public void OnNavigatedFrom(NavigationEventArgs e) + { + } + + public void OnNavigatedTo(NavigationEventArgs e) + { + // clear fragment text + fragmentNav.BBCode = null; + } + + public void OnNavigatingFrom(NavigatingCancelEventArgs e) + { + // ask user if navigating away is ok + string frameDescription; + if (e.IsParentFrameNavigating){ + frameDescription = "A parent frame"; + } + else { + frameDescription = "This frame"; + } + + // modern message dialog supports BBCode tags + var question = string.Format(CultureInfo.CurrentUICulture, "[b]{0}[/b] is about to navigate to new content. Do you want to allow this?", frameDescription); + + if (MessageBoxResult.No == ModernDialog.ShowMessage(question, "navigate", System.Windows.MessageBoxButton.YesNo)) { + e.Cancel = true; + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/ErrorSample.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/ErrorSample.xaml.cs index 0c0b64c0..63816742 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/ErrorSample.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/ErrorSample.xaml.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content.ModernFrame -{ - /// - /// Interaction logic for ErrorSample.xaml - /// - public partial class ErrorSample : UserControl - { - public ErrorSample() - { - InitializeComponent(); - - // raise exception to create navigation failure - throw new NotSupportedException(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content.ModernFrame +{ + /// + /// Interaction logic for ErrorSample.xaml + /// + public partial class ErrorSample : UserControl + { + public ErrorSample() + { + InitializeComponent(); + + // raise exception to create navigation failure + throw new NotSupportedException(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/Sample.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/Sample.xaml.cs index a6469208..7332c99e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/Sample.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ModernFrame/Sample.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content.ModernFrame -{ - /// - /// Interaction logic for Sample.xaml - /// - public partial class Sample : UserControl - { - public Sample() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content.ModernFrame +{ + /// + /// Interaction logic for Sample.xaml + /// + public partial class Sample : UserControl + { + public Sample() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearance.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearance.xaml.cs index 30b6da34..4a3ce754 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearance.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearance.xaml.cs @@ -1,32 +1,32 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Content -{ - /// - /// Interaction logic for SettingsAppearance.xaml - /// - public partial class SettingsAppearance : UserControl - { - public SettingsAppearance() - { - InitializeComponent(); - - // a simple view model for appearance configuration - this.DataContext = new SettingsAppearanceViewModel(); - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Content +{ + /// + /// Interaction logic for SettingsAppearance.xaml + /// + public partial class SettingsAppearance : UserControl + { + public SettingsAppearance() + { + InitializeComponent(); + + // a simple view model for appearance configuration + this.DataContext = new SettingsAppearanceViewModel(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearanceViewModel.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearanceViewModel.cs index 2f63efa2..d2e4fd62 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearanceViewModel.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/SettingsAppearanceViewModel.cs @@ -1,179 +1,179 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace FirstFloor.ModernUI.App.Content -{ - /// - /// A simple view model for configuring theme, font and accent colors. - /// - public class SettingsAppearanceViewModel - : NotifyPropertyChanged - { - private const string FontSmall = "small"; - private const string FontLarge = "large"; - - private const string PaletteMetro = "metro"; - private const string PaletteWP = "windows phone"; - - // 9 accent colors from metro design principles - private Color[] metroAccentColors = new Color[]{ - Color.FromRgb(0x33, 0x99, 0xff), // blue - Color.FromRgb(0x00, 0xab, 0xa9), // teal - Color.FromRgb(0x33, 0x99, 0x33), // green - Color.FromRgb(0x8c, 0xbf, 0x26), // lime - Color.FromRgb(0xf0, 0x96, 0x09), // orange - Color.FromRgb(0xff, 0x45, 0x00), // orange red - Color.FromRgb(0xe5, 0x14, 0x00), // red - Color.FromRgb(0xff, 0x00, 0x97), // magenta - Color.FromRgb(0xa2, 0x00, 0xff), // purple - }; - - // 20 accent colors from Windows Phone 8 - private Color[] wpAccentColors = new Color[]{ - Color.FromRgb(0xa4, 0xc4, 0x00), // lime - Color.FromRgb(0x60, 0xa9, 0x17), // green - Color.FromRgb(0x00, 0x8a, 0x00), // emerald - Color.FromRgb(0x00, 0xab, 0xa9), // teal - Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan - Color.FromRgb(0x00, 0x50, 0xef), // cobalt - Color.FromRgb(0x6a, 0x00, 0xff), // indigo - Color.FromRgb(0xaa, 0x00, 0xff), // violet - Color.FromRgb(0xf4, 0x72, 0xd0), // pink - Color.FromRgb(0xd8, 0x00, 0x73), // magenta - Color.FromRgb(0xa2, 0x00, 0x25), // crimson - Color.FromRgb(0xe5, 0x14, 0x00), // red - Color.FromRgb(0xfa, 0x68, 0x00), // orange - Color.FromRgb(0xf0, 0xa3, 0x0a), // amber - Color.FromRgb(0xe3, 0xc8, 0x00), // yellow - Color.FromRgb(0x82, 0x5a, 0x2c), // brown - Color.FromRgb(0x6d, 0x87, 0x64), // olive - Color.FromRgb(0x64, 0x76, 0x87), // steel - Color.FromRgb(0x76, 0x60, 0x8a), // mauve - Color.FromRgb(0x87, 0x79, 0x4e), // taupe - }; - - private string selectedPalette = PaletteWP; - - private Color selectedAccentColor; - private LinkCollection themes = new LinkCollection(); - private Link selectedTheme; - private string selectedFontSize; - - public SettingsAppearanceViewModel() - { - // add the default themes - this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); - this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); - - // add additional themes - this.themes.Add(new Link { DisplayName = "bing image", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.BingImage.xaml", UriKind.Relative) }); - this.themes.Add(new Link { DisplayName = "hello kitty", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.HelloKitty.xaml", UriKind.Relative) }); - this.themes.Add(new Link { DisplayName = "love", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.Love.xaml", UriKind.Relative) }); - this.themes.Add(new Link { DisplayName = "snowflakes", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.Snowflakes.xaml", UriKind.Relative) }); - - this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; - SyncThemeAndColor(); - - AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; - } - - private void SyncThemeAndColor() - { - // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. - this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); - - // and make sure accent color is up-to-date - this.SelectedAccentColor = AppearanceManager.Current.AccentColor; - } - - private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) - { - if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") { - SyncThemeAndColor(); - } - } - - public LinkCollection Themes - { - get { return this.themes; } - } - - public string[] FontSizes - { - get { return new string[] { FontSmall, FontLarge }; } - } - - public string[] Palettes - { - get { return new string[] { PaletteMetro, PaletteWP }; } - } - - public Color[] AccentColors - { - get { return this.selectedPalette == PaletteMetro ? this.metroAccentColors : this.wpAccentColors; } - } - - public string SelectedPalette - { - get { return this.selectedPalette; } - set - { - if (this.selectedPalette != value) { - this.selectedPalette = value; - OnPropertyChanged("AccentColors"); - - this.SelectedAccentColor = this.AccentColors.FirstOrDefault(); - } - } - } - - public Link SelectedTheme - { - get { return this.selectedTheme; } - set - { - if (this.selectedTheme != value) { - this.selectedTheme = value; - OnPropertyChanged("SelectedTheme"); - - // and update the actual theme - AppearanceManager.Current.ThemeSource = value.Source; - } - } - } - - public string SelectedFontSize - { - get { return this.selectedFontSize; } - set - { - if (this.selectedFontSize != value) { - this.selectedFontSize = value; - OnPropertyChanged("SelectedFontSize"); - - AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; - } - } - } - - public Color SelectedAccentColor - { - get { return this.selectedAccentColor; } - set - { - if (this.selectedAccentColor != value) { - this.selectedAccentColor = value; - OnPropertyChanged("SelectedAccentColor"); - - AppearanceManager.Current.AccentColor = value; - } - } - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace FirstFloor.ModernUI.App.Content +{ + /// + /// A simple view model for configuring theme, font and accent colors. + /// + public class SettingsAppearanceViewModel + : NotifyPropertyChanged + { + private const string FontSmall = "small"; + private const string FontLarge = "large"; + + private const string PaletteMetro = "metro"; + private const string PaletteWP = "windows phone"; + + // 9 accent colors from metro design principles + private Color[] metroAccentColors = new Color[]{ + Color.FromRgb(0x33, 0x99, 0xff), // blue + Color.FromRgb(0x00, 0xab, 0xa9), // teal + Color.FromRgb(0x33, 0x99, 0x33), // green + Color.FromRgb(0x8c, 0xbf, 0x26), // lime + Color.FromRgb(0xf0, 0x96, 0x09), // orange + Color.FromRgb(0xff, 0x45, 0x00), // orange red + Color.FromRgb(0xe5, 0x14, 0x00), // red + Color.FromRgb(0xff, 0x00, 0x97), // magenta + Color.FromRgb(0xa2, 0x00, 0xff), // purple + }; + + // 20 accent colors from Windows Phone 8 + private Color[] wpAccentColors = new Color[]{ + Color.FromRgb(0xa4, 0xc4, 0x00), // lime + Color.FromRgb(0x60, 0xa9, 0x17), // green + Color.FromRgb(0x00, 0x8a, 0x00), // emerald + Color.FromRgb(0x00, 0xab, 0xa9), // teal + Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan + Color.FromRgb(0x00, 0x50, 0xef), // cobalt + Color.FromRgb(0x6a, 0x00, 0xff), // indigo + Color.FromRgb(0xaa, 0x00, 0xff), // violet + Color.FromRgb(0xf4, 0x72, 0xd0), // pink + Color.FromRgb(0xd8, 0x00, 0x73), // magenta + Color.FromRgb(0xa2, 0x00, 0x25), // crimson + Color.FromRgb(0xe5, 0x14, 0x00), // red + Color.FromRgb(0xfa, 0x68, 0x00), // orange + Color.FromRgb(0xf0, 0xa3, 0x0a), // amber + Color.FromRgb(0xe3, 0xc8, 0x00), // yellow + Color.FromRgb(0x82, 0x5a, 0x2c), // brown + Color.FromRgb(0x6d, 0x87, 0x64), // olive + Color.FromRgb(0x64, 0x76, 0x87), // steel + Color.FromRgb(0x76, 0x60, 0x8a), // mauve + Color.FromRgb(0x87, 0x79, 0x4e), // taupe + }; + + private string selectedPalette = PaletteWP; + + private Color selectedAccentColor; + private LinkCollection themes = new LinkCollection(); + private Link selectedTheme; + private string selectedFontSize; + + public SettingsAppearanceViewModel() + { + // add the default themes + this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); + this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); + + // add additional themes + this.themes.Add(new Link { DisplayName = "bing image", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.BingImage.xaml", UriKind.Relative) }); + this.themes.Add(new Link { DisplayName = "hello kitty", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.HelloKitty.xaml", UriKind.Relative) }); + this.themes.Add(new Link { DisplayName = "love", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.Love.xaml", UriKind.Relative) }); + this.themes.Add(new Link { DisplayName = "snowflakes", Source = new Uri("/ModernUIDemo;component/Assets/ModernUI.Snowflakes.xaml", UriKind.Relative) }); + + this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; + SyncThemeAndColor(); + + AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; + } + + private void SyncThemeAndColor() + { + // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. + this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); + + // and make sure accent color is up-to-date + this.SelectedAccentColor = AppearanceManager.Current.AccentColor; + } + + private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") { + SyncThemeAndColor(); + } + } + + public LinkCollection Themes + { + get { return this.themes; } + } + + public string[] FontSizes + { + get { return new string[] { FontSmall, FontLarge }; } + } + + public string[] Palettes + { + get { return new string[] { PaletteMetro, PaletteWP }; } + } + + public Color[] AccentColors + { + get { return this.selectedPalette == PaletteMetro ? this.metroAccentColors : this.wpAccentColors; } + } + + public string SelectedPalette + { + get { return this.selectedPalette; } + set + { + if (this.selectedPalette != value) { + this.selectedPalette = value; + OnPropertyChanged("AccentColors"); + + this.SelectedAccentColor = this.AccentColors.FirstOrDefault(); + } + } + } + + public Link SelectedTheme + { + get { return this.selectedTheme; } + set + { + if (this.selectedTheme != value) { + this.selectedTheme = value; + OnPropertyChanged("SelectedTheme"); + + // and update the actual theme + AppearanceManager.Current.ThemeSource = value.Source; + } + } + } + + public string SelectedFontSize + { + get { return this.selectedFontSize; } + set + { + if (this.selectedFontSize != value) { + this.selectedFontSize = value; + OnPropertyChanged("SelectedFontSize"); + + AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; + } + } + } + + public Color SelectedAccentColor + { + get { return this.selectedAccentColor; } + set + { + if (this.selectedAccentColor != value) { + this.selectedAccentColor = value; + OnPropertyChanged("SelectedAccentColor"); + + AppearanceManager.Current.AccentColor = value; + } + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/FlickrImageLoader.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/FlickrImageLoader.cs index be49b80c..743d4c46 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/FlickrImageLoader.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/FlickrImageLoader.cs @@ -1,80 +1,80 @@ -using FirstFloor.ModernUI.Presentation; -using FirstFloor.ModernUI.Windows; -using System; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media.Imaging; -using System.Xml.Linq; - -namespace FirstFloor.ModernUI.App -{ - /// - /// Loads image content from Flickr. - /// - public class FlickrImageLoader - : IContentLoader - { - private const string apiKey = null; // your flickr API key here - - /// - /// Gets a collection of image links from the Flickr interestingness list. - /// - /// - public async Task GetInterestingnessListAsync() - { - if (apiKey == null) { - throw new InvalidOperationException("You need to specify a Flickr API key. Unfortunately the key cannot be distributed with the source code. Get your own from [url=http://www.flickr.com/services/api/misc.api_keys.html]http://www.flickr.com/services/api/misc.api_keys.html[/url]."); - } - - const int count = 50; // limit the number of images to 50 - var listUri = string.Format(CultureInfo.InvariantCulture, "https://api.flickr.com/services/rest/?method=flickr.interestingness.getList&api_key={0}&per_page={1}", apiKey, count); - var client = new HttpClient(); - var result = await client.GetAsync(listUri); - result.EnsureSuccessStatusCode(); - using (var stream = await result.Content.ReadAsStreamAsync()) { - var doc = XDocument.Load(stream); - - return new LinkCollection(from p in doc.Descendants("photo") - let title = (string)p.Attribute("title") - orderby title - select new Link { - DisplayName = string.IsNullOrWhiteSpace(title) ? "[untitled]" : title, - Source = new Uri(string.Format(CultureInfo.InvariantCulture, "http://farm{0}.static.flickr.com/{1}/{2}_{3}.jpg", (string)p.Attribute("farm"), (string)p.Attribute("server"), (string)p.Attribute("id"), (string)p.Attribute("secret")), UriKind.Absolute) - }); - } - } - - /// - /// Asynchronously loads content from specified uri. - /// - /// The content uri. - /// The token used to cancel the load content operation. - /// The loaded content. - public async Task LoadContentAsync(Uri uri, CancellationToken cancellationToken) - { - // assuming uri is a valid image uri - var client = new HttpClient(); - var result = await client.GetAsync(uri, cancellationToken); - - // raise exception is result is not ok - result.EnsureSuccessStatusCode(); - - using (var stream = await result.Content.ReadAsStreamAsync()) { - var bitmap = new BitmapImage(); - bitmap.BeginInit(); - bitmap.CacheOption = BitmapCacheOption.OnLoad; - bitmap.StreamSource = stream; - bitmap.EndInit(); - - return new Image { Source = bitmap }; - }; - } - } -} +using FirstFloor.ModernUI.Presentation; +using FirstFloor.ModernUI.Windows; +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Imaging; +using System.Xml.Linq; + +namespace FirstFloor.ModernUI.App +{ + /// + /// Loads image content from Flickr. + /// + public class FlickrImageLoader + : IContentLoader + { + private const string apiKey = null; // your flickr API key here + + /// + /// Gets a collection of image links from the Flickr interestingness list. + /// + /// + public async Task GetInterestingnessListAsync() + { + if (apiKey == null) { + throw new InvalidOperationException("You need to specify a Flickr API key. Unfortunately the key cannot be distributed with the source code. Get your own from [url=http://www.flickr.com/services/api/misc.api_keys.html]http://www.flickr.com/services/api/misc.api_keys.html[/url]."); + } + + const int count = 50; // limit the number of images to 50 + var listUri = string.Format(CultureInfo.InvariantCulture, "https://api.flickr.com/services/rest/?method=flickr.interestingness.getList&api_key={0}&per_page={1}", apiKey, count); + var client = new HttpClient(); + var result = await client.GetAsync(listUri); + result.EnsureSuccessStatusCode(); + using (var stream = await result.Content.ReadAsStreamAsync()) { + var doc = XDocument.Load(stream); + + return new LinkCollection(from p in doc.Descendants("photo") + let title = (string)p.Attribute("title") + orderby title + select new Link { + DisplayName = string.IsNullOrWhiteSpace(title) ? "[untitled]" : title, + Source = new Uri(string.Format(CultureInfo.InvariantCulture, "http://farm{0}.static.flickr.com/{1}/{2}_{3}.jpg", (string)p.Attribute("farm"), (string)p.Attribute("server"), (string)p.Attribute("id"), (string)p.Attribute("secret")), UriKind.Absolute) + }); + } + } + + /// + /// Asynchronously loads content from specified uri. + /// + /// The content uri. + /// The token used to cancel the load content operation. + /// The loaded content. + public async Task LoadContentAsync(Uri uri, CancellationToken cancellationToken) + { + // assuming uri is a valid image uri + var client = new HttpClient(); + var result = await client.GetAsync(uri, cancellationToken); + + // raise exception is result is not ok + result.EnsureSuccessStatusCode(); + + using (var stream = await result.Content.ReadAsStreamAsync()) { + var bitmap = new BitmapImage(); + bitmap.BeginInit(); + bitmap.CacheOption = BitmapCacheOption.OnLoad; + bitmap.StreamSource = stream; + bitmap.EndInit(); + + return new Image { Source = bitmap }; + }; + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/LoremIpsumLoader.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/LoremIpsumLoader.cs index c14c1763..f8d8bdf6 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/LoremIpsumLoader.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/LoremIpsumLoader.cs @@ -1,28 +1,28 @@ -using FirstFloor.ModernUI.App.Content; -using FirstFloor.ModernUI.Windows; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FirstFloor.ModernUI.App -{ - /// - /// Loads lorem ipsum content regardless the given uri. - /// - public class LoremIpsumLoader - : DefaultContentLoader - { - /// - /// Loads the content from specified uri. - /// - /// The content uri - /// The loaded content. - protected override object LoadContent(Uri uri) - { - // return a new LoremIpsum user control instance no matter the uri - return new LoremIpsum(); - } - } -} +using FirstFloor.ModernUI.App.Content; +using FirstFloor.ModernUI.Windows; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FirstFloor.ModernUI.App +{ + /// + /// Loads lorem ipsum content regardless the given uri. + /// + public class LoremIpsumLoader + : DefaultContentLoader + { + /// + /// Loads the content from specified uri. + /// + /// The content uri + /// The loaded content. + protected override object LoadContent(Uri uri) + { + // return a new LoremIpsum user control instance no matter the uri + return new LoremIpsum(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/MainWindow.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/MainWindow.xaml.cs index 36356dc6..bfac3ae4 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/MainWindow.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/MainWindow.xaml.cs @@ -1,28 +1,28 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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; - -namespace FirstFloor.ModernUI.App -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : ModernWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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; + +namespace FirstFloor.ModernUI.App +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : ModernWindow + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ContentLoader.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ContentLoader.xaml.cs index 7bf12da5..26b704ce 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ContentLoader.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ContentLoader.xaml.cs @@ -1,29 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for ContentLoader.xaml - /// - public partial class ContentLoader : UserControl - { - public ContentLoader() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for ContentLoader.xaml + /// + public partial class ContentLoader : UserControl + { + public ContentLoader() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsModern.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsModern.xaml.cs index 7d185e51..ceb9a7ee 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsModern.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsModern.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for ControlsModern.xaml - /// - public partial class ControlsModern : UserControl - { - public ControlsModern() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for ControlsModern.xaml + /// + public partial class ControlsModern : UserControl + { + public ControlsModern() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsStyles.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsStyles.xaml.cs index af8d518b..0551c9d8 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsStyles.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/ControlsStyles.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for ControlsStyles.xaml - /// - public partial class ControlsStyles : UserControl - { - public ControlsStyles() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for ControlsStyles.xaml + /// + public partial class ControlsStyles : UserControl + { + public ControlsStyles() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/DpiAwareness.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/DpiAwareness.xaml.cs index 7dd930e9..acea2d81 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/DpiAwareness.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/DpiAwareness.xaml.cs @@ -1,30 +1,30 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for DpiAwareness.xaml - /// - public partial class DpiAwareness : UserControl - { - public DpiAwareness() - { - InitializeComponent(); - - this.DataContext = new DpiAwarenessViewModel(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for DpiAwareness.xaml + /// + public partial class DpiAwareness : UserControl + { + public DpiAwareness() + { + InitializeComponent(); + + this.DataContext = new DpiAwarenessViewModel(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Introduction.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Introduction.xaml.cs index e5820851..28dd1713 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Introduction.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Introduction.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for Introduction.xaml - /// - public partial class Introduction : UserControl - { - public Introduction() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for Introduction.xaml + /// + public partial class Introduction : UserControl + { + public Introduction() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutBasic.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutBasic.xaml.cs index 1cb0515a..33b4eab6 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutBasic.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutBasic.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for LayoutBasic.xaml - /// - public partial class LayoutBasic : UserControl - { - public LayoutBasic() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for LayoutBasic.xaml + /// + public partial class LayoutBasic : UserControl + { + public LayoutBasic() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutList.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutList.xaml.cs index eb715c42..78fe02b3 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutList.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutList.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for LayoutList.xaml - /// - public partial class LayoutList : UserControl - { - public LayoutList() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for LayoutList.xaml + /// + public partial class LayoutList : UserControl + { + public LayoutList() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutSplit.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutSplit.xaml.cs index 88c64b77..6d2bcf09 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutSplit.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutSplit.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for LayoutSplit.xaml - /// - public partial class LayoutSplit : UserControl - { - public LayoutSplit() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for LayoutSplit.xaml + /// + public partial class LayoutSplit : UserControl + { + public LayoutSplit() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutTab.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutTab.xaml.cs index 2304cd0c..29a21cc1 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutTab.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutTab.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for LayoutTab.xaml - /// - public partial class LayoutTab : UserControl - { - public LayoutTab() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for LayoutTab.xaml + /// + public partial class LayoutTab : UserControl + { + public LayoutTab() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutWireframe.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutWireframe.xaml.cs index daca6320..06a9827f 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutWireframe.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/LayoutWireframe.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for LayoutWireframe.xaml - /// - public partial class LayoutWireframe : UserControl - { - public LayoutWireframe() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for LayoutWireframe.xaml + /// + public partial class LayoutWireframe : UserControl + { + public LayoutWireframe() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Navigation.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Navigation.xaml.cs index a61e6ddb..fdcd9dd2 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Navigation.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Navigation.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for Navigation.xaml - /// - public partial class Navigation : UserControl - { - public Navigation() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for Navigation.xaml + /// + public partial class Navigation : UserControl + { + public Navigation() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Settings.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Settings.xaml.cs index 8b802e66..5953111e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Settings.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Pages/Settings.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 FirstFloor.ModernUI.App.Pages -{ - /// - /// Interaction logic for Settings.xaml - /// - public partial class Settings : UserControl - { - public Settings() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 FirstFloor.ModernUI.App.Pages +{ + /// + /// Interaction logic for Settings.xaml + /// + public partial class Settings : UserControl + { + public Settings() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Resources.Designer.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Resources.Designer.cs index bb47fd1d..9a734d51 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Resources.Designer.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Resources.Designer.cs @@ -1,70 +1,70 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.18033 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace FirstFloor.ModernUI.App.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", "4.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("FirstFloor.ModernUI.App.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; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18033 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FirstFloor.ModernUI.App.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", "4.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("FirstFloor.ModernUI.App.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/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Settings.Designer.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Settings.Designer.cs index b69a0f00..bd16daf1 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Settings.Designer.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Properties/Settings.Designer.cs @@ -1,30 +1,30 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.18033 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace FirstFloor.ModernUI.App.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18033 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace FirstFloor.ModernUI.App.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleDisabledCommand.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleDisabledCommand.cs index 0636b64b..81bb57eb 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleDisabledCommand.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleDisabledCommand.cs @@ -1,37 +1,37 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FirstFloor.ModernUI.App -{ - /// - /// An ICommand implementation that cannot execute. - /// - public class SampleDisabledCommand - : CommandBase - { - /// - /// Defines the method that determines whether the command can execute in its current state. - /// - /// Data used by the command. If the command does not require data to be passed, this object can be set to null. - /// - /// true if this command can be executed; otherwise, false. - /// - public override bool CanExecute(object parameter) - { - return false; // cannot execute - } - - /// - /// Executes the command. - /// - /// The parameter. - protected override void OnExecute(object parameter) - { - throw new NotSupportedException(); - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FirstFloor.ModernUI.App +{ + /// + /// An ICommand implementation that cannot execute. + /// + public class SampleDisabledCommand + : CommandBase + { + /// + /// Defines the method that determines whether the command can execute in its current state. + /// + /// Data used by the command. If the command does not require data to be passed, this object can be set to null. + /// + /// true if this command can be executed; otherwise, false. + /// + public override bool CanExecute(object parameter) + { + return false; // cannot execute + } + + /// + /// Executes the command. + /// + /// The parameter. + protected override void OnExecute(object parameter) + { + throw new NotSupportedException(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleFormViewModel.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleFormViewModel.cs index 5daa4288..936c81b5 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleFormViewModel.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleFormViewModel.cs @@ -1,60 +1,60 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FirstFloor.ModernUI.App -{ - public class SampleFormViewModel - : NotifyPropertyChanged, IDataErrorInfo - { - private string firstName = "John"; - private string lastName; - - public string FirstName - { - get { return this.firstName; } - set - { - if (this.firstName != value) { - this.firstName = value; - OnPropertyChanged("FirstName"); - } - } - } - - public string LastName - { - get { return this.lastName; } - set - { - if (this.lastName != value) { - this.lastName = value; - OnPropertyChanged("LastName"); - } - } - } - - public string Error - { - get { return null; } - } - - public string this[string columnName] - { - get - { - if (columnName == "FirstName") { - return string.IsNullOrEmpty(this.firstName) ? "Required value" : null; - } - if (columnName == "LastName") { - return string.IsNullOrEmpty(this.lastName) ? "Required value" : null; - } - return null; - } - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FirstFloor.ModernUI.App +{ + public class SampleFormViewModel + : NotifyPropertyChanged, IDataErrorInfo + { + private string firstName = "John"; + private string lastName; + + public string FirstName + { + get { return this.firstName; } + set + { + if (this.firstName != value) { + this.firstName = value; + OnPropertyChanged("FirstName"); + } + } + } + + public string LastName + { + get { return this.lastName; } + set + { + if (this.lastName != value) { + this.lastName = value; + OnPropertyChanged("LastName"); + } + } + } + + public string Error + { + get { return null; } + } + + public string this[string columnName] + { + get + { + if (columnName == "FirstName") { + return string.IsNullOrEmpty(this.firstName) ? "Required value" : null; + } + if (columnName == "LastName") { + return string.IsNullOrEmpty(this.lastName) ? "Required value" : null; + } + return null; + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleMsgBoxCommand.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleMsgBoxCommand.cs index f3f689de..177f420e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleMsgBoxCommand.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleMsgBoxCommand.cs @@ -1,27 +1,27 @@ -using FirstFloor.ModernUI.Presentation; -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; - -namespace FirstFloor.ModernUI.App -{ - /// - /// An ICommand implementation displaying a message box. - /// - public class SampleMsgBoxCommand - : CommandBase - { - /// - /// Executes the command. - /// - /// The parameter. - protected override void OnExecute(object parameter) - { - ModernDialog.ShowMessage("A messagebox triggered by selecting a hyperlink", "Messagebox", MessageBoxButton.OK); - } - } -} +using FirstFloor.ModernUI.Presentation; +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace FirstFloor.ModernUI.App +{ + /// + /// An ICommand implementation displaying a message box. + /// + public class SampleMsgBoxCommand + : CommandBase + { + /// + /// Executes the command. + /// + /// The parameter. + protected override void OnExecute(object parameter) + { + ModernDialog.ShowMessage("A messagebox triggered by selecting a hyperlink", "Messagebox", MessageBoxButton.OK); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleParameterCommand.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleParameterCommand.cs index a578f5b0..16923f8c 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleParameterCommand.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.App/SampleParameterCommand.cs @@ -1,28 +1,28 @@ -using FirstFloor.ModernUI.Presentation; -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; - -namespace FirstFloor.ModernUI.App -{ - /// - /// An ICommand implementation that displays the provided command parameter in a message box. - /// - public class SampleParameterCommand - : CommandBase - { - /// - /// Executes the command. - /// - /// The parameter. - protected override void OnExecute(object parameter) - { - ModernDialog.ShowMessage(string.Format(CultureInfo.CurrentUICulture, "Executing command, command parameter = '{0}'", parameter), "SampleCommand", MessageBoxButton.OK); - } - } -} +using FirstFloor.ModernUI.Presentation; +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace FirstFloor.ModernUI.App +{ + /// + /// An ICommand implementation that displays the provided command parameter in a message box. + /// + public class SampleParameterCommand + : CommandBase + { + /// + /// Executes the command. + /// + /// The parameter. + protected override void OnExecute(object parameter) + { + ModernDialog.ShowMessage(string.Format(CultureInfo.CurrentUICulture, "Executing command, command parameter = '{0}'", parameter), "SampleCommand", MessageBoxButton.OK); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/App.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/App.xaml.cs index 8876d5f7..ba6f6453 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/App.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/App.xaml.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace $safeprojectname$ -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace $safeprojectname$ +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/MainWindow.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/MainWindow.xaml.cs index a4819b8f..64309624 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/MainWindow.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/MainWindow.xaml.cs @@ -1,29 +1,29 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$ -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : ModernWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$ +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : ModernWindow + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/Properties/AssemblyInfo.cs index 3d757b62..a597e4db 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.App/Properties/AssemblyInfo.cs @@ -1,41 +1,41 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows.Media; - -// 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("$projectname$")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("$registeredorganization$")] -[assembly: AssemblyProduct("$projectname$")] -[assembly: AssemblyCopyright("Copyright © $registeredorganization$ $year$")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("$guid1$")] - -// required to support per-monitor DPI awareness in Windows 8.1+ -// see also https://mui.codeplex.com/wikipage?title=Per-monitor%20DPI%20awareness -[assembly: DisableDpiAwareness] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows.Media; + +// 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("$projectname$")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("$registeredorganization$")] +[assembly: AssemblyProduct("$projectname$")] +[assembly: AssemblyCopyright("Copyright © $registeredorganization$ $year$")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("$guid1$")] + +// required to support per-monitor DPI awareness in Windows 8.1+ +// see also https://mui.codeplex.com/wikipage?title=Per-monitor%20DPI%20awareness +[assembly: DisableDpiAwareness] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/BasicPage.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/BasicPage.xaml.cs index 4d6d5624..ab84402e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/BasicPage.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/BasicPage.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $rootnamespace$ -{ - /// - /// Interaction logic for $safeitemrootname$.xaml - /// - public partial class $safeitemrootname$ : UserControl - { - public $safeitemrootname$() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $rootnamespace$ +{ + /// + /// Interaction logic for $safeitemrootname$.xaml + /// + public partial class $safeitemrootname$ : UserControl + { + public $safeitemrootname$() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/Properties/AssemblyInfo.cs index 7209ea63..e8398ca2 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.BasicPage/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.BasicPage")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.BasicPage")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b349f4fa-0d47-468a-8741-2afa3071f7c4")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.BasicPage")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.BasicPage")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b349f4fa-0d47-468a-8741-2afa3071f7c4")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/ListPage.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/ListPage.xaml.cs index 4d6d5624..ab84402e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/ListPage.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/ListPage.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $rootnamespace$ -{ - /// - /// Interaction logic for $safeitemrootname$.xaml - /// - public partial class $safeitemrootname$ : UserControl - { - public $safeitemrootname$() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $rootnamespace$ +{ + /// + /// Interaction logic for $safeitemrootname$.xaml + /// + public partial class $safeitemrootname$ : UserControl + { + public $safeitemrootname$() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/Properties/AssemblyInfo.cs index af1f4cc4..8852e508 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ListPage/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.ListPage")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.ListPage")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b790164d-190e-44b8-bf95-73dec987206a")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.ListPage")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.ListPage")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b790164d-190e-44b8-bf95-73dec987206a")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/ModernDialog.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/ModernDialog.xaml.cs index e9fc813f..69932cfd 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/ModernDialog.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/ModernDialog.xaml.cs @@ -1,32 +1,32 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $rootnamespace$ -{ - /// - /// Interaction logic for $safeitemrootname$.xaml - /// - public partial class $safeitemrootname$ : ModernDialog - { - public $safeitemrootname$() - { - InitializeComponent(); - - // define the dialog buttons - this.Buttons = new Button[] { this.OkButton, this.CancelButton }; - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $rootnamespace$ +{ + /// + /// Interaction logic for $safeitemrootname$.xaml + /// + public partial class $safeitemrootname$ : ModernDialog + { + public $safeitemrootname$() + { + InitializeComponent(); + + // define the dialog buttons + this.Buttons = new Button[] { this.OkButton, this.CancelButton }; + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/Properties/AssemblyInfo.cs index 673094db..3f54a1d3 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernDialog/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.ModernDialog")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.ModernDialog")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3b7495e7-64a0-4b46-ac6a-78b546de583a")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.ModernDialog")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.ModernDialog")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3b7495e7-64a0-4b46-ac6a-78b546de583a")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/ModernWindow.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/ModernWindow.xaml.cs index 3490a1c8..6515cc9c 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/ModernWindow.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/ModernWindow.xaml.cs @@ -1,29 +1,29 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $rootnamespace$ -{ - /// - /// Interaction logic for $safeitemrootname$.xaml - /// - public partial class $safeitemrootname$ : ModernWindow - { - public $safeitemrootname$() - { - InitializeComponent(); - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $rootnamespace$ +{ + /// + /// Interaction logic for $safeitemrootname$.xaml + /// + public partial class $safeitemrootname$ : ModernWindow + { + public $safeitemrootname$() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/Properties/AssemblyInfo.cs index e7ace4b5..8a88a0c4 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.ModernWindow/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.ModernWindow")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.ModernWindow")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5569729c-8a29-4a12-96ef-e2344a4ae46a")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.ModernWindow")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.ModernWindow")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5569729c-8a29-4a12-96ef-e2344a4ae46a")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/App.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/App.xaml.cs index 8876d5f7..ba6f6453 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/App.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/App.xaml.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace $safeprojectname$ -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace $safeprojectname$ +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/About.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/About.xaml.cs index 89dc00be..cd1b669d 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/About.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/About.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$.Content -{ - /// - /// Interaction logic for About.xaml - /// - public partial class About : UserControl - { - public About() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$.Content +{ + /// + /// Interaction logic for About.xaml + /// + public partial class About : UserControl + { + public About() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearance.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearance.xaml.cs index bcc0f91d..622330f9 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearance.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearance.xaml.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$.Content -{ - /// - /// Interaction logic for SettingsAppearance.xaml - /// - public partial class SettingsAppearance : UserControl - { - public SettingsAppearance() - { - InitializeComponent(); - - // create and assign the appearance view model - this.DataContext = new SettingsAppearanceViewModel(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$.Content +{ + /// + /// Interaction logic for SettingsAppearance.xaml + /// + public partial class SettingsAppearance : UserControl + { + public SettingsAppearance() + { + InitializeComponent(); + + // create and assign the appearance view model + this.DataContext = new SettingsAppearanceViewModel(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearanceViewModel.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearanceViewModel.cs index 52473707..12881af2 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearanceViewModel.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Content/SettingsAppearanceViewModel.cs @@ -1,149 +1,149 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace $safeprojectname$.Content -{ - /// - /// A simple view model for configuring theme, font and accent colors. - /// - public class SettingsAppearanceViewModel - : NotifyPropertyChanged - { - private const string FontSmall = "small"; - private const string FontLarge = "large"; - - // 9 accent colors from metro design principles - /*private Color[] accentColors = new Color[]{ - Color.FromRgb(0x33, 0x99, 0xff), // blue - Color.FromRgb(0x00, 0xab, 0xa9), // teal - Color.FromRgb(0x33, 0x99, 0x33), // green - Color.FromRgb(0x8c, 0xbf, 0x26), // lime - Color.FromRgb(0xf0, 0x96, 0x09), // orange - Color.FromRgb(0xff, 0x45, 0x00), // orange red - Color.FromRgb(0xe5, 0x14, 0x00), // red - Color.FromRgb(0xff, 0x00, 0x97), // magenta - Color.FromRgb(0xa2, 0x00, 0xff), // purple - };*/ - - // 20 accent colors from Windows Phone 8 - private Color[] accentColors = new Color[]{ - Color.FromRgb(0xa4, 0xc4, 0x00), // lime - Color.FromRgb(0x60, 0xa9, 0x17), // green - Color.FromRgb(0x00, 0x8a, 0x00), // emerald - Color.FromRgb(0x00, 0xab, 0xa9), // teal - Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan - Color.FromRgb(0x00, 0x50, 0xef), // cobalt - Color.FromRgb(0x6a, 0x00, 0xff), // indigo - Color.FromRgb(0xaa, 0x00, 0xff), // violet - Color.FromRgb(0xf4, 0x72, 0xd0), // pink - Color.FromRgb(0xd8, 0x00, 0x73), // magenta - Color.FromRgb(0xa2, 0x00, 0x25), // crimson - Color.FromRgb(0xe5, 0x14, 0x00), // red - Color.FromRgb(0xfa, 0x68, 0x00), // orange - Color.FromRgb(0xf0, 0xa3, 0x0a), // amber - Color.FromRgb(0xe3, 0xc8, 0x00), // yellow - Color.FromRgb(0x82, 0x5a, 0x2c), // brown - Color.FromRgb(0x6d, 0x87, 0x64), // olive - Color.FromRgb(0x64, 0x76, 0x87), // steel - Color.FromRgb(0x76, 0x60, 0x8a), // mauve - Color.FromRgb(0x87, 0x79, 0x4e), // taupe - }; - - private Color selectedAccentColor; - private LinkCollection themes = new LinkCollection(); - private Link selectedTheme; - private string selectedFontSize; - - public SettingsAppearanceViewModel() - { - // add the default themes - this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); - this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); - - this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; - SyncThemeAndColor(); - - AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; - } - - private void SyncThemeAndColor() - { - // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. - this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); - - // and make sure accent color is up-to-date - this.SelectedAccentColor = AppearanceManager.Current.AccentColor; - } - - private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) - { - if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") { - SyncThemeAndColor(); - } - } - - public LinkCollection Themes - { - get { return this.themes; } - } - - public string[] FontSizes - { - get { return new string[] { FontSmall, FontLarge }; } - } - - public Color[] AccentColors - { - get { return this.accentColors; } - } - - public Link SelectedTheme - { - get { return this.selectedTheme; } - set - { - if (this.selectedTheme != value) { - this.selectedTheme = value; - OnPropertyChanged("SelectedTheme"); - - // and update the actual theme - AppearanceManager.Current.ThemeSource = value.Source; - } - } - } - - public string SelectedFontSize - { - get { return this.selectedFontSize; } - set - { - if (this.selectedFontSize != value) { - this.selectedFontSize = value; - OnPropertyChanged("SelectedFontSize"); - - AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; - } - } - } - - public Color SelectedAccentColor - { - get { return this.selectedAccentColor; } - set - { - if (this.selectedAccentColor != value) { - this.selectedAccentColor = value; - OnPropertyChanged("SelectedAccentColor"); - - AppearanceManager.Current.AccentColor = value; - } - } - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace $safeprojectname$.Content +{ + /// + /// A simple view model for configuring theme, font and accent colors. + /// + public class SettingsAppearanceViewModel + : NotifyPropertyChanged + { + private const string FontSmall = "small"; + private const string FontLarge = "large"; + + // 9 accent colors from metro design principles + /*private Color[] accentColors = new Color[]{ + Color.FromRgb(0x33, 0x99, 0xff), // blue + Color.FromRgb(0x00, 0xab, 0xa9), // teal + Color.FromRgb(0x33, 0x99, 0x33), // green + Color.FromRgb(0x8c, 0xbf, 0x26), // lime + Color.FromRgb(0xf0, 0x96, 0x09), // orange + Color.FromRgb(0xff, 0x45, 0x00), // orange red + Color.FromRgb(0xe5, 0x14, 0x00), // red + Color.FromRgb(0xff, 0x00, 0x97), // magenta + Color.FromRgb(0xa2, 0x00, 0xff), // purple + };*/ + + // 20 accent colors from Windows Phone 8 + private Color[] accentColors = new Color[]{ + Color.FromRgb(0xa4, 0xc4, 0x00), // lime + Color.FromRgb(0x60, 0xa9, 0x17), // green + Color.FromRgb(0x00, 0x8a, 0x00), // emerald + Color.FromRgb(0x00, 0xab, 0xa9), // teal + Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan + Color.FromRgb(0x00, 0x50, 0xef), // cobalt + Color.FromRgb(0x6a, 0x00, 0xff), // indigo + Color.FromRgb(0xaa, 0x00, 0xff), // violet + Color.FromRgb(0xf4, 0x72, 0xd0), // pink + Color.FromRgb(0xd8, 0x00, 0x73), // magenta + Color.FromRgb(0xa2, 0x00, 0x25), // crimson + Color.FromRgb(0xe5, 0x14, 0x00), // red + Color.FromRgb(0xfa, 0x68, 0x00), // orange + Color.FromRgb(0xf0, 0xa3, 0x0a), // amber + Color.FromRgb(0xe3, 0xc8, 0x00), // yellow + Color.FromRgb(0x82, 0x5a, 0x2c), // brown + Color.FromRgb(0x6d, 0x87, 0x64), // olive + Color.FromRgb(0x64, 0x76, 0x87), // steel + Color.FromRgb(0x76, 0x60, 0x8a), // mauve + Color.FromRgb(0x87, 0x79, 0x4e), // taupe + }; + + private Color selectedAccentColor; + private LinkCollection themes = new LinkCollection(); + private Link selectedTheme; + private string selectedFontSize; + + public SettingsAppearanceViewModel() + { + // add the default themes + this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); + this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); + + this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; + SyncThemeAndColor(); + + AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; + } + + private void SyncThemeAndColor() + { + // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. + this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); + + // and make sure accent color is up-to-date + this.SelectedAccentColor = AppearanceManager.Current.AccentColor; + } + + private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") { + SyncThemeAndColor(); + } + } + + public LinkCollection Themes + { + get { return this.themes; } + } + + public string[] FontSizes + { + get { return new string[] { FontSmall, FontLarge }; } + } + + public Color[] AccentColors + { + get { return this.accentColors; } + } + + public Link SelectedTheme + { + get { return this.selectedTheme; } + set + { + if (this.selectedTheme != value) { + this.selectedTheme = value; + OnPropertyChanged("SelectedTheme"); + + // and update the actual theme + AppearanceManager.Current.ThemeSource = value.Source; + } + } + } + + public string SelectedFontSize + { + get { return this.selectedFontSize; } + set + { + if (this.selectedFontSize != value) { + this.selectedFontSize = value; + OnPropertyChanged("SelectedFontSize"); + + AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; + } + } + } + + public Color SelectedAccentColor + { + get { return this.selectedAccentColor; } + set + { + if (this.selectedAccentColor != value) { + this.selectedAccentColor = value; + OnPropertyChanged("SelectedAccentColor"); + + AppearanceManager.Current.AccentColor = value; + } + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/MainWindow.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/MainWindow.xaml.cs index a4819b8f..64309624 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/MainWindow.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/MainWindow.xaml.cs @@ -1,29 +1,29 @@ -using FirstFloor.ModernUI.Windows.Controls; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$ -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : ModernWindow - { - public MainWindow() - { - InitializeComponent(); - } - } -} +using FirstFloor.ModernUI.Windows.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$ +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : ModernWindow + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Home.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Home.xaml.cs index 3a2842ec..f5099869 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Home.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Home.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$.Pages -{ - /// - /// Interaction logic for Home.xaml - /// - public partial class Home : UserControl - { - public Home() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$.Pages +{ + /// + /// Interaction logic for Home.xaml + /// + public partial class Home : UserControl + { + public Home() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/About.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/About.xaml.cs index 691b6a77..fd60b53b 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/About.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/About.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$.Pages.Settings -{ - /// - /// Interaction logic for About.xaml - /// - public partial class About : UserControl - { - public About() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$.Pages.Settings +{ + /// + /// Interaction logic for About.xaml + /// + public partial class About : UserControl + { + public About() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/Appearance.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/Appearance.xaml.cs index 10706f43..d6c1c047 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/Appearance.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/Appearance.xaml.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$.Pages.Settings -{ - /// - /// Interaction logic for Appearance.xaml - /// - public partial class Appearance : UserControl - { - public Appearance() - { - InitializeComponent(); - - // create and assign the appearance view model - this.DataContext = new AppearanceViewModel(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$.Pages.Settings +{ + /// + /// Interaction logic for Appearance.xaml + /// + public partial class Appearance : UserControl + { + public Appearance() + { + InitializeComponent(); + + // create and assign the appearance view model + this.DataContext = new AppearanceViewModel(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/AppearanceViewModel.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/AppearanceViewModel.cs index c57e3148..ab63f459 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/AppearanceViewModel.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/Settings/AppearanceViewModel.cs @@ -1,149 +1,149 @@ -using FirstFloor.ModernUI.Presentation; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace $safeprojectname$.Pages.Settings -{ - /// - /// A simple view model for configuring theme, font and accent colors. - /// - public class AppearanceViewModel - : NotifyPropertyChanged - { - private const string FontSmall = "small"; - private const string FontLarge = "large"; - - // 9 accent colors from metro design principles - /*private Color[] accentColors = new Color[]{ - Color.FromRgb(0x33, 0x99, 0xff), // blue - Color.FromRgb(0x00, 0xab, 0xa9), // teal - Color.FromRgb(0x33, 0x99, 0x33), // green - Color.FromRgb(0x8c, 0xbf, 0x26), // lime - Color.FromRgb(0xf0, 0x96, 0x09), // orange - Color.FromRgb(0xff, 0x45, 0x00), // orange red - Color.FromRgb(0xe5, 0x14, 0x00), // red - Color.FromRgb(0xff, 0x00, 0x97), // magenta - Color.FromRgb(0xa2, 0x00, 0xff), // purple - };*/ - - // 20 accent colors from Windows Phone 8 - private Color[] accentColors = new Color[]{ - Color.FromRgb(0xa4, 0xc4, 0x00), // lime - Color.FromRgb(0x60, 0xa9, 0x17), // green - Color.FromRgb(0x00, 0x8a, 0x00), // emerald - Color.FromRgb(0x00, 0xab, 0xa9), // teal - Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan - Color.FromRgb(0x00, 0x50, 0xef), // cobalt - Color.FromRgb(0x6a, 0x00, 0xff), // indigo - Color.FromRgb(0xaa, 0x00, 0xff), // violet - Color.FromRgb(0xf4, 0x72, 0xd0), // pink - Color.FromRgb(0xd8, 0x00, 0x73), // magenta - Color.FromRgb(0xa2, 0x00, 0x25), // crimson - Color.FromRgb(0xe5, 0x14, 0x00), // red - Color.FromRgb(0xfa, 0x68, 0x00), // orange - Color.FromRgb(0xf0, 0xa3, 0x0a), // amber - Color.FromRgb(0xe3, 0xc8, 0x00), // yellow - Color.FromRgb(0x82, 0x5a, 0x2c), // brown - Color.FromRgb(0x6d, 0x87, 0x64), // olive - Color.FromRgb(0x64, 0x76, 0x87), // steel - Color.FromRgb(0x76, 0x60, 0x8a), // mauve - Color.FromRgb(0x87, 0x79, 0x4e), // taupe - }; - - private Color selectedAccentColor; - private LinkCollection themes = new LinkCollection(); - private Link selectedTheme; - private string selectedFontSize; - - public AppearanceViewModel() - { - // add the default themes - this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); - this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); - - this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; - SyncThemeAndColor(); - - AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; - } - - private void SyncThemeAndColor() - { - // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. - this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); - - // and make sure accent color is up-to-date - this.SelectedAccentColor = AppearanceManager.Current.AccentColor; - } - - private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) - { - if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") { - SyncThemeAndColor(); - } - } - - public LinkCollection Themes - { - get { return this.themes; } - } - - public string[] FontSizes - { - get { return new string[] { FontSmall, FontLarge }; } - } - - public Color[] AccentColors - { - get { return this.accentColors; } - } - - public Link SelectedTheme - { - get { return this.selectedTheme; } - set - { - if (this.selectedTheme != value) { - this.selectedTheme = value; - OnPropertyChanged("SelectedTheme"); - - // and update the actual theme - AppearanceManager.Current.ThemeSource = value.Source; - } - } - } - - public string SelectedFontSize - { - get { return this.selectedFontSize; } - set - { - if (this.selectedFontSize != value) { - this.selectedFontSize = value; - OnPropertyChanged("SelectedFontSize"); - - AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; - } - } - } - - public Color SelectedAccentColor - { - get { return this.selectedAccentColor; } - set - { - if (this.selectedAccentColor != value) { - this.selectedAccentColor = value; - OnPropertyChanged("SelectedAccentColor"); - - AppearanceManager.Current.AccentColor = value; - } - } - } - } -} +using FirstFloor.ModernUI.Presentation; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace $safeprojectname$.Pages.Settings +{ + /// + /// A simple view model for configuring theme, font and accent colors. + /// + public class AppearanceViewModel + : NotifyPropertyChanged + { + private const string FontSmall = "small"; + private const string FontLarge = "large"; + + // 9 accent colors from metro design principles + /*private Color[] accentColors = new Color[]{ + Color.FromRgb(0x33, 0x99, 0xff), // blue + Color.FromRgb(0x00, 0xab, 0xa9), // teal + Color.FromRgb(0x33, 0x99, 0x33), // green + Color.FromRgb(0x8c, 0xbf, 0x26), // lime + Color.FromRgb(0xf0, 0x96, 0x09), // orange + Color.FromRgb(0xff, 0x45, 0x00), // orange red + Color.FromRgb(0xe5, 0x14, 0x00), // red + Color.FromRgb(0xff, 0x00, 0x97), // magenta + Color.FromRgb(0xa2, 0x00, 0xff), // purple + };*/ + + // 20 accent colors from Windows Phone 8 + private Color[] accentColors = new Color[]{ + Color.FromRgb(0xa4, 0xc4, 0x00), // lime + Color.FromRgb(0x60, 0xa9, 0x17), // green + Color.FromRgb(0x00, 0x8a, 0x00), // emerald + Color.FromRgb(0x00, 0xab, 0xa9), // teal + Color.FromRgb(0x1b, 0xa1, 0xe2), // cyan + Color.FromRgb(0x00, 0x50, 0xef), // cobalt + Color.FromRgb(0x6a, 0x00, 0xff), // indigo + Color.FromRgb(0xaa, 0x00, 0xff), // violet + Color.FromRgb(0xf4, 0x72, 0xd0), // pink + Color.FromRgb(0xd8, 0x00, 0x73), // magenta + Color.FromRgb(0xa2, 0x00, 0x25), // crimson + Color.FromRgb(0xe5, 0x14, 0x00), // red + Color.FromRgb(0xfa, 0x68, 0x00), // orange + Color.FromRgb(0xf0, 0xa3, 0x0a), // amber + Color.FromRgb(0xe3, 0xc8, 0x00), // yellow + Color.FromRgb(0x82, 0x5a, 0x2c), // brown + Color.FromRgb(0x6d, 0x87, 0x64), // olive + Color.FromRgb(0x64, 0x76, 0x87), // steel + Color.FromRgb(0x76, 0x60, 0x8a), // mauve + Color.FromRgb(0x87, 0x79, 0x4e), // taupe + }; + + private Color selectedAccentColor; + private LinkCollection themes = new LinkCollection(); + private Link selectedTheme; + private string selectedFontSize; + + public AppearanceViewModel() + { + // add the default themes + this.themes.Add(new Link { DisplayName = "dark", Source = AppearanceManager.DarkThemeSource }); + this.themes.Add(new Link { DisplayName = "light", Source = AppearanceManager.LightThemeSource }); + + this.SelectedFontSize = AppearanceManager.Current.FontSize == FontSize.Large ? FontLarge : FontSmall; + SyncThemeAndColor(); + + AppearanceManager.Current.PropertyChanged += OnAppearanceManagerPropertyChanged; + } + + private void SyncThemeAndColor() + { + // synchronizes the selected viewmodel theme with the actual theme used by the appearance manager. + this.SelectedTheme = this.themes.FirstOrDefault(l => l.Source.Equals(AppearanceManager.Current.ThemeSource)); + + // and make sure accent color is up-to-date + this.SelectedAccentColor = AppearanceManager.Current.AccentColor; + } + + private void OnAppearanceManagerPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == "ThemeSource" || e.PropertyName == "AccentColor") { + SyncThemeAndColor(); + } + } + + public LinkCollection Themes + { + get { return this.themes; } + } + + public string[] FontSizes + { + get { return new string[] { FontSmall, FontLarge }; } + } + + public Color[] AccentColors + { + get { return this.accentColors; } + } + + public Link SelectedTheme + { + get { return this.selectedTheme; } + set + { + if (this.selectedTheme != value) { + this.selectedTheme = value; + OnPropertyChanged("SelectedTheme"); + + // and update the actual theme + AppearanceManager.Current.ThemeSource = value.Source; + } + } + } + + public string SelectedFontSize + { + get { return this.selectedFontSize; } + set + { + if (this.selectedFontSize != value) { + this.selectedFontSize = value; + OnPropertyChanged("SelectedFontSize"); + + AppearanceManager.Current.FontSize = value == FontLarge ? FontSize.Large : FontSize.Small; + } + } + } + + public Color SelectedAccentColor + { + get { return this.selectedAccentColor; } + set + { + if (this.selectedAccentColor != value) { + this.selectedAccentColor = value; + OnPropertyChanged("SelectedAccentColor"); + + AppearanceManager.Current.AccentColor = value; + } + } + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/SettingsPage.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/SettingsPage.xaml.cs index 47280438..dcdc7ce1 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/SettingsPage.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Pages/SettingsPage.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $safeprojectname$.Pages -{ - /// - /// Interaction logic for SettingsPage.xaml - /// - public partial class SettingsPage : UserControl - { - public SettingsPage() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $safeprojectname$.Pages +{ + /// + /// Interaction logic for SettingsPage.xaml + /// + public partial class SettingsPage : UserControl + { + public SettingsPage() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Properties/AssemblyInfo.cs index 3d757b62..a597e4db 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.NavigationApp/Properties/AssemblyInfo.cs @@ -1,41 +1,41 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows.Media; - -// 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("$projectname$")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("$registeredorganization$")] -[assembly: AssemblyProduct("$projectname$")] -[assembly: AssemblyCopyright("Copyright © $registeredorganization$ $year$")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("$guid1$")] - -// required to support per-monitor DPI awareness in Windows 8.1+ -// see also https://mui.codeplex.com/wikipage?title=Per-monitor%20DPI%20awareness -[assembly: DisableDpiAwareness] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows.Media; + +// 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("$projectname$")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("$registeredorganization$")] +[assembly: AssemblyProduct("$projectname$")] +[assembly: AssemblyCopyright("Copyright © $registeredorganization$ $year$")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("$guid1$")] + +// required to support per-monitor DPI awareness in Windows 8.1+ +// see also https://mui.codeplex.com/wikipage?title=Per-monitor%20DPI%20awareness +[assembly: DisableDpiAwareness] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/Properties/AssemblyInfo.cs index b2369fec..e5821d65 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.SplitPage")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.SplitPage")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d766d19-4d5f-4b97-a9fb-f4eafa1b47fd")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.SplitPage")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.SplitPage")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6d766d19-4d5f-4b97-a9fb-f4eafa1b47fd")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/SplitPage.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/SplitPage.xaml.cs index 4d6d5624..ab84402e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/SplitPage.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.SplitPage/SplitPage.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $rootnamespace$ -{ - /// - /// Interaction logic for $safeitemrootname$.xaml - /// - public partial class $safeitemrootname$ : UserControl - { - public $safeitemrootname$() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $rootnamespace$ +{ + /// + /// Interaction logic for $safeitemrootname$.xaml + /// + public partial class $safeitemrootname$ : UserControl + { + public $safeitemrootname$() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/Properties/AssemblyInfo.cs index 101e2f66..bb94104b 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.TabPage")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.TabPage")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("127d5765-407e-4dc1-a299-a6db2ae91343")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.TabPage")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.TabPage")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("127d5765-407e-4dc1-a299-a6db2ae91343")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/TabPage.xaml.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/TabPage.xaml.cs index 4d6d5624..ab84402e 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/TabPage.xaml.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.TabPage/TabPage.xaml.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -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 $rootnamespace$ -{ - /// - /// Interaction logic for $safeitemrootname$.xaml - /// - public partial class $safeitemrootname$ : UserControl - { - public $safeitemrootname$() - { - InitializeComponent(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +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 $rootnamespace$ +{ + /// + /// Interaction logic for $safeitemrootname$.xaml + /// + public partial class $safeitemrootname$ : UserControl + { + public $safeitemrootname$() + { + InitializeComponent(); + } + } +} diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Templates/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Templates/Properties/AssemblyInfo.cs index 9e135700..efc7476f 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Templates/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Templates/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.Templates")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.Templates")] -[assembly: AssemblyCopyright("")] -[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)] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.Templates")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.Templates")] +[assembly: AssemblyCopyright("")] +[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)] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Theme/Properties/AssemblyInfo.cs b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Theme/Properties/AssemblyInfo.cs index 8b3fcc2f..5bc5c171 100644 --- a/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Theme/Properties/AssemblyInfo.cs +++ b/1.0/FirstFloor.ModernUI/FirstFloor.ModernUI.Templates/ModernUI.Theme/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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("ModernUI.Theme")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernUI.Theme")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[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)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d4c5abe0-eb39-4f24-b163-7a6d70cee1ee")] - -// 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.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ModernUI.Theme")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModernUI.Theme")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d4c5abe0-eb39-4f24-b163-7a6d70cee1ee")] + +// 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.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]