├── .gitignore ├── FDSforCU.sln ├── FDSforCU ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── AboutBackgroundImage.jpg │ ├── AcrylicBackgroundImage.jpg │ ├── Images │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ └── 5.jpg │ ├── LockScreenLogo.scale-200.png │ ├── RevealBackgroundImage.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png ├── FDSforCU_TemporaryKey.pfx ├── MainPage.xaml ├── MainPage.xaml.cs ├── Models │ ├── MainPageModel.cs │ └── ModelBase.cs ├── Package.appxmanifest ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml ├── README.md ├── Simple.csproj ├── Simple.csproj.user └── Views │ ├── AboutPage.xaml │ ├── AboutPage.xaml.cs │ ├── AcrylicPage.xaml │ ├── AcrylicPage.xaml.cs │ ├── RevealPage.xaml │ └── RevealPage.xaml.cs ├── FluentDesignSystem ├── Brushes │ ├── AcrylicBackgroundSource.cs │ ├── AcrylicBrush.cs │ ├── RevealBackgroundBrush.cs │ ├── RevealBorderBrush.cs │ ├── RevealBrush.cs │ └── RevealBrushState.cs ├── FluentDesignSystem.csproj ├── Helper │ ├── RevealBrushHelper.cs │ └── RevealBrushHelperState.cs ├── Lights │ ├── RevealAmbientLight.cs │ ├── RevealBorderSpotLight.cs │ └── RevealContentSpotLight.cs ├── Properties │ ├── AssemblyInfo.cs │ └── FluentDesignSystem.rd.xml ├── ResourceDictionarys │ ├── Styles.xaml │ └── ThemeResources.xaml ├── Sketch │ └── SketchTexture.jpg └── StaticValue.cs └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | **/obj/ 2 | **/bin/ 3 | .vs/ 4 | -------------------------------------------------------------------------------- /FDSforCU.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.16 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple", "FDSforCU\Simple.csproj", "{612058F8-FA83-4566-BF5E-B512298AB57C}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentDesignSystem", "FluentDesignSystem\FluentDesignSystem.csproj", "{47E75263-FFE8-4C6C-99CF-D847C330076E}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|ARM = Debug|ARM 14 | Debug|x64 = Debug|x64 15 | Debug|x86 = Debug|x86 16 | Release|Any CPU = Release|Any CPU 17 | Release|ARM = Release|ARM 18 | Release|x64 = Release|x64 19 | Release|x86 = Release|x86 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|Any CPU.ActiveCfg = Debug|x86 23 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|ARM.ActiveCfg = Debug|ARM 24 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|ARM.Build.0 = Debug|ARM 25 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|ARM.Deploy.0 = Debug|ARM 26 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|x64.ActiveCfg = Debug|x64 27 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|x64.Build.0 = Debug|x64 28 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|x64.Deploy.0 = Debug|x64 29 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|x86.ActiveCfg = Debug|x86 30 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|x86.Build.0 = Debug|x86 31 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Debug|x86.Deploy.0 = Debug|x86 32 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|Any CPU.ActiveCfg = Release|x86 33 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|ARM.ActiveCfg = Release|ARM 34 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|ARM.Build.0 = Release|ARM 35 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|ARM.Deploy.0 = Release|ARM 36 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|x64.ActiveCfg = Release|x64 37 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|x64.Build.0 = Release|x64 38 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|x64.Deploy.0 = Release|x64 39 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|x86.ActiveCfg = Release|x86 40 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|x86.Build.0 = Release|x86 41 | {612058F8-FA83-4566-BF5E-B512298AB57C}.Release|x86.Deploy.0 = Release|x86 42 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 43 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|Any CPU.Build.0 = Debug|Any CPU 44 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|ARM.ActiveCfg = Debug|ARM 45 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|ARM.Build.0 = Debug|ARM 46 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|x64.ActiveCfg = Debug|x64 47 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|x64.Build.0 = Debug|x64 48 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|x86.ActiveCfg = Debug|x86 49 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Debug|x86.Build.0 = Debug|x86 50 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|Any CPU.ActiveCfg = Release|Any CPU 51 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|Any CPU.Build.0 = Release|Any CPU 52 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|ARM.ActiveCfg = Release|ARM 53 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|ARM.Build.0 = Release|ARM 54 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|x64.ActiveCfg = Release|x64 55 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|x64.Build.0 = Release|x64 56 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|x86.ActiveCfg = Release|x86 57 | {47E75263-FFE8-4C6C-99CF-D847C330076E}.Release|x86.Build.0 = Release|x86 58 | EndGlobalSection 59 | GlobalSection(SolutionProperties) = preSolution 60 | HideSolutionNode = FALSE 61 | EndGlobalSection 62 | GlobalSection(ExtensibilityGlobals) = postSolution 63 | SolutionGuid = {C8675F5E-A568-4131-910C-B847E4538345} 64 | EndGlobalSection 65 | EndGlobal 66 | -------------------------------------------------------------------------------- /FDSforCU/App.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /FDSforCU/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.ApplicationModel; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Navigation; 17 | 18 | namespace FDSforCU 19 | { 20 | /// 21 | /// 提供特定于应用程序的行为,以补充默认的应用程序类。 22 | /// 23 | sealed partial class App : Application 24 | { 25 | /// 26 | /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, 27 | /// 已执行,逻辑上等同于 main() 或 WinMain()。 28 | /// 29 | public App() 30 | { 31 | this.InitializeComponent(); 32 | this.Suspending += OnSuspending; 33 | } 34 | 35 | /// 36 | /// 在应用程序由最终用户正常启动时进行调用。 37 | /// 将在启动应用程序以打开特定文件等情况下使用。 38 | /// 39 | /// 有关启动请求和过程的详细信息。 40 | protected override void OnLaunched(LaunchActivatedEventArgs e) 41 | { 42 | Frame rootFrame = Window.Current.Content as Frame; 43 | 44 | // 不要在窗口已包含内容时重复应用程序初始化, 45 | // 只需确保窗口处于活动状态 46 | if (rootFrame == null) 47 | { 48 | // 创建要充当导航上下文的框架,并导航到第一页 49 | rootFrame = new Frame(); 50 | 51 | rootFrame.NavigationFailed += OnNavigationFailed; 52 | 53 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 54 | { 55 | //TODO: 从之前挂起的应用程序加载状态 56 | } 57 | 58 | // 将框架放在当前窗口中 59 | Window.Current.Content = rootFrame; 60 | } 61 | 62 | if (e.PrelaunchActivated == false) 63 | { 64 | if (rootFrame.Content == null) 65 | { 66 | // 当导航堆栈尚未还原时,导航到第一页, 67 | // 并通过将所需信息作为导航参数传入来配置 68 | // 参数 69 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 70 | } 71 | // 确保当前窗口处于活动状态 72 | Window.Current.Activate(); 73 | } 74 | } 75 | 76 | /// 77 | /// 导航到特定页失败时调用 78 | /// 79 | ///导航失败的框架 80 | ///有关导航失败的详细信息 81 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 82 | { 83 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 84 | } 85 | 86 | /// 87 | /// 在将要挂起应用程序执行时调用。 在不知道应用程序 88 | /// 无需知道应用程序会被终止还是会恢复, 89 | /// 并让内存内容保持不变。 90 | /// 91 | /// 挂起的请求的源。 92 | /// 有关挂起请求的详细信息。 93 | private void OnSuspending(object sender, SuspendingEventArgs e) 94 | { 95 | var deferral = e.SuspendingOperation.GetDeferral(); 96 | //TODO: 保存应用程序状态并停止任何后台活动 97 | deferral.Complete(); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /FDSforCU/Assets/AboutBackgroundImage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/AboutBackgroundImage.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/AcrylicBackgroundImage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/AcrylicBackgroundImage.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/Images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Images/1.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/Images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Images/2.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/Images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Images/3.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/Images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Images/4.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/Images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Images/5.jpg -------------------------------------------------------------------------------- /FDSforCU/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /FDSforCU/Assets/RevealBackgroundImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/RevealBackgroundImage.png -------------------------------------------------------------------------------- /FDSforCU/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /FDSforCU/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /FDSforCU/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /FDSforCU/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /FDSforCU/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/StoreLogo.png -------------------------------------------------------------------------------- /FDSforCU/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /FDSforCU/FDSforCU_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnbluefire/FDSforCU/07e13555787bf4f80805d25e5a66d6d7e7487199/FDSforCU/FDSforCU_TemporaryKey.pfx -------------------------------------------------------------------------------- /FDSforCU/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /FDSforCU/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using FDSforCU.Models; 2 | using FDSforCU.Views; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Collections.ObjectModel; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.InteropServices.WindowsRuntime; 9 | using Windows.ApplicationModel.Core; 10 | using Windows.Foundation; 11 | using Windows.Foundation.Collections; 12 | using Windows.UI; 13 | using Windows.UI.ViewManagement; 14 | using Windows.UI.Xaml; 15 | using Windows.UI.Xaml.Controls; 16 | using Windows.UI.Xaml.Controls.Primitives; 17 | using Windows.UI.Xaml.Data; 18 | using Windows.UI.Xaml.Input; 19 | using Windows.UI.Xaml.Media; 20 | using Windows.UI.Xaml.Navigation; 21 | 22 | // https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x804 上介绍了“空白页”项模板 23 | 24 | namespace FDSforCU 25 | { 26 | /// 27 | /// 可用于自身或导航至 Frame 内部的空白页。 28 | /// 29 | public sealed partial class MainPage : Page 30 | { 31 | public MainPage() 32 | { 33 | this.InitializeComponent(); 34 | HamburgerMenuList.Add(new MainPageModel() { Title = "亚克力笔刷", PageType = typeof(AcrylicPage) }); 35 | HamburgerMenuList.Add(new MainPageModel() { Title = "展示效果", PageType = typeof(RevealPage) }); 36 | ButtomMenuList.Add(new MainPageModel() { Title = "关于", PageType = typeof(AboutPage) }); 37 | selectedModel = new MainPageModel(); 38 | 39 | } 40 | MainPageModel selectedModel; 41 | ObservableCollection HamburgerMenuList = new ObservableCollection(); 42 | ObservableCollection ButtomMenuList = new ObservableCollection(); 43 | 44 | private void HamburgerIconButton_Click(object sender, RoutedEventArgs e) 45 | { 46 | rootSplitView.IsPaneOpen = !rootSplitView.IsPaneOpen; 47 | } 48 | 49 | private void HamburgerMenu_SelectionChanged(object sender, SelectionChangedEventArgs e) 50 | { 51 | if (sender is ListView listView) 52 | { 53 | if (listView.SelectedIndex == -1) return; 54 | if (listView == HamburgerMenu) 55 | { 56 | ButtomMenu.SelectedIndex = -1; 57 | } 58 | else if (listView == ButtomMenu) 59 | { 60 | HamburgerMenu.SelectedIndex = -1; 61 | } 62 | var item = listView.SelectedItem as MainPageModel; 63 | selectedModel.Title = item.Title; 64 | selectedModel.PageType = item.PageType; 65 | ContentFrame.Navigate(selectedModel.PageType); 66 | } 67 | 68 | } 69 | 70 | private async void HamburgerMenu_Loaded(object sender, RoutedEventArgs e) 71 | { 72 | if (sender is ListView listView) 73 | { 74 | await listView.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, () => listView.SelectedIndex = 0); 75 | } 76 | } 77 | 78 | private void TitleGrid_Loaded(object sender, RoutedEventArgs e) 79 | { 80 | if(Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Desktop") 81 | { 82 | CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true; 83 | ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; 84 | titleBar.ButtonBackgroundColor = Colors.Transparent; 85 | titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; 86 | } 87 | else 88 | { 89 | TitleGrid.Visibility = Visibility.Collapsed; 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /FDSforCU/Models/MainPageModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FDSforCU.Models 8 | { 9 | public class MainPageModel : ModelBase 10 | { 11 | private Type _PageType; 12 | private string _Title; 13 | 14 | public Type PageType 15 | { 16 | get => _PageType; 17 | set 18 | { 19 | _PageType = value; 20 | NotifyPropertyChanged(); 21 | } 22 | } 23 | public string Title 24 | { 25 | get => _Title; 26 | set 27 | { 28 | _Title = value; 29 | NotifyPropertyChanged(); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /FDSforCU/Models/ModelBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Runtime.CompilerServices; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace FDSforCU.Models 10 | { 11 | public class ModelBase : INotifyPropertyChanged 12 | { 13 | public event PropertyChangedEventHandler PropertyChanged; 14 | protected virtual void NotifyPropertyChanged([CallerMemberName]string propName = "") 15 | { 16 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /FDSforCU/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | FDSforCU 18 | blue- 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /FDSforCU/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FDSforCU Simple")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FDSforCU")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("0.1.0.0")] 28 | [assembly: AssemblyFileVersion("0.1.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /FDSforCU/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /FDSforCU/README.md: -------------------------------------------------------------------------------- 1 | Fluent Design System for Creators Update V0.2 2 | ============== 3 | Fluent Design System for Creators Update(FDS4CU)是一个UWP的资源库,将Windows10 Fall Creators Update(10.0;版本16299)SDK中的部分效果(Acrylic和Reveal)移植到Windows10 15063中。 4 | 目前支持全部的Acrylic笔刷和Button,ToggleButton,RepeatButton,SemanticZoom,AutoSuggestBox,ComboBox,ListView和GridView的Reveal效果。 5 | 6 | Acrylic笔刷如下(详细参数可见/ResourceDictionarys/ThemeResources.xaml): 7 | 8 | SystemControlAcrylicWindowBrush 9 | SystemControlAcrylicElementBrush 10 | SystemControlAccentAcrylicWindowAccentMediumHighBrush 11 | SystemControlAccentAcrylicElementAccentMediumHighBrush 12 | SystemControlAccentDark1AcrylicWindowAccentDark1Brush 13 | SystemControlAccentDark1AcrylicElementAccentDark1Brush 14 | SystemControlAccentDark2AcrylicWindowAccentDark2MediumHighBrush 15 | SystemControlAccentDark2AcrylicElementAccentDark2MediumHighBrush 16 | SystemControlAcrylicWindowMediumHighBrush 17 | SystemControlAcrylicElementMediumHighBrush 18 | SystemControlAcrylicWindowMediumBrush 19 | SystemControlAcrylicElementMediumBrush 20 | SystemControlChromeMediumLowAcrylicWindowMediumBrush 21 | SystemControlChromeMediumLowAcrylicElementMediumBrush 22 | SystemControlBaseHighAcrylicWindowBrush 23 | SystemControlBaseHighAcrylicElementBrush 24 | SystemControlBaseHighAcrylicWindowMediumHighBrush 25 | SystemControlBaseHighAcrylicElementMediumHighBrush 26 | SystemControlBaseHighAcrylicWindowMediumBrush 27 | SystemControlBaseHighAcrylicElementMediumBrush 28 | SystemControlChromeLowAcrylicWindowBrush 29 | SystemControlChromeLowAcrylicElementBrush 30 | SystemControlChromeMediumAcrylicWindowMediumBrush 31 | SystemControlChromeMediumAcrylicElementMediumBrush 32 | SystemControlChromeHighAcrylicWindowMediumBrush 33 | SystemControlChromeHighAcrylicElementMediumBrush 34 | SystemControlBaseLowAcrylicWindowBrush 35 | SystemControlBaseLowAcrylicElementBrush 36 | SystemControlBaseMediumLowAcrylicWindowMediumBrush 37 | SystemControlBaseMediumLowAcrylicElementMediumBrush 38 | SystemControlAltLowAcrylicWindowBrush 39 | SystemControlAltLowAcrylicElementBrush 40 | SystemControlAltMediumLowAcrylicWindowMediumBrush 41 | SystemControlAltMediumLowAcrylicElementMediumBrush 42 | SystemControlAltHighAcrylicWindowBrush 43 | SystemControlAltHighAcrylicElementBrush 44 | 45 | 开启Acrylic的方法如下: 46 | 在App.xaml中添加: 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 引入相关资源字典即可使用所有笔刷。 57 | 58 | *** 59 | 60 | Reveal样式如下(详细参数可见/ResourceDictionarys/Styles.xaml,AutoSuggestBox,ComboBox,ListView和GridView不需多做处理,其他需要设置Style="...RevealStyle"): 61 | 62 | ButtonRevealStyle 63 | RepeatButtonRevealStyle 64 | ToggleButtonRevealStyle 65 | SemanticZoomRevealStyle 66 | AutoSuggestBoxRevealStyle 67 | ComboBoxItemRevealStyle 68 | ListViewItemRevealStyle 69 | GridViewItemRevealStyle 70 | 71 | 自定义控件开启Reveal方式如下: 72 | 首先同上引入资源字典,然后编辑UserControl的VisualState: 73 | 74 | 77 | 78 | 79 | 80 | VisualState x:Name="Normal" /> 81 | 82 | 83 | 84 | 89 | 90 | 91 | 92 | 93 | 97 | 98 | 99 | 100 | ... 101 | 102 | 103 | 然后在后台代码中处理VisualState状态转换。 104 | 105 | *** 106 | 107 | 由于SDK接口的局限性,还有一些实现上的问题,Acrylic和Reveal表现并不是太稳定,欢迎大家Fork和反馈。 108 | 109 | By:叫我蓝火火 110 | Blog:[叫我蓝火火](http://www.cnblogs.com/blue-fire/) 111 | 微博:[Blue_Fire蓝火](http://www.weibo.com/2255001067/profile) -------------------------------------------------------------------------------- /FDSforCU/Simple.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x86 7 | {612058F8-FA83-4566-BF5E-B512298AB57C} 8 | AppContainerExe 9 | Properties 10 | FDSforCU 11 | FDSforCU 12 | zh-CN 13 | UAP 14 | 10.0.15063.0 15 | 10.0.15063.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | true 20 | FDSforCU_TemporaryKey.pfx 21 | 22 | 23 | true 24 | bin\x86\Debug\ 25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 26 | ;2008 27 | full 28 | x86 29 | false 30 | prompt 31 | true 32 | 33 | 34 | bin\x86\Release\ 35 | TRACE;NETFX_CORE;WINDOWS_UWP 36 | true 37 | ;2008 38 | pdbonly 39 | x86 40 | false 41 | prompt 42 | true 43 | true 44 | 45 | 46 | true 47 | bin\ARM\Debug\ 48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 49 | ;2008 50 | full 51 | ARM 52 | false 53 | prompt 54 | true 55 | 56 | 57 | bin\ARM\Release\ 58 | TRACE;NETFX_CORE;WINDOWS_UWP 59 | true 60 | ;2008 61 | pdbonly 62 | ARM 63 | false 64 | prompt 65 | true 66 | true 67 | 68 | 69 | true 70 | bin\x64\Debug\ 71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 72 | ;2008 73 | full 74 | x64 75 | false 76 | prompt 77 | true 78 | 79 | 80 | bin\x64\Release\ 81 | TRACE;NETFX_CORE;WINDOWS_UWP 82 | true 83 | ;2008 84 | pdbonly 85 | x64 86 | false 87 | prompt 88 | true 89 | true 90 | 91 | 92 | PackageReference 93 | 94 | 95 | 96 | App.xaml 97 | 98 | 99 | MainPage.xaml 100 | 101 | 102 | 103 | 104 | 105 | AboutPage.xaml 106 | 107 | 108 | AcrylicPage.xaml 109 | 110 | 111 | RevealPage.xaml 112 | 113 | 114 | 115 | 116 | Designer 117 | 118 | 119 | 120 | 121 | PreserveNewest 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | MSBuild:Compile 144 | Designer 145 | 146 | 147 | MSBuild:Compile 148 | Designer 149 | 150 | 151 | Designer 152 | MSBuild:Compile 153 | 154 | 155 | Designer 156 | MSBuild:Compile 157 | 158 | 159 | Designer 160 | MSBuild:Compile 161 | 162 | 163 | 164 | 165 | 5.4.0 166 | 167 | 168 | 2.0.0 169 | 170 | 171 | 172 | 173 | {47e75263-ffe8-4c6c-99cf-d847c330076e} 174 | FluentDesignSystem 175 | 176 | 177 | 178 | 14.0 179 | 180 | 181 | 188 | -------------------------------------------------------------------------------- /FDSforCU/Simple.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 30F105C9-681E-420b-A277-7C086EAD8A4E 5 | true 6 | 7 | -------------------------------------------------------------------------------- /FDSforCU/Views/AboutPage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /FDSforCU/Views/AboutPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using FDSforCU.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Runtime.InteropServices.WindowsRuntime; 7 | using Windows.Foundation; 8 | using Windows.Foundation.Collections; 9 | using Windows.Storage; 10 | using Windows.System; 11 | using Windows.UI.Xaml; 12 | using Windows.UI.Xaml.Controls; 13 | using Windows.UI.Xaml.Controls.Primitives; 14 | using Windows.UI.Xaml.Data; 15 | using Windows.UI.Xaml.Hosting; 16 | using Windows.UI.Xaml.Input; 17 | using Windows.UI.Xaml.Media; 18 | using Windows.UI.Xaml.Navigation; 19 | 20 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 21 | 22 | namespace FDSforCU.Views 23 | { 24 | /// 25 | /// 可用于自身或导航至 Frame 内部的空白页。 26 | /// 27 | public sealed partial class AboutPage : Page 28 | { 29 | public AboutPage() 30 | { 31 | this.InitializeComponent(); 32 | MDsource = new MainPageModel(); 33 | } 34 | 35 | MainPageModel MDsource; 36 | 37 | 38 | private async void MarkdownTextBlock_LinkClicked(object sender, Microsoft.Toolkit.Uwp.UI.Controls.LinkClickedEventArgs e) 39 | { 40 | await Launcher.LaunchUriAsync(new Uri(e.Link)); 41 | } 42 | 43 | private async void rootScrollViewer_Loaded(object sender, RoutedEventArgs e) 44 | { 45 | var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///README.md")); 46 | using (var stream = await file.OpenStreamForReadAsync()) 47 | { 48 | using (var reader = new StreamReader(stream)) 49 | { 50 | MDsource.Title = await reader.ReadToEndAsync(); 51 | } 52 | } 53 | 54 | var pVisual = ElementCompositionPreview.GetElementVisual(BackgroundImage); 55 | var mVisual = ElementCompositionPreview.GetElementVisual(mainStackPanel); 56 | 57 | var sPropSet = ElementCompositionPreview.GetScrollViewerManipulationPropertySet(sender as ScrollViewer); 58 | 59 | var compositor = ElementCompositionPreview.GetElementVisual(Window.Current.Content).Compositor; 60 | var pAnimation = compositor.CreateExpressionAnimation("Matrix4x4.CreateFromTranslation(Vector3(sPropSet.Translation.X ,-0.2 * mVisual.Size.Y -0.6 * sPropSet.Translation.Y , 0.0f))"); 61 | pAnimation.SetReferenceParameter("sPropSet", sPropSet); 62 | pAnimation.SetReferenceParameter("mVisual", mVisual); 63 | pVisual.StartAnimation("TransformMatrix", pAnimation); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /FDSforCU/Views/AcrylicPage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 28 | 33 | 38 | 43 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | -------------------------------------------------------------------------------- /FDSforCU/Views/AcrylicPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Hosting; 13 | using Windows.UI.Xaml.Input; 14 | using Windows.UI.Xaml.Media; 15 | using Windows.UI.Xaml.Navigation; 16 | 17 | // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 18 | 19 | namespace FDSforCU.Views 20 | { 21 | /// 22 | /// 可用于自身或导航至 Frame 内部的空白页。 23 | /// 24 | public sealed partial class AcrylicPage : Page 25 | { 26 | public AcrylicPage() 27 | { 28 | this.InitializeComponent(); 29 | } 30 | 31 | private void ToggleSwitch_Loaded(object sender, RoutedEventArgs e) 32 | { 33 | if (sender is ToggleSwitch tSwitch) 34 | { 35 | if (this.RequestedTheme == ElementTheme.Light) tSwitch.IsOn = true; 36 | else tSwitch.IsOn = false; 37 | } 38 | } 39 | 40 | private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e) 41 | { 42 | if (sender is ToggleSwitch tSwitch) 43 | { 44 | if (tSwitch.IsOn) this.RequestedTheme = ElementTheme.Light; 45 | else this.RequestedTheme = ElementTheme.Dark; 46 | } 47 | } 48 | 49 | private void AcrylicTopGrid_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) 50 | { 51 | var trans = AcrylicTopGrid.RenderTransform as TranslateTransform; 52 | var temp = trans.Y + e.Delta.Translation.Y; 53 | if (temp < 0 && temp > -AcrylicTopGrid.ActualHeight) 54 | { 55 | trans.Y = temp; 56 | } 57 | } 58 | 59 | private void AcrylicTopGrid_ManipulationStarting(object sender, ManipulationStartingRoutedEventArgs e) 60 | { 61 | RectToButtom.SkipToFill(); 62 | } 63 | 64 | private void AcrylicTopGrid_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e) 65 | { 66 | RectToButtom.Begin(); 67 | } 68 | 69 | private void Grid_SizeChanged(object sender, SizeChangedEventArgs e) 70 | { 71 | ElementBrushGridClip.Rect = new Rect(new Point(0, 0), e.NewSize); 72 | } 73 | 74 | private void AcrylicTopGrid_Tapped(object sender, TappedRoutedEventArgs e) 75 | { 76 | var trans = AcrylicTopGrid.RenderTransform as TranslateTransform; 77 | if (trans.Y == 0) 78 | RectToJump.Begin(); 79 | } 80 | 81 | private void rootScrollViewer_Loaded(object sender, RoutedEventArgs e) 82 | { 83 | var pVisual = ElementCompositionPreview.GetElementVisual(BackgroundImage); 84 | var mVisual = ElementCompositionPreview.GetElementVisual(mainStackPanel); 85 | 86 | var sPropSet = ElementCompositionPreview.GetScrollViewerManipulationPropertySet(sender as ScrollViewer); 87 | 88 | var compositor = ElementCompositionPreview.GetElementVisual(Window.Current.Content).Compositor; 89 | var pAnimation = compositor.CreateExpressionAnimation("Matrix4x4.CreateFromTranslation(Vector3(sPropSet.Translation.X ,-0.2 * mVisual.Size.Y -0.6 * sPropSet.Translation.Y , 0.0f))"); 90 | pAnimation.SetReferenceParameter("sPropSet", sPropSet); 91 | pAnimation.SetReferenceParameter("mVisual", mVisual); 92 | pVisual.StartAnimation("TransformMatrix", pAnimation); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /FDSforCU/Views/RevealPage.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |