├── .gitignore ├── FirstFloor.ModernUI ├── Binaries │ └── Microsoft.Windows.Shell.dll ├── FirstFloor.ModernUI.App │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── ModernUI.BingImage.xaml │ │ ├── ModernUI.HelloKitty.xaml │ │ ├── ModernUI.Love.xaml │ │ ├── ModernUI.Snowflakes.xaml │ │ ├── appbar.add.xaml │ │ ├── appbar.adobe.bridge.xaml │ │ ├── appbar.arrow.collapsed.xaml │ │ ├── appbar.arrow.corner.up.right.xaml │ │ ├── appbar.arrow.down.xaml │ │ ├── appbar.arrow.expand.xaml │ │ ├── appbar.box.xaml │ │ ├── appbar.camera.flash.off.xaml │ │ ├── appbar.camera.flash.xaml │ │ ├── appbar.camera.xaml │ │ ├── appbar.cards.club.xaml │ │ ├── appbar.cards.diamond.xaml │ │ ├── appbar.cards.heart.xaml │ │ ├── appbar.cards.spade.xaml │ │ ├── appbar.check.xaml │ │ ├── background.kitty.png │ │ ├── background.love.jpg │ │ └── background.snowflakes.jpg │ ├── BingImage.cs │ ├── Content │ │ ├── ContentLoaderImages.xaml │ │ ├── ContentLoaderImages.xaml.cs │ │ ├── ContentLoaderIntro.xaml │ │ ├── ContentLoaderIntro.xaml.cs │ │ ├── ControlsModernBBCodeBlock.xaml │ │ ├── ControlsModernBBCodeBlock.xaml.cs │ │ ├── ControlsModernButton.xaml │ │ ├── ControlsModernButton.xaml.cs │ │ ├── ControlsModernDialog.xaml │ │ ├── ControlsModernDialog.xaml.cs │ │ ├── ControlsModernFrame.xaml │ │ ├── ControlsModernFrame.xaml.cs │ │ ├── ControlsModernMenu.xaml │ │ ├── ControlsModernMenu.xaml.cs │ │ ├── ControlsModernWindow.xaml │ │ ├── ControlsModernWindow.xaml.cs │ │ ├── ControlsStylesButton.xaml │ │ ├── ControlsStylesButton.xaml.cs │ │ ├── ControlsStylesDataGrid.xaml │ │ ├── ControlsStylesDataGrid.xaml.cs │ │ ├── ControlsStylesItemsControl.xaml │ │ ├── ControlsStylesItemsControl.xaml.cs │ │ ├── ControlsStylesProgressBar.xaml │ │ ├── ControlsStylesProgressBar.xaml.cs │ │ ├── ControlsStylesSampleForm.xaml │ │ ├── ControlsStylesSampleForm.xaml.cs │ │ ├── ControlsStylesSlider.xaml │ │ ├── ControlsStylesSlider.xaml.cs │ │ ├── ControlsStylesText.xaml │ │ ├── ControlsStylesText.xaml.cs │ │ ├── LoremIpsum.xaml │ │ ├── LoremIpsum.xaml.cs │ │ ├── LoremIpsumList.xaml │ │ ├── LoremIpsumList.xaml.cs │ │ ├── LoremIpsumSplit.xaml │ │ ├── LoremIpsumSplit.xaml.cs │ │ ├── ModernFrame │ │ │ ├── CancelNavigateSample.xaml │ │ │ ├── CancelNavigateSample.xaml.cs │ │ │ ├── ErrorSample.xaml │ │ │ ├── ErrorSample.xaml.cs │ │ │ ├── Sample.xaml │ │ │ └── Sample.xaml.cs │ │ ├── SettingsAppearance.xaml │ │ ├── SettingsAppearance.xaml.cs │ │ └── SettingsAppearanceViewModel.cs │ ├── FirstFloor.ModernUI.App.csproj │ ├── FlickrImageLoader.cs │ ├── LoremIpsumLoader.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Pages │ │ ├── ContentLoader.xaml │ │ ├── ContentLoader.xaml.cs │ │ ├── ControlsModern.xaml │ │ ├── ControlsModern.xaml.cs │ │ ├── ControlsStyles.xaml │ │ ├── ControlsStyles.xaml.cs │ │ ├── Introduction.xaml │ │ ├── Introduction.xaml.cs │ │ ├── LayoutBasic.xaml │ │ ├── LayoutBasic.xaml.cs │ │ ├── LayoutList.xaml │ │ ├── LayoutList.xaml.cs │ │ ├── LayoutSplit.xaml │ │ ├── LayoutSplit.xaml.cs │ │ ├── LayoutTab.xaml │ │ ├── LayoutTab.xaml.cs │ │ ├── LayoutWireframe.xaml │ │ ├── LayoutWireframe.xaml.cs │ │ ├── Navigation.xaml │ │ ├── Navigation.xaml.cs │ │ ├── Settings.xaml │ │ └── Settings.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SampleDisabledCommand.cs │ ├── SampleFormViewModel.cs │ ├── SampleMsgBoxCommand.cs │ └── SampleParameterCommand.cs ├── FirstFloor.ModernUI.sln ├── FirstFloor.ModernUI │ ├── Assets │ │ ├── Button.xaml │ │ ├── Calendar.xaml │ │ ├── CheckBox.xaml │ │ ├── ComboBox.xaml │ │ ├── ContextMenu.xaml │ │ ├── Converters.xaml │ │ ├── DataGrid.xaml │ │ ├── DatePicker.xaml │ │ ├── GridSplitter.xaml │ │ ├── Hyperlink.xaml │ │ ├── Label.xaml │ │ ├── ListBox.xaml │ │ ├── ListView.xaml │ │ ├── MenuItem.xaml │ │ ├── ModernUI.Dark.xaml │ │ ├── ModernUI.Light.xaml │ │ ├── ModernUI.xaml │ │ ├── ModernWindowEx.xaml │ │ ├── PasswordBox.xaml │ │ ├── ProgressBar.xaml │ │ ├── RadioButton.xaml │ │ ├── ScrollBar.xaml │ │ ├── Slider.xaml │ │ ├── TextBlock.xaml │ │ ├── TextBox.xaml │ │ ├── ToolTip.xaml │ │ └── TreeView.xaml │ ├── FirstFloor.ModernUI.csproj │ ├── ModernUIHelper.cs │ ├── Presentation │ │ ├── AppearanceManager.cs │ │ ├── CommandBase.cs │ │ ├── Displayable.cs │ │ ├── FontSize.cs │ │ ├── Link.cs │ │ ├── LinkCollection.cs │ │ ├── LinkGroup.cs │ │ ├── LinkGroupCollection.cs │ │ ├── NotifyPropertyChanged.cs │ │ ├── ReadOnlyLinkGroupCollection.cs │ │ └── RelayCommand.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Themes │ │ ├── BBCodeBlock.xaml │ │ ├── Generic.xaml │ │ ├── ModernButton.xaml │ │ ├── ModernDialog.xaml │ │ ├── ModernFrame.xaml │ │ ├── ModernMenu.xaml │ │ ├── ModernTab.xaml │ │ ├── ModernWindow.xaml │ │ └── TransitioningContentControl.xaml │ └── Windows │ │ ├── CommandDictionary.cs │ │ ├── Controls │ │ ├── BBCode │ │ │ ├── BBCodeLexer.cs │ │ │ ├── BBCodeParser.cs │ │ │ ├── CharBuffer.cs │ │ │ ├── Lexer.cs │ │ │ ├── ParseException.cs │ │ │ ├── Parser.cs │ │ │ ├── Token.cs │ │ │ └── TokenBuffer.cs │ │ ├── BBCodeBlock.cs │ │ ├── DataGridCheckBoxColumn.cs │ │ ├── DataGridComboBoxColumn.cs │ │ ├── DataGridTextColumn.cs │ │ ├── ModernButton.cs │ │ ├── ModernDialog.cs │ │ ├── ModernFrame.cs │ │ ├── ModernMenu.cs │ │ ├── ModernTab.cs │ │ ├── ModernWindow.cs │ │ ├── RelativeAnimatingContentControl.cs │ │ ├── SourceEventArgs.cs │ │ ├── TabLayout.cs │ │ └── TransitioningContentControl.cs │ │ ├── Converters │ │ ├── BooleanToFontWeightConverter.cs │ │ ├── BooleanToVisibilityConverter.cs │ │ ├── NullOrEmptyStringToVisibilityConverter.cs │ │ ├── NullToVisibilityConverter.cs │ │ ├── ToLowerConverter.cs │ │ └── ToUpperConverter.cs │ │ ├── DefaultContentLoader.cs │ │ ├── IContent.cs │ │ ├── IContentLoader.cs │ │ ├── Media │ │ └── VisualTreeHelperEx.cs │ │ └── Navigation │ │ ├── DefaultLinkNavigator.cs │ │ ├── FragmentNavigationEventArgs.cs │ │ ├── ILinkNavigator.cs │ │ ├── NavigatingCancelEventArgs.cs │ │ ├── NavigationBaseEventArgs.cs │ │ ├── NavigationEventArgs.cs │ │ ├── NavigationFailedEventArgs.cs │ │ ├── NavigationHelper.cs │ │ └── NavigationType.cs ├── License.RelativeAnimatingContentControl.txt ├── License.icons.txt └── License.txt └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 2 | [Bb]in/ 3 | [Oo]bj/ 4 | 5 | # mstest test results 6 | TestResults 7 | 8 | ## Ignore Visual Studio temporary files, build results, and 9 | ## files generated by popular Visual Studio add-ons. 10 | 11 | # User-specific files 12 | *.suo 13 | *.user 14 | *.sln.docstates 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Rr]elease/ 19 | x64/ 20 | *_i.c 21 | *_p.c 22 | *.ilk 23 | *.meta 24 | *.obj 25 | *.pch 26 | *.pdb 27 | *.pgc 28 | *.pgd 29 | *.rsp 30 | *.sbr 31 | *.tlb 32 | *.tli 33 | *.tlh 34 | *.tmp 35 | *.log 36 | *.vspscc 37 | *.vssscc 38 | .builds 39 | 40 | # Visual C++ cache files 41 | ipch/ 42 | *.aps 43 | *.ncb 44 | *.opensdf 45 | *.sdf 46 | 47 | # Visual Studio profiler 48 | *.psess 49 | *.vsp 50 | *.vspx 51 | 52 | # Guidance Automation Toolkit 53 | *.gpState 54 | 55 | # ReSharper is a .NET coding add-in 56 | _ReSharper* 57 | 58 | # NCrunch 59 | *.ncrunch* 60 | .*crunch*.local.xml 61 | 62 | # Installshield output folder 63 | [Ee]xpress 64 | 65 | # DocProject is a documentation generator add-in 66 | DocProject/buildhelp/ 67 | DocProject/Help/*.HxT 68 | DocProject/Help/*.HxC 69 | DocProject/Help/*.hhc 70 | DocProject/Help/*.hhk 71 | DocProject/Help/*.hhp 72 | DocProject/Help/Html2 73 | DocProject/Help/html 74 | 75 | # Click-Once directory 76 | publish 77 | 78 | # Publish Web Output 79 | *.Publish.xml 80 | 81 | # NuGet Packages Directory 82 | packages 83 | 84 | # Windows Azure Build Output 85 | csx 86 | *.build.csdef 87 | 88 | # Windows Store app package directory 89 | AppPackages/ 90 | 91 | # Others 92 | [Bb]in 93 | [Oo]bj 94 | sql 95 | TestResults 96 | [Tt]est[Rr]esult* 97 | *.Cache 98 | ClientBin 99 | [Ss]tyle[Cc]op.* 100 | ~$* 101 | *.dbmdl 102 | Generated_Code #added for RIA/Silverlight projects 103 | 104 | # Backup & report files from converting an old project file to a newer 105 | # Visual Studio version. Backup files are not needed, because we have git ;-) 106 | _UpgradeReport_Files/ 107 | Backup*/ 108 | UpgradeLog*.XML 109 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/Binaries/Microsoft.Windows.Shell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaedei/ModernUIforWPF/2503fc7d1f7feb53b41b110eaf786ce8824acc60/FirstFloor.ModernUI/Binaries/Microsoft.Windows.Shell.dll -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using FirstFloor.ModernUI.Presentation; 2 | using FirstFloor.ModernUI.Windows.Controls; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Configuration; 6 | using System.Data; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | using System.Windows; 10 | 11 | namespace FirstFloor.ModernUI.App 12 | { 13 | /// 14 | /// Interaction logic for App.xaml 15 | /// 16 | public partial class App : Application 17 | { 18 | /// 19 | /// Raises the event. 20 | /// 21 | /// A that contains the event data. 22 | protected override void OnStartup(StartupEventArgs e) 23 | { 24 | base.OnStartup(e); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/ModernUI.BingImage.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/ModernUI.HelloKitty.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #f472d0 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/ModernUI.Love.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #e51400 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/ModernUI.Snowflakes.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | #0082AD 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.add.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.adobe.bridge.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.arrow.collapsed.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.arrow.corner.up.right.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.arrow.down.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.arrow.expand.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.box.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.camera.flash.off.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.camera.flash.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.camera.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.cards.club.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.cards.diamond.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.cards.heart.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.cards.spade.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/appbar.check.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/background.kitty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaedei/ModernUIforWPF/2503fc7d1f7feb53b41b110eaf786ce8824acc60/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/background.kitty.png -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/background.love.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaedei/ModernUIforWPF/2503fc7d1f7feb53b41b110eaf786ce8824acc60/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/background.love.jpg -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/background.snowflakes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaedei/ModernUIforWPF/2503fc7d1f7feb53b41b110eaf786ce8824acc60/FirstFloor.ModernUI/FirstFloor.ModernUI.App/Assets/background.snowflakes.jpg -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/BingImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Net.Http; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Xml.Linq; 13 | using System.Xml.XPath; 14 | 15 | namespace FirstFloor.ModernUI.App 16 | { 17 | /// 18 | /// Provides an attached property determining the current Bing image and assigning it to an image or imagebrush. 19 | /// 20 | public static class BingImage 21 | { 22 | public static readonly DependencyProperty UseBingImageProperty = DependencyProperty.RegisterAttached("UseBingImage", typeof(bool), typeof(BingImage), new PropertyMetadata(OnUseBingImageChanged)); 23 | 24 | private static BitmapImage cachedBingImage; 25 | 26 | private static async void OnUseBingImageChanged(DependencyObject o, DependencyPropertyChangedEventArgs e) 27 | { 28 | var newValue = (bool)e.NewValue; 29 | var image = o as Image; 30 | var imageBrush = o as ImageBrush; 31 | 32 | if (!newValue || (image == null && imageBrush == null)) { 33 | return; 34 | } 35 | 36 | if (cachedBingImage == null) { 37 | var url = await GetCurrentBingImageUrl(); 38 | if (url != null) { 39 | cachedBingImage = new BitmapImage(url); 40 | } 41 | } 42 | 43 | if (cachedBingImage != null){ 44 | if (image != null) { 45 | image.Source = cachedBingImage; 46 | } 47 | else if (imageBrush != null) { 48 | imageBrush.ImageSource = cachedBingImage; 49 | } 50 | } 51 | } 52 | 53 | private static async Task GetCurrentBingImageUrl() 54 | { 55 | var client = new HttpClient(); 56 | var result = await client.GetAsync("http://www.bing.com/hpimagearchive.aspx?format=xml&idx=0&n=2&mbl=1&mkt=en-ww"); 57 | if (result.IsSuccessStatusCode) { 58 | using (var stream = await result.Content.ReadAsStreamAsync()) { 59 | var doc = XDocument.Load(stream); 60 | 61 | var url = (string)doc.XPathSelectElement("/images/image/url"); 62 | 63 | return new Uri(string.Format(CultureInfo.InvariantCulture, "http://bing.com{0}", url), UriKind.Absolute); 64 | } 65 | } 66 | 67 | return null; 68 | } 69 | 70 | 71 | public static bool GetUseBingImage(DependencyObject o) 72 | { 73 | return (bool)o.GetValue(UseBingImageProperty); 74 | } 75 | 76 | public static void SetUseBingImage(DependencyObject o, bool value) 77 | { 78 | o.SetValue(UseBingImageProperty, value); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderImages.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderImages.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace FirstFloor.ModernUI.App.Content 17 | { 18 | /// 19 | /// Interaction logic for ContentLoaderImages.xaml 20 | /// 21 | public partial class ContentLoaderImages : UserControl 22 | { 23 | public ContentLoaderImages() 24 | { 25 | InitializeComponent(); 26 | 27 | LoadImageLinks(); 28 | } 29 | 30 | private async void LoadImageLinks() 31 | { 32 | var loader = (FlickrImageLoader)Tab.ContentLoader; 33 | 34 | // load image links and assign to tab list 35 | this.Tab.Links = await loader.GetInterestingnessListAsync(); 36 | 37 | // select first link 38 | this.Tab.SelectedSource = this.Tab.Links.Select(l => l.Source).FirstOrDefault(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderIntro.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ContentLoaderIntro.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace FirstFloor.ModernUI.App.Content 17 | { 18 | /// 19 | /// Interaction logic for ContentLoaderIntro.xaml 20 | /// 21 | public partial class ContentLoaderIntro : UserControl 22 | { 23 | public ContentLoaderIntro() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernBBCodeBlock.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernBBCodeBlock.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace FirstFloor.ModernUI.App.Content 17 | { 18 | /// 19 | /// Interaction logic for ControlsModernBBCodeBlock.xaml 20 | /// 21 | public partial class ControlsModernBBCodeBlock : UserControl 22 | { 23 | public ControlsModernBBCodeBlock() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernButton.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernButton.xaml.cs: -------------------------------------------------------------------------------- 1 | using FirstFloor.ModernUI.Windows.Controls; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | using System.Xml.Linq; 17 | 18 | namespace FirstFloor.ModernUI.App.Content 19 | { 20 | /// 21 | /// Interaction logic for ControlsModernButton.xaml 22 | /// 23 | public partial class ControlsModernButton : UserControl 24 | { 25 | public ControlsModernButton() 26 | { 27 | InitializeComponent(); 28 | 29 | // find all embedded XAML icon files 30 | var assembly = GetType().Assembly; 31 | var iconResourceNames = from name in assembly.GetManifestResourceNames() 32 | where name.StartsWith("FirstFloor.ModernUI.App.Assets.appbar.") 33 | select name; 34 | 35 | 36 | foreach (var name in iconResourceNames) { 37 | // load the resource stream 38 | using (var stream = assembly.GetManifestResourceStream(name)) { 39 | // parse the icon data using xml 40 | var doc = XDocument.Load(stream); 41 | 42 | var path = doc.Root.Element("{http://schemas.microsoft.com/winfx/2006/xaml/presentation}Path"); 43 | if (path != null) { 44 | var data = (string)path.Attribute("Data"); 45 | 46 | // create a modern button and add it to the button panel 47 | ButtonPanel.Children.Add(new ModernButton { 48 | IconData = PathGeometry.Parse(data), 49 | Margin = new Thickness(0, 0, 4, 8) 50 | }); 51 | } 52 | } 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /FirstFloor.ModernUI/FirstFloor.ModernUI.App/Content/ControlsModernDialog.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 |