├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── config.yml │ └── feature_request.yaml ├── assets │ └── microsoft-badge.png ├── dependabot.yml ├── labeler.yml ├── labels.yml ├── pull_request_template.md └── workflows │ ├── CI.yml │ ├── DV.yml │ ├── labeler.yml │ └── lock.yml ├── .gitignore ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── branding ├── geometric_splash.psd ├── microsoft-fluent-resources.psd ├── package.json ├── wpfui.ico ├── wpfui.png ├── wpfui.psd └── wpfui_full.png ├── build.cmd ├── docs ├── .gitignore ├── build.ps1 ├── docfx.json ├── documentation │ ├── .gitignore │ └── index.md ├── images │ ├── favicon.ico │ ├── icon-192x192.png │ ├── icon-256x256.png │ ├── icon-384x384.png │ ├── icon-512x512.png │ └── wpfui.png ├── index.md ├── manifest.webmanifest ├── robots.txt ├── templates │ ├── LICENSE │ └── singulinkfx │ │ ├── layout │ │ └── _master.tmpl │ │ ├── partials │ │ ├── footer.tmpl.partial │ │ ├── head.tmpl.partial │ │ ├── li.tmpl.partial │ │ ├── logo.tmpl.partial │ │ ├── namespace.tmpl.partial │ │ ├── navbar.tmpl.partial │ │ ├── scripts.tmpl.partial │ │ ├── searchResults.tmpl.partial │ │ └── toc.tmpl.partial │ │ ├── styles │ │ ├── down-arrow.svg │ │ ├── jquery.twbsPagination.js │ │ ├── main.js │ │ ├── singulink.js │ │ ├── url.min.js │ │ ├── wpfui.css │ │ └── wpfui.min.css │ │ └── toc.html.tmpl ├── toc.yml └── tutorial │ ├── extension.md │ ├── getting-started.md │ ├── icons.md │ ├── index.md │ ├── navigation.md │ ├── nuget.md │ ├── themes.md │ └── toc.yml ├── scripts ├── build_demo.ps1 ├── build_extension.ps1 ├── build_library.ps1 ├── dotnet_build.ps1 └── msbuild_build.ps1 └── src ├── .editorconfig ├── .vsconfig ├── Directory.Build.props ├── Packages.props ├── Wpf.Ui.Demo.sln ├── Wpf.Ui.Demo ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── Models │ ├── AppConfig.cs │ ├── Colors │ │ └── Pa__one.cs │ ├── Data │ │ ├── Customer.cs │ │ └── OrderStatus.cs │ ├── Hardware.cs │ └── Icons │ │ └── DisplayableIcon.cs ├── Resources │ ├── fluent-ui-microsoft.png │ ├── geo_icons.png │ ├── halo_infinite.jpg │ ├── master_chief.jpg │ ├── microsoft-icon-store.png │ ├── microsoft-shell-accessibility.ico │ ├── microsoft-shell-colors.ico │ ├── microsoft-shell-desktop.ico │ ├── microsoft-shell-gallery.ico │ ├── microsoft-shell-monitor.ico │ ├── microsoft-shell-settings.ico │ ├── microsoft-shell-workspace.ico │ ├── the_witcher_wallpaper.jpg │ ├── wpfui.png │ └── wpfui_full.png ├── Services │ ├── ApplicationHostService.cs │ ├── Contracts │ │ └── ITestWindowService.cs │ ├── CustomNotifyIconService.cs │ ├── PageService.cs │ └── TestWindowService.cs ├── ViewModels │ ├── ButtonsViewModel.cs │ ├── ColorsViewModel.cs │ ├── ContainerViewModel.cs │ ├── DashboardViewModel.cs │ ├── DataViewModel.cs │ ├── DebugViewModel.cs │ ├── ExperimentalViewModel.cs │ ├── IconsViewModel.cs │ ├── InputViewModel.cs │ └── TaskManagerViewModel.cs ├── Views │ ├── Container.xaml │ ├── Container.xaml.cs │ ├── Diagnostics │ │ ├── DebuggingLayerView.xaml │ │ └── DebuggingLayerView.xaml.cs │ ├── Pages │ │ ├── Buttons.xaml │ │ ├── Buttons.xaml.cs │ │ ├── Colors.xaml │ │ ├── Colors.xaml.cs │ │ ├── Controls.xaml │ │ ├── Controls.xaml.cs │ │ ├── Dashboard.xaml │ │ ├── Dashboard.xaml.cs │ │ ├── Data.xaml │ │ ├── Data.xaml.cs │ │ ├── Debug.xaml │ │ ├── Debug.xaml.cs │ │ ├── ExperimentalDashboard.xaml │ │ ├── ExperimentalDashboard.xaml.cs │ │ ├── Icons.xaml │ │ ├── Icons.xaml.cs │ │ ├── Input.xaml │ │ ├── Input.xaml.cs │ │ ├── Menus.xaml │ │ ├── Menus.xaml.cs │ │ ├── STPage.xaml │ │ ├── STPage.xaml.cs │ │ ├── TMPage.xaml │ │ └── TMPage.xaml.cs │ └── Windows │ │ ├── EditorWindow.xaml │ │ ├── EditorWindow.xaml.cs │ │ ├── ExperimentalWindow.xaml │ │ ├── ExperimentalWindow.xaml.cs │ │ ├── SettingsWindow.xaml │ │ ├── SettingsWindow.xaml.cs │ │ ├── StoreWindow.xaml │ │ ├── StoreWindow.xaml.cs │ │ ├── TaskManagerWindow.xaml │ │ └── TaskManagerWindow.xaml.cs ├── Wpf.Ui.Demo.csproj ├── app.manifest └── wpfui.ico ├── Wpf.Ui.Extension.sln ├── Wpf.Ui.Extension ├── Templates │ ├── Wpf.Ui.Mvvm.CompactNavigation │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AssemblyInfo.cs │ │ ├── Assets │ │ │ ├── applicationIcon-1024.png │ │ │ └── applicationIcon-256.png │ │ ├── Helpers │ │ │ └── EnumToBooleanConverter.cs │ │ ├── Models │ │ │ ├── AppConfig.cs │ │ │ └── DataColor.cs │ │ ├── Services │ │ │ ├── ApplicationHostService.cs │ │ │ └── PageService.cs │ │ ├── ViewModels │ │ │ ├── ContainerViewModel.cs │ │ │ ├── DashboardViewModel.cs │ │ │ ├── DataViewModel.cs │ │ │ └── SettingsViewModel.cs │ │ ├── Views │ │ │ ├── Container.xaml │ │ │ ├── Container.xaml.cs │ │ │ └── Pages │ │ │ │ ├── DashboardPage.xaml │ │ │ │ ├── DashboardPage.xaml.cs │ │ │ │ ├── DataPage.xaml │ │ │ │ ├── DataPage.xaml.cs │ │ │ │ ├── SettingsPage.xaml │ │ │ │ └── SettingsPage.xaml.cs │ │ ├── Wpf.Ui.Mvvm.CompactNavigation.Template.csproj │ │ ├── Wpf.Ui.Mvvm.CompactNavigation.csproj │ │ ├── Wpf.Ui.Mvvm.CompactNavigation.vstemplate │ │ ├── __PreviewImage.png │ │ ├── __TemplateIcon.png │ │ ├── app.manifest │ │ └── applicationIcon.ico │ ├── Wpf.Ui.Mvvm.FluentNavigation │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AssemblyInfo.cs │ │ ├── Assets │ │ │ ├── applicationIcon-1024.png │ │ │ └── applicationIcon-256.png │ │ ├── Helpers │ │ │ └── EnumToBooleanConverter.cs │ │ ├── Models │ │ │ ├── AppConfig.cs │ │ │ └── DataColor.cs │ │ ├── Services │ │ │ ├── ApplicationHostService.cs │ │ │ └── PageService.cs │ │ ├── ViewModels │ │ │ ├── ContainerViewModel.cs │ │ │ ├── DashboardViewModel.cs │ │ │ ├── DataViewModel.cs │ │ │ └── SettingsViewModel.cs │ │ ├── Views │ │ │ ├── Container.xaml │ │ │ ├── Container.xaml.cs │ │ │ └── Pages │ │ │ │ ├── DashboardPage.xaml │ │ │ │ ├── DashboardPage.xaml.cs │ │ │ │ ├── DataPage.xaml │ │ │ │ ├── DataPage.xaml.cs │ │ │ │ ├── SettingsPage.xaml │ │ │ │ └── SettingsPage.xaml.cs │ │ ├── Wpf.Ui.Mvvm.FluentNavigation.Template.csproj │ │ ├── Wpf.Ui.Mvvm.FluentNavigation.csproj │ │ ├── Wpf.Ui.Mvvm.FluentNavigation.vstemplate │ │ ├── __PreviewImage.png │ │ ├── __TemplateIcon.png │ │ ├── app.manifest │ │ └── applicationIcon.ico │ └── Wpf.Ui.Mvvm.StoreNavigation │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AssemblyInfo.cs │ │ ├── Assets │ │ ├── applicationIcon-1024.png │ │ └── applicationIcon-256.png │ │ ├── Helpers │ │ └── EnumToBooleanConverter.cs │ │ ├── Models │ │ ├── AppConfig.cs │ │ └── DataColor.cs │ │ ├── Services │ │ ├── ApplicationHostService.cs │ │ └── PageService.cs │ │ ├── ViewModels │ │ ├── ContainerViewModel.cs │ │ ├── DashboardViewModel.cs │ │ ├── DataViewModel.cs │ │ └── SettingsViewModel.cs │ │ ├── Views │ │ ├── Container.xaml │ │ ├── Container.xaml.cs │ │ └── Pages │ │ │ ├── DashboardPage.xaml │ │ │ ├── DashboardPage.xaml.cs │ │ │ ├── DataPage.xaml │ │ │ ├── DataPage.xaml.cs │ │ │ ├── SettingsPage.xaml │ │ │ └── SettingsPage.xaml.cs │ │ ├── Wpf.Ui.Mvvm.StoreNavigation.Template.csproj │ │ ├── Wpf.Ui.Mvvm.StoreNavigation.csproj │ │ ├── Wpf.Ui.Mvvm.StoreNavigation.vstemplate │ │ ├── __PreviewImage.png │ │ ├── __TemplateIcon.png │ │ ├── app.manifest │ │ └── applicationIcon.ico └── Wpf.Ui.Extension │ ├── Properties │ └── AssemblyInfo.cs │ ├── Wpf.Ui.Extension.csproj │ ├── license.txt │ ├── preview.png │ ├── source.extension.vsixmanifest │ └── wpfui.png ├── Wpf.Ui.FontMapper ├── FluentSystemIcons-Filled.json ├── FluentSystemIcons-Regular.json ├── FontSource.cs ├── License - Fluent System Icons.txt ├── Program.cs └── Wpf.Ui.FontMapper.csproj ├── Wpf.Ui.SimpleDemo ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── DashboardPage.xaml ├── DashboardPage.xaml.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Wpf.Ui.SimpleDemo.csproj ├── app.manifest ├── mwpf_icon.ico └── wpfui.ico ├── Wpf.Ui.Tools.sln ├── Wpf.Ui.sln └── Wpf.Ui ├── Animations ├── TransitionType.cs └── Transitions.cs ├── Appearance ├── Accent.cs ├── AppearanceData.cs ├── Background.cs ├── BackgroundType.cs ├── ResourceDictionaryManager.cs ├── SystemTheme.cs ├── SystemThemeType.cs ├── Theme.cs ├── ThemeChangedEvent.cs ├── ThemeType.cs ├── Watcher.cs └── WindowCornerPreference.cs ├── Common ├── Clipboard.cs ├── ControlAppearance.cs ├── DesignerHelper.cs ├── ElementPlacement.cs ├── EventIdentifier.cs ├── Glyph.cs ├── IRelayCommand.cs ├── Interfaces │ ├── INavigableView.cs │ └── INavigationAware.cs ├── ItemRange.cs ├── NavigationType.cs ├── RelayCommand.cs ├── RoutedDialogEvent.cs ├── RoutedNavigationEvent.cs ├── RoutedNavigationEventArgs.cs ├── RoutedNotifyIconEvent.cs ├── RoutedSnackbarEvent.cs ├── ScrollDirection.cs ├── SpacingMode.cs ├── SymbolFilled.cs └── SymbolRegular.cs ├── Controls ├── Anchor.bmp ├── Anchor.cs ├── Arc.bmp ├── Arc.cs ├── AutoSuggestBox.bmp ├── AutoSuggestBox.cs ├── Badge.bmp ├── Badge.cs ├── Breadcrumb.cs ├── Button.cs ├── Card.bmp ├── Card.cs ├── CardAction.bmp ├── CardAction.cs ├── CardColor.cs ├── CardControl.cs ├── CardExpander.bmp ├── CardExpander.cs ├── ClientAreaBorder.cs ├── CodeBlock.bmp ├── CodeBlock.cs ├── ControlsServices.cs ├── DataGrid.cs ├── Dialog.bmp ├── Dialog.cs ├── DropDownButton.cs ├── DynamicScrollBar.bmp ├── DynamicScrollBar.cs ├── DynamicScrollViewer.bmp ├── DynamicScrollViewer.cs ├── Flyout.cs ├── FontIcon.bmp ├── FontIcon.cs ├── Hyperlink.cs ├── InfoBar.cs ├── InfoBarSeverity.cs ├── Interfaces │ ├── IAppearanceControl.cs │ ├── IDialogControl.cs │ ├── IDpiAwareControl.cs │ ├── IIconControl.cs │ ├── INavigation.cs │ ├── INavigationControl.cs │ ├── INavigationItem.cs │ ├── ISnackbarControl.cs │ └── IThemeElement.cs ├── LoadingScreen.cs ├── MaximizeButton.cs ├── MenuItem.cs ├── MessageBox.bmp ├── MessageBox.cs ├── Navigation │ ├── NavigationBackButton.cs │ ├── NavigationBase.cs │ ├── NavigationHeader.bmp │ ├── NavigationHeader.cs │ ├── NavigationSeparator.bmp │ └── NavigationSeparator.cs ├── NavigationCompact.bmp ├── NavigationCompact.cs ├── NavigationFluent.bmp ├── NavigationFluent.cs ├── NavigationItem.bmp ├── NavigationItem.cs ├── NavigationStore.bmp ├── NavigationStore.cs ├── NavigationView.cs ├── NotifyIcon.bmp ├── NotifyIcon.cs ├── NumberBox.bmp ├── NumberBox.cs ├── PasswordBox.cs ├── ProgressBar.cs ├── ProgressRing.bmp ├── ProgressRing.cs ├── Rating.bmp ├── Rating.cs ├── Snackbar.bmp ├── Snackbar.cs ├── SplitButton.cs ├── States │ └── ThumbRateState.cs ├── SymbolIcon.bmp ├── SymbolIcon.cs ├── TextBox.cs ├── ThumbRate.bmp ├── ThumbRate.cs ├── TitleBar.cs ├── ToggleSwitch.bmp ├── ToggleSwitch.cs ├── TreeGrid.cs ├── TreeGridHeader.cs ├── TreeGridItem.cs ├── TreeViewItem.cs ├── UiPage.bmp ├── UiPage.cs ├── UiWindow.bmp ├── UiWindow.cs ├── VirtualizingGridView.cs ├── VirtualizingItemsControl.bmp ├── VirtualizingItemsControl.cs ├── VirtualizingPanelBase.cs ├── VirtualizingUniformGrid.cs ├── VirtualizingWrapPanel.bmp └── VirtualizingWrapPanel.cs ├── Converters ├── BrushToColorConverter.cs ├── FallbackBrushConverter.cs ├── IconNotEmptyConverter.cs ├── IconToStringConverter.cs ├── ObjectToSymbolConverter.cs ├── ProgressBarClipConverter.cs ├── ProgressThicknessConverter.cs └── TextToAsteriskConverter.cs ├── Dpi ├── Dpi.cs ├── DpiChangedEventArgs.cs └── DpiHelper.cs ├── Extensions ├── ColorExtensions.cs ├── ContextMenuExtensions.cs ├── DateTimeExtensions.cs ├── FrameExtensions.cs ├── SymbolExtensions.cs ├── UriExtensions.cs └── WindowExtensions.cs ├── Fonts ├── FiraCode-Regular.ttf ├── FluentSystemIcons-Filled.ttf └── FluentSystemIcons-Regular.ttf ├── Hardware ├── HardwareAcceleration.cs └── RenderingTier.cs ├── Interop ├── Dwmapi.cs ├── Kernel32.cs ├── Libraries.cs ├── ShObjIdl.cs ├── Shell32.cs ├── UnsafeNativeMethods.cs ├── UnsafeReflection.cs ├── User32.cs ├── UxTheme.cs └── WinDef │ ├── POINT.cs │ ├── POINTL.cs │ ├── POINTS.cs │ ├── RECT.cs │ ├── RECTL.cs │ ├── RefPOINT.cs │ └── SIZE.cs ├── License - Fira Code.txt ├── License - Fluent System Icons.txt ├── License - Segoe Fluent Icons.txt ├── License - VirtualizingWrapPanel.txt ├── Markup ├── ControlsDictionary.cs ├── ThemeResource.cs ├── ThemeResourceExtension.cs └── ThemesDictionary.cs ├── Mvvm ├── Contracts │ ├── IDialogService.cs │ ├── INavigationService.cs │ ├── INavigationWindow.cs │ ├── INotifyIconService.cs │ ├── IPageService.cs │ ├── ISnackbarService.cs │ ├── ITaskbarService.cs │ └── IThemeService.cs ├── Interfaces │ └── IViewModel.cs └── Services │ ├── DialogService.cs │ ├── NavigationService.cs │ ├── NotifyIconService.cs │ ├── SnackbarService.cs │ ├── TaskbarService.cs │ └── ThemeService.cs ├── Notifications └── Toast.cs ├── Properties └── AssemblyInfo.cs ├── Services └── Internal │ ├── NavigationService.cs │ ├── NavigationServiceActivator.cs │ ├── NavigationServiceExtraData.cs │ ├── NavigationServiceItem.cs │ └── NotifyIconService.cs ├── Styles ├── Assets │ ├── Accent.xaml │ ├── Fonts.xaml │ ├── Palette.xaml │ ├── StaticColors.xaml │ └── Variables.xaml ├── Common │ ├── ContextMenu.xaml │ └── FocusVisualStyle.xaml ├── Controls │ ├── Anchor.xaml │ ├── AutoSuggestBox.xaml │ ├── Badge.xaml │ ├── Breadcrumb.xaml │ ├── Button.xaml │ ├── Calendar.xaml │ ├── Card.xaml │ ├── CardAction.xaml │ ├── CardColor.xaml │ ├── CardControl.xaml │ ├── CardExpander.xaml │ ├── CheckBox.xaml │ ├── CodeBlock.xaml │ ├── ComboBox.xaml │ ├── ContextMenu.xaml │ ├── ContextMenu.xaml.cs │ ├── DataGrid.xaml │ ├── DatePicker.xaml │ ├── Dialog.xaml │ ├── DropDownButton.xaml │ ├── DynamicScrollBar.xaml │ ├── DynamicScrollViewer.xaml │ ├── Expander.xaml │ ├── Flyout.xaml │ ├── FontIcon.xaml │ ├── Frame.xaml │ ├── Hyperlink.xaml │ ├── InfoBar.xaml │ ├── ItemsControl.xaml │ ├── Label.xaml │ ├── ListBox.xaml │ ├── ListView.xaml │ ├── LoadingScreen.xaml │ ├── Menu.xaml │ ├── Menu.xaml.cs │ ├── MenuItem.xaml │ ├── MessageBox.xaml │ ├── Navigation.xaml │ ├── NavigationBackButton.xaml │ ├── NavigationCompact.xaml │ ├── NavigationFluent.xaml │ ├── NavigationHeader.xaml │ ├── NavigationSeparator.xaml │ ├── NavigationStore.xaml │ ├── NavigationView.xaml │ ├── NumberBox.xaml │ ├── Page.xaml │ ├── PasswordBox.xaml │ ├── ProgressBar.xaml │ ├── ProgressRing.xaml │ ├── RadioButton.xaml │ ├── Rating.xaml │ ├── RichTextBox.xaml │ ├── ScrollBar.xaml │ ├── ScrollViewer.xaml │ ├── Separator.xaml │ ├── Slider.xaml │ ├── Snackbar.xaml │ ├── SplitButton.xaml │ ├── StatusBar.xaml │ ├── SymbolIcon.xaml │ ├── TabControl.xaml │ ├── TextBlock.xaml │ ├── TextBox.xaml │ ├── ThumbRate.xaml │ ├── TitleBar.xaml │ ├── ToggleButton.xaml │ ├── ToggleSwitch.xaml │ ├── ToolBar.xaml │ ├── ToolTip.xaml │ ├── TreeGrid.xaml │ ├── TreeView.xaml │ ├── TreeViewItem.xaml │ ├── UiPage.xaml │ ├── UiWindow.xaml │ ├── VirtualizingGridView.xaml │ ├── VirtualizingItemsControl.xaml │ ├── VirtualizingWrapPanel.xaml │ └── Window.xaml ├── Theme │ ├── Dark.xaml │ ├── HighContrast.xaml │ └── Light.xaml └── Wpf.Ui.xaml ├── Syntax ├── Highlighter.cs └── SyntaxLanguage.cs ├── Taskbar ├── TaskbarProgress.cs └── TaskbarProgressState.cs ├── TitleBar ├── SnapLayout.cs ├── SnapLayoutButton.cs └── TitleBarButton.cs ├── Tray ├── Hicon.cs ├── INotifyIcon.cs ├── NotifyIconEvent.cs ├── TrayData.cs ├── TrayHandler.cs └── TrayManager.cs ├── ValidationRules ├── BrushToColorValidationRule.cs ├── FallbackValidationRule.cs └── ValidationRulesCollection.cs ├── VisualStudioToolsManifest.xml ├── Win32 ├── Utilities.cs ├── Win32Constant.cs └── WindowsRelease.cs └── Wpf.Ui.csproj /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # github: [lepoco] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yaml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: Create a report to help us improve 3 | title: "Bug title" 4 | labels: [bug] 5 | body: 6 | - type: textarea 7 | validations: 8 | required: true 9 | attributes: 10 | label: Describe the bug 11 | description: A clear and concise description of what the bug is 12 | - type: textarea 13 | validations: 14 | required: true 15 | attributes: 16 | label: To Reproduce 17 | description: Steps to reproduce the behavior 18 | - type: textarea 19 | validations: 20 | required: true 21 | attributes: 22 | label: Expected behavior 23 | description: A clear and concise description of what you expected to happen 24 | - type: textarea 25 | attributes: 26 | label: Screenshots 27 | description: If applicable, add screenshots to help explain your problem 28 | - type: textarea 29 | validations: 30 | required: true 31 | attributes: 32 | label: OS version 33 | description: Which OS versions did you see the issue on? 34 | - type: textarea 35 | validations: 36 | required: true 37 | attributes: 38 | label: .NET version 39 | description: Which .NET versions did you see the issue on? 40 | - type: textarea 41 | validations: 42 | required: true 43 | attributes: 44 | label: WPF-UI NuGet version 45 | description: Which WPF-UI NuGet versions did you see the issue on? 46 | - type: textarea 47 | attributes: 48 | label: Additional context 49 | description: Add any other context about the problem here -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Documentation 4 | url: https://wpfui.lepo.co/documentation/ 5 | about: Find out how WPF UI works. 6 | - name: Tutorial 7 | url: https://wpfui.lepo.co/documentation/tutorial 8 | about: Having trouble with the basics? Check out the tutorial! 9 | - name: lepo.co contact 10 | url: https://lepo.co/contact 11 | about: Do you want to establish business contact? Let us know. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yaml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for the wpfui 3 | title: "Feature request title" 4 | labels: [enhancement] 5 | body: 6 | - type: textarea 7 | validations: 8 | required: true 9 | attributes: 10 | label: Is your feature request related to a problem? Please describe 11 | description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | - type: textarea 13 | validations: 14 | required: true 15 | attributes: 16 | label: Describe the solution you'd like 17 | description: A clear and concise description of what you want to happen 18 | - type: textarea 19 | attributes: 20 | label: Describe alternatives you've considered 21 | description: A clear and concise description of any alternative solutions or features you've considered 22 | - type: textarea 23 | attributes: 24 | label: Additional context 25 | description: Add any other context or screenshots about the feature request here -------------------------------------------------------------------------------- /.github/assets/microsoft-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/.github/assets/microsoft-badge.png -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | --- 2 | PR: 3 | - "*" 4 | 5 | github_actions: 6 | - .github/workflows/* 7 | 8 | documentation: 9 | - docs/* 10 | 11 | update: 12 | - src/Directory.Build.props 13 | 14 | controls: 15 | - src/Wpf.Ui/Controls/* 16 | 17 | styles: 18 | - src/Wpf.Ui/Styles/* 19 | 20 | icons: 21 | - src/Wpf.Ui/Fonts/FluentSystemIcons-Filled.ttf 22 | - src/Wpf.Ui/Fonts/FluentSystemIcons-Regular.ttf 23 | 24 | dependencies: 25 | - src/Packages.props 26 | - branding/package.json 27 | 28 | NuGet: 29 | - src/Packages.props 30 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Pull request type 4 | 5 | 6 | 7 | Please check the type of change your PR introduces: 8 | 9 | - [ ] Update 10 | - [ ] Bugfix 11 | - [ ] Feature 12 | - [ ] Code style update (formatting, renaming) 13 | - [ ] Refactoring (no functional changes, no api changes) 14 | - [ ] Build related changes 15 | - [ ] Documentation content changes 16 | 17 | ## What is the current behavior? 18 | 19 | 20 | 21 | Issue Number: N/A 22 | 23 | ## What is the new behavior? 24 | 25 | 26 | 27 | - 28 | - 29 | 30 | ## Other information 31 | 32 | 33 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: DotNet Main 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: windows-2022 12 | steps: 13 | - uses: actions/checkout@v3 14 | - uses: dorny/paths-filter@v2 15 | id: changes 16 | with: 17 | filters: | 18 | buildprops: 19 | - 'Directory.Build.props' 20 | 21 | - name: Publish 22 | uses: alirezanet/publish-nuget@v3.0.4 23 | with: 24 | PROJECT_FILE_PATH: src/Wpf.Ui/Wpf.Ui.csproj 25 | VERSION_FILE_PATH: src/Directory.Build.props 26 | NUGET_KEY: ${{secrets.NUGET_API_KEY}} 27 | TAG_COMMIT: false 28 | -------------------------------------------------------------------------------- /.github/workflows/DV.yml: -------------------------------------------------------------------------------- 1 | name: DotNet Development 2 | 3 | on: 4 | pull_request: 5 | branches: [development] 6 | push: 7 | branches: [development] 8 | 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build: 13 | runs-on: windows-2022 14 | steps: 15 | - uses: actions/checkout@v3 16 | - uses: microsoft/setup-msbuild@v1.1 17 | with: 18 | msbuild-architecture: x64 19 | - uses: nuget/setup-nuget@v1.0.7 20 | with: 21 | nuget-version: "latest" 22 | 23 | - name: NuGet restore 24 | run: nuget restore src/Wpf.Ui.Demo.sln 25 | 26 | - name: Build 27 | run: msbuild src/Wpf.Ui.sln -p:Configuration=Release -m 28 | 29 | - name: Publish net60 30 | uses: actions/upload-artifact@v3 31 | id: publish_net6 32 | with: 33 | name: WPFUI_DEMO-NET6 34 | path: | 35 | src/Wpf.Ui.Demo/bin/Release/net6.0-windows10.0.22000.0 36 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | on: 3 | - pull_request_target 4 | 5 | jobs: 6 | triage: 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/labeler@v4 13 | with: 14 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 15 | -------------------------------------------------------------------------------- /.github/workflows/lock.yml: -------------------------------------------------------------------------------- 1 | name: "Lock" 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | 7 | jobs: 8 | lock: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: dessant/lock-threads@v3 12 | with: 13 | # https://github.com/dessant/lock-threads 14 | github-token: ${{ github.token }} 15 | issue-inactive-days: "90" 16 | exclude-issue-created-before: "" 17 | exclude-any-issue-labels: "keep-unlocked, status:awaiting response" 18 | add-issue-labels: "locked-due-to-inactivity" 19 | issue-comment: "" 20 | issue-lock-reason: "resolved" 21 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | 4 | # These owners will be the default owners for everything in the repo, 5 | # and will automatically be added as reviewers to all pull requests. 6 | * @pomianowski 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-2022 Leszek Pomianowski and WPF UI Contributors. https://dev.lepo.co/ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | At the moment, the only supported version of the **WPF UI** is the newest one. You can find it on _NuGet_. 6 | https://www.nuget.org/packages/wpf-ui/ 7 | 8 | ## Reporting a Vulnerability 9 | 10 | Security issues and bugs should be reported privately, by emailing support (at) lepo.co 11 | lepo.co does not offer Bug Bounty for the **WPF UI** library. 12 | 13 | Please do not open issues for anything you think might have a security implication. 14 | -------------------------------------------------------------------------------- /branding/geometric_splash.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/branding/geometric_splash.psd -------------------------------------------------------------------------------- /branding/microsoft-fluent-resources.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/branding/microsoft-fluent-resources.psd -------------------------------------------------------------------------------- /branding/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "homepage": "https://github.com/lepoco/wpfui", 3 | "name": "wpf-ui", 4 | "version": "1.1.0", 5 | "dependencies": { 6 | "@fluentui/react-icons": "2.0.182" 7 | } 8 | } -------------------------------------------------------------------------------- /branding/wpfui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/branding/wpfui.ico -------------------------------------------------------------------------------- /branding/wpfui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/branding/wpfui.png -------------------------------------------------------------------------------- /branding/wpfui.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/branding/wpfui.psd -------------------------------------------------------------------------------- /branding/wpfui_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/branding/wpfui_full.png -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0scripts\build_demo.ps1"""" 3 | @REM powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0scripts\build_extension.ps1"""" 4 | exit /b %ErrorLevel% -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /docs/build.ps1: -------------------------------------------------------------------------------- 1 | docfx .\docfx.json --serve -------------------------------------------------------------------------------- /docs/documentation/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /docs/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/docs/images/favicon.ico -------------------------------------------------------------------------------- /docs/images/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/docs/images/icon-192x192.png -------------------------------------------------------------------------------- /docs/images/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/docs/images/icon-256x256.png -------------------------------------------------------------------------------- /docs/images/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/docs/images/icon-384x384.png -------------------------------------------------------------------------------- /docs/images/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/docs/images/icon-512x512.png -------------------------------------------------------------------------------- /docs/images/wpfui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/docs/images/wpfui.png -------------------------------------------------------------------------------- /docs/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "theme_color": "#1f1f23", 3 | "background_color": "#1f1f23", 4 | "display": "standalone", 5 | "scope": "/", 6 | "start_url": "/", 7 | "name": "WPF UI", 8 | "short_name": "WPF UI", 9 | "description": "A simple way to make your application written in WPF keep up with modern design trends.", 10 | "icons": [ 11 | { 12 | "src": "images/icon-192x192.png", 13 | "sizes": "192x192", 14 | "type": "image/png" 15 | }, 16 | { 17 | "src": "images/icon-256x256.png", 18 | "sizes": "256x256", 19 | "type": "image/png" 20 | }, 21 | { 22 | "src": "images/icon-384x384.png", 23 | "sizes": "384x384", 24 | "type": "image/png" 25 | }, 26 | { 27 | "src": "images/icon-512x512.png", 28 | "sizes": "512x512", 29 | "type": "image/png" 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /docs/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /docs/templates/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Singulink 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/footer.tmpl.partial: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/li.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | 32 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/logo.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | 4 | {{_appName}} 5 | {{_appName}} 6 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/namespace.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 |

{{>partials/title}}

4 |
{{{summary}}}
5 |
{{{conceptual}}}
6 |
{{{remarks}}}
7 | {{#children}} 8 |

{{>partials/namespaceSubtitle}}

9 | {{#children}} 10 |
11 |
{{{summary}}}
12 | {{/children}} 13 | {{/children}} 14 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/navbar.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 |
4 |
5 | {{>partials/logo}} 6 |
7 | 8 | {{#_enableSearch}} 9 |
10 | 14 |
15 | {{/_enableSearch}} 16 | 17 | 19 |
-------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/scripts.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/searchResults.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/partials/toc.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/styles/down-arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 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 | -------------------------------------------------------------------------------- /docs/templates/singulinkfx/styles/singulink.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. 2 | 3 | function toggleMenu() { 4 | 5 | var sidebar = document.getElementById("sidebar"); 6 | var blackout = document.getElementById("blackout"); 7 | 8 | if (sidebar.style.left === "0px") 9 | { 10 | sidebar.style.left = "-" + sidebar.offsetWidth + "px"; 11 | blackout.classList.remove("showThat"); 12 | blackout.classList.add("hideThat"); 13 | } 14 | else 15 | { 16 | sidebar.style.left = "0px"; 17 | blackout.classList.remove("hideThat"); 18 | blackout.classList.add("showThat"); 19 | } 20 | } 21 | 22 | $(function() { 23 | $('table').each(function(a, tbl) { 24 | var currentTableRows = $(tbl).find('tbody tr').length; 25 | $(tbl).find('th').each(function(i) { 26 | var remove = 0; 27 | var currentTable = $(this).parents('table'); 28 | 29 | var tds = currentTable.find('tr td:nth-child(' + (i + 1) + ')'); 30 | tds.each(function(j) { if ($(this).text().trim() === '') remove++; }); 31 | 32 | if (remove == currentTableRows) { 33 | $(this).hide(); 34 | tds.hide(); 35 | } 36 | }); 37 | }); 38 | }); -------------------------------------------------------------------------------- /docs/templates/singulinkfx/toc.html.tmpl: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 |
4 |
5 | {{^_disableSideFilter}} 6 |
7 |
8 | 9 | 10 | 11 |
12 |
13 | {{/_disableSideFilter}} 14 |
15 |
16 | {{^leaf}} 17 | {{>partials/li}} 18 | {{/leaf}} 19 |
20 |
21 |
22 |
-------------------------------------------------------------------------------- /docs/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Home 2 | href: / 3 | - name: Tutorial 4 | href: tutorial/ 5 | homepage: tutorial/index.md 6 | - name: Documentation 7 | href: documentation/ 8 | homepage: documentation/index.md 9 | -------------------------------------------------------------------------------- /docs/tutorial/toc.yml: -------------------------------------------------------------------------------- 1 | - name: NuGet Package 2 | href: nuget.md 3 | - name: Visual Studio Extension 4 | href: extension.md 5 | - name: Getting started 6 | href: getting-started.md 7 | - name: Themes 8 | href: themes.md 9 | - name: Icons 10 | href: icons.md 11 | - name: Navigation 12 | href: Navigation.md 13 | -------------------------------------------------------------------------------- /scripts/build_demo.ps1: -------------------------------------------------------------------------------- 1 | . $PSScriptRoot\dotnet_build.ps1 -restore -build -solution Wpf.Ui.Demo.sln -------------------------------------------------------------------------------- /scripts/build_extension.ps1: -------------------------------------------------------------------------------- 1 | . $PSScriptRoot\msbuild_build.ps1 -restore -build -solution Wpf.Ui.Extension.sln -------------------------------------------------------------------------------- /scripts/build_library.ps1: -------------------------------------------------------------------------------- 1 | . $PSScriptRoot\dotnet_build.ps1 -restore -build -solution Wpf.Ui.sln -------------------------------------------------------------------------------- /src/.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Component.NuGet", 5 | "Microsoft.VisualStudio.Component.Roslyn.Compiler", 6 | "Microsoft.Component.MSBuild", 7 | "Microsoft.NetCore.Component.Runtime.6.0", 8 | "Microsoft.NetCore.Component.SDK", 9 | "Microsoft.Net.Component.4.7.2.TargetingPack", 10 | "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", 11 | "Microsoft.ComponentGroup.ClickOnce.Publish", 12 | "Microsoft.NetCore.Component.DevelopmentTools", 13 | "Microsoft.Net.Component.4.8.SDK", 14 | "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", 15 | "Microsoft.Component.ClickOnce", 16 | "Microsoft.VisualStudio.Component.ManagedDesktop.Core", 17 | "Microsoft.Net.Component.4.8.TargetingPack", 18 | "Microsoft.Net.Component.4.7.TargetingPack", 19 | "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", 20 | "Microsoft.VisualStudio.Component.PortableLibrary", 21 | "Microsoft.VisualStudio.Workload.ManagedDesktop", 22 | "Microsoft.Net.ComponentGroup.TargetingPacks.Common", 23 | "Microsoft.Component.CodeAnalysis.SDK", 24 | "Microsoft.Net.Component.4.6.TargetingPack", 25 | "Microsoft.NetCore.Component.Runtime.3.1", 26 | "Microsoft.NetCore.Component.Runtime.5.0", 27 | "Microsoft.Net.Component.4.6.1.TargetingPack" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/Packages.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Models/AppConfig.cs: -------------------------------------------------------------------------------- 1 | namespace Wpf.Ui.Demo.Models; 2 | 3 | public class AppConfig 4 | { 5 | public string ConfigurationsFolder { get; set; } 6 | 7 | public string AppPropertiesFileName { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Models/Colors/Pa__one.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows.Media; 7 | 8 | namespace Wpf.Ui.Demo.Models.Colors; 9 | 10 | public struct Pa__one 11 | { 12 | public string Title { get; set; } 13 | public string Subtitle { get; set; } 14 | public Brush Brush { get; set; } 15 | public string BrushKey { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Models/Data/Customer.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Models.Data; 7 | 8 | public class Customer 9 | { 10 | public string FirstName { get; set; } 11 | public string LastName { get; set; } 12 | public string Email { get; set; } 13 | public string MailTo { get; set; } 14 | public bool IsMember { get; set; } 15 | public OrderStatus Status { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Models/Data/OrderStatus.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Models.Data; 7 | public enum OrderStatus 8 | { 9 | None, 10 | New, 11 | Processing, 12 | Shipped, 13 | Received 14 | } 15 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Models/Hardware.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Collections.Generic; 8 | 9 | namespace Wpf.Ui.Demo.Models; 10 | 11 | public class Hardware 12 | { 13 | public string Name { get; set; } = String.Empty; 14 | public double Value { get; set; } = 0d; 15 | public double Min { get; set; } = 0d; 16 | public double Max { get; set; } = 0d; 17 | 18 | public IEnumerable SubItems { get; set; } = new Hardware[] { }; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Models/Icons/DisplayableIcon.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Models.Icons; 7 | 8 | public struct DisplayableIcon 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public string Code { get; set; } 15 | 16 | public string Symbol { get; set; } 17 | 18 | public Wpf.Ui.Common.SymbolRegular Icon { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/fluent-ui-microsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/fluent-ui-microsoft.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/geo_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/geo_icons.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/halo_infinite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/halo_infinite.jpg -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/master_chief.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/master_chief.jpg -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-icon-store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-icon-store.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-accessibility.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-accessibility.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-colors.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-colors.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-desktop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-desktop.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-gallery.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-gallery.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-monitor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-monitor.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-settings.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-settings.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/microsoft-shell-workspace.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/microsoft-shell-workspace.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/the_witcher_wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/the_witcher_wallpaper.jpg -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/wpfui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/wpfui.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Resources/wpfui_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/Resources/wpfui_full.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Services/Contracts/ITestWindowService.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | 8 | namespace Wpf.Ui.Demo.Services.Contracts; 9 | 10 | public interface ITestWindowService 11 | { 12 | public void Show(Type windowType); 13 | 14 | public T Show() where T : class; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/ViewModels/ButtonsViewModel.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows.Input; 7 | using CommunityToolkit.Mvvm.ComponentModel; 8 | using CommunityToolkit.Mvvm.Input; 9 | using Wpf.Ui.Mvvm.Contracts; 10 | 11 | namespace Wpf.Ui.Demo.ViewModels; 12 | 13 | public class ButtonsViewModel : ObservableObject 14 | { 15 | private readonly INavigationService _navigationService; 16 | 17 | private ICommand _showMoreCommand; 18 | 19 | public ICommand ShowMoreCommand => _showMoreCommand ??= new RelayCommand(OnShowMore); 20 | 21 | public ButtonsViewModel(INavigationService navigationService) 22 | { 23 | _navigationService = navigationService; 24 | 25 | // Experimental 26 | var testGetThemeService = App.GetService(); 27 | var currentTheme = testGetThemeService.GetSystemTheme(); 28 | } 29 | 30 | 31 | private void OnShowMore(string parameter) 32 | { 33 | _navigationService.Navigate(typeof(Views.Pages.Input)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/ViewModels/ContainerViewModel.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using CommunityToolkit.Mvvm.ComponentModel; 7 | 8 | namespace Wpf.Ui.Demo.ViewModels; 9 | 10 | public class ContainerViewModel : ObservableObject 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Buttons.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Common.Interfaces; 7 | using Wpf.Ui.Demo.ViewModels; 8 | 9 | namespace Wpf.Ui.Demo.Views.Pages; 10 | 11 | /// 12 | /// Interaction logic for Buttons.xaml 13 | /// 14 | public partial class Buttons : INavigableView 15 | { 16 | public ButtonsViewModel ViewModel 17 | { 18 | get; 19 | } 20 | 21 | public Buttons(ButtonsViewModel viewModel) 22 | { 23 | ViewModel = viewModel; 24 | 25 | InitializeComponent(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Colors.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Common.Interfaces; 7 | using Wpf.Ui.Demo.ViewModels; 8 | 9 | namespace Wpf.Ui.Demo.Views.Pages; 10 | 11 | /// 12 | /// Interaction logic for Colors.xaml 13 | /// 14 | public partial class Colors : INavigableView 15 | { 16 | public ColorsViewModel ViewModel 17 | { 18 | get; 19 | } 20 | 21 | public Colors(ColorsViewModel viewModel) 22 | { 23 | ViewModel = viewModel; 24 | 25 | InitializeComponent(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Dashboard.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Common.Interfaces; 7 | using Wpf.Ui.Demo.ViewModels; 8 | 9 | namespace Wpf.Ui.Demo.Views.Pages; 10 | 11 | /// 12 | /// Interaction logic for Dashboard.xaml 13 | /// 14 | public partial class Dashboard : INavigableView 15 | { 16 | public DashboardViewModel ViewModel 17 | { 18 | get; 19 | } 20 | 21 | public Dashboard(DashboardViewModel viewModel) 22 | { 23 | ViewModel = viewModel; 24 | 25 | InitializeComponent(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Data.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using Wpf.Ui.Common.Interfaces; 8 | using Wpf.Ui.Demo.ViewModels; 9 | 10 | namespace Wpf.Ui.Demo.Views.Pages; 11 | 12 | /// 13 | /// Interaction logic for Data.xaml 14 | /// 15 | public partial class Data : INavigableView 16 | { 17 | public DataViewModel ViewModel 18 | { 19 | get; 20 | } 21 | 22 | public Data(DataViewModel viewModel) 23 | { 24 | ViewModel = viewModel; 25 | Loaded += OnLoaded; 26 | 27 | InitializeComponent(); 28 | } 29 | 30 | private void OnLoaded(object sender, RoutedEventArgs e) 31 | { 32 | RootPanel.ScrollOwner = ScrollHost; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Debug.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using Wpf.Ui.Common.Interfaces; 8 | using Wpf.Ui.Demo.ViewModels; 9 | 10 | namespace Wpf.Ui.Demo.Views.Pages; 11 | 12 | /// 13 | /// Interaction logic for Debug.xaml 14 | /// 15 | public partial class Debug : INavigableView 16 | { 17 | //// CLASSIC 18 | //public Debug() 19 | //{ 20 | // DataContext = new DebugViewModel(); 21 | // InitializeComponent(); 22 | //} 23 | 24 | public DebugViewModel ViewModel 25 | { 26 | get; 27 | } 28 | 29 | // MVVM 30 | public Debug(DebugViewModel viewModel) 31 | { 32 | ViewModel = viewModel; 33 | 34 | InitializeComponent(); 35 | } 36 | 37 | private void FocusSwitch_Checked(object sender, RoutedEventArgs e) 38 | { 39 | if (Window.GetWindow(this) is Container window) 40 | { 41 | window.DebuggingLayer.IsFocusIndicatorEnabled = FocusSwitch.IsChecked is true; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Icons.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Common.Interfaces; 7 | using Wpf.Ui.Demo.ViewModels; 8 | 9 | namespace Wpf.Ui.Demo.Views.Pages; 10 | 11 | /// 12 | /// Interaction logic for Icons.xaml 13 | /// 14 | public partial class Icons : INavigableView 15 | { 16 | public IconsViewModel ViewModel 17 | { 18 | get; 19 | } 20 | 21 | public Icons(IconsViewModel viewModel) 22 | { 23 | ViewModel = viewModel; 24 | 25 | InitializeComponent(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Input.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using Wpf.Ui.Common.Interfaces; 8 | using Wpf.Ui.Demo.ViewModels; 9 | 10 | namespace Wpf.Ui.Demo.Views.Pages; 11 | 12 | /// 13 | /// Interaction logic for Input.xaml 14 | /// 15 | public partial class Input : INavigableView 16 | { 17 | public InputViewModel ViewModel 18 | { 19 | get; 20 | } 21 | 22 | public Input(InputViewModel viewModel) 23 | { 24 | ViewModel = viewModel; 25 | Loaded += OnLoaded; 26 | 27 | InitializeComponent(); 28 | } 29 | 30 | private void OnLoaded(object sender, RoutedEventArgs e) 31 | { 32 | RootPanel.ScrollOwner = ScrollHost; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/Menus.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Views.Pages; 7 | 8 | /// 9 | /// Interaction logic for Menus.xaml 10 | /// 11 | public partial class Menus 12 | { 13 | public Menus() 14 | { 15 | InitializeComponent(); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/STPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Views.Pages; 7 | 8 | /// 9 | /// Interaction logic for STPage.xaml 10 | /// 11 | public partial class STPage 12 | { 13 | public STPage() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | public STPage(string viewModel) 19 | { 20 | InitializeComponent(); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/TMPage.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Pages/TMPage.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Views.Pages; 7 | 8 | /// 9 | /// Interaction logic for TMPage.xaml 10 | /// 11 | public partial class TMPage 12 | { 13 | public TMPage() 14 | { 15 | InitializeComponent(); 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Windows/SettingsWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Appearance; 7 | using Wpf.Ui.Interop; 8 | 9 | namespace Wpf.Ui.Demo.Views.Windows; 10 | 11 | /// 12 | /// Interaction logic for SettingsWindow.xaml 13 | /// 14 | public partial class SettingsWindow 15 | { 16 | public SettingsWindow() 17 | { 18 | InitializeComponent(); 19 | 20 | Wpf.Ui.Appearance.Background.Apply( 21 | this, 22 | Wpf.Ui.Appearance.BackgroundType.Mica); 23 | 24 | // You can use native methods, but remember that their use is not safe. 25 | UnsafeNativeMethods.RemoveWindowTitlebar(this); 26 | UnsafeNativeMethods.ApplyWindowCornerPreference(this, WindowCornerPreference.Round); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Windows/StoreWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Demo.Views.Windows; 7 | 8 | /// 9 | /// Interaction logic for StoreWindow.xaml 10 | /// 11 | public partial class StoreWindow : Wpf.Ui.Controls.UiWindow 12 | { 13 | public StoreWindow() 14 | { 15 | InitializeComponent(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/Views/Windows/TaskManagerWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Demo.ViewModels; 7 | 8 | namespace Wpf.Ui.Demo.Views.Windows; 9 | 10 | /// 11 | /// Interaction logic for TaskManagerWindow.xaml 12 | /// 13 | public partial class TaskManagerWindow 14 | { 15 | public TaskManagerViewModel ViewModel 16 | { 17 | get; 18 | } 19 | 20 | public TaskManagerWindow(TaskManagerViewModel viewModel) 21 | { 22 | ViewModel = viewModel; 23 | DataContext = this; 24 | 25 | InitializeComponent(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Demo/wpfui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Demo/wpfui.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/App.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Assets/applicationIcon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Assets/applicationIcon-1024.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Assets/applicationIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Assets/applicationIcon-256.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Helpers/EnumToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace $safeprojectname$.Helpers 6 | { 7 | internal class EnumToBooleanConverter : IValueConverter 8 | { 9 | public EnumToBooleanConverter() 10 | { 11 | } 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if (parameter is not String enumString) 16 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 17 | 18 | if (!Enum.IsDefined(typeof(Wpf.Ui.Appearance.ThemeType), value)) 19 | throw new ArgumentException("ExceptionEnumToBooleanConverterValueMustBeAnEnum"); 20 | 21 | var enumValue = Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString); 22 | 23 | return enumValue.Equals(value); 24 | } 25 | 26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 27 | { 28 | if (parameter is not String enumString) 29 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 30 | 31 | return Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Models/AppConfig.cs: -------------------------------------------------------------------------------- 1 | namespace $safeprojectname$.Models 2 | { 3 | public class AppConfig 4 | { 5 | public string ConfigurationsFolder { get; set; } 6 | 7 | public string AppPropertiesFileName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Models/DataColor.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | 3 | namespace $safeprojectname$.Models 4 | { 5 | public struct DataColor 6 | { 7 | public Brush Color { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Services/PageService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using Wpf.Ui.Mvvm.Contracts; 4 | 5 | namespace $safeprojectname$.Services 6 | { 7 | /// 8 | /// Service that provides pages for navigation. 9 | /// 10 | public class PageService : IPageService 11 | { 12 | /// 13 | /// Service which provides the instances of pages. 14 | /// 15 | private readonly IServiceProvider _serviceProvider; 16 | 17 | /// 18 | /// Creates new instance and attaches the . 19 | /// 20 | public PageService(IServiceProvider serviceProvider) 21 | { 22 | _serviceProvider = serviceProvider; 23 | } 24 | 25 | /// 26 | public T? GetPage() where T : class 27 | { 28 | if (!typeof(FrameworkElement).IsAssignableFrom(typeof(T))) 29 | throw new InvalidOperationException("The page should be a WPF control."); 30 | 31 | return (T?)_serviceProvider.GetService(typeof(T)); 32 | } 33 | 34 | /// 35 | public FrameworkElement? GetPage(Type pageType) 36 | { 37 | if (!typeof(FrameworkElement).IsAssignableFrom(pageType)) 38 | throw new InvalidOperationException("The page should be a WPF control."); 39 | 40 | return _serviceProvider.GetService(pageType) as FrameworkElement; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/ViewModels/DashboardViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using CommunityToolkit.Mvvm.Input; 3 | using Wpf.Ui.Common.Interfaces; 4 | 5 | namespace $safeprojectname$.ViewModels 6 | { 7 | public partial class DashboardViewModel : ObservableObject, INavigationAware 8 | { 9 | [ObservableProperty] 10 | private int _counter = 0; 11 | 12 | public void OnNavigatedTo() 13 | { 14 | } 15 | 16 | public void OnNavigatedFrom() 17 | { 18 | } 19 | 20 | [RelayCommand] 21 | private void OnCounterIncrement() 22 | { 23 | Counter++; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/ViewModels/DataViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Windows.Media; 5 | using Wpf.Ui.Common.Interfaces; 6 | using $safeprojectname$.Models; 7 | 8 | namespace $safeprojectname$.ViewModels 9 | { 10 | public partial class DataViewModel : ObservableObject, INavigationAware 11 | { 12 | private bool _isInitialized = false; 13 | 14 | [ObservableProperty] 15 | private IEnumerable _colors; 16 | 17 | public void OnNavigatedTo() 18 | { 19 | if (!_isInitialized) 20 | InitializeViewModel(); 21 | } 22 | 23 | public void OnNavigatedFrom() 24 | { 25 | } 26 | 27 | private void InitializeViewModel() 28 | { 29 | var random = new Random(); 30 | var colorCollection = new List(); 31 | 32 | for (int i = 0; i < 8192; i++) 33 | colorCollection.Add(new DataColor 34 | { 35 | Color = new SolidColorBrush(Color.FromArgb( 36 | (byte)200, 37 | (byte)random.Next(0, 250), 38 | (byte)random.Next(0, 250), 39 | (byte)random.Next(0, 250))) 40 | }); 41 | 42 | Colors = colorCollection; 43 | 44 | _isInitialized = true; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Views/Pages/DashboardPage.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Views/Pages/DashboardPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for DashboardPage.xaml 7 | /// 8 | public partial class DashboardPage : INavigableView 9 | { 10 | public ViewModels.DashboardViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public DashboardPage(ViewModels.DashboardViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Views/Pages/DataPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for DataView.xaml 7 | /// 8 | public partial class DataPage : INavigableView 9 | { 10 | public ViewModels.DataViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public DataPage(ViewModels.DataViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Views/Pages/SettingsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for SettingsPage.xaml 7 | /// 8 | public partial class SettingsPage : INavigableView 9 | { 10 | public ViewModels.SettingsViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public SettingsPage(ViewModels.SettingsViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/Wpf.Ui.Mvvm.CompactNavigation.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows 6 | enable 7 | 10.0 8 | true 9 | app.manifest 10 | applicationIcon.ico 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/__PreviewImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/__PreviewImage.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/__TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/__TemplateIcon.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/applicationIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.CompactNavigation/applicationIcon.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/App.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Assets/applicationIcon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Assets/applicationIcon-1024.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Assets/applicationIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Assets/applicationIcon-256.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Helpers/EnumToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace $safeprojectname$.Helpers 6 | { 7 | internal class EnumToBooleanConverter : IValueConverter 8 | { 9 | public EnumToBooleanConverter() 10 | { 11 | } 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if (parameter is not String enumString) 16 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 17 | 18 | if (!Enum.IsDefined(typeof(Wpf.Ui.Appearance.ThemeType), value)) 19 | throw new ArgumentException("ExceptionEnumToBooleanConverterValueMustBeAnEnum"); 20 | 21 | var enumValue = Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString); 22 | 23 | return enumValue.Equals(value); 24 | } 25 | 26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 27 | { 28 | if (parameter is not String enumString) 29 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 30 | 31 | return Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Models/AppConfig.cs: -------------------------------------------------------------------------------- 1 | namespace $safeprojectname$.Models 2 | { 3 | public class AppConfig 4 | { 5 | public string ConfigurationsFolder { get; set; } 6 | 7 | public string AppPropertiesFileName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Models/DataColor.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | 3 | namespace $safeprojectname$.Models 4 | { 5 | public struct DataColor 6 | { 7 | public Brush Color { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Services/PageService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using Wpf.Ui.Mvvm.Contracts; 4 | 5 | namespace $safeprojectname$.Services 6 | { 7 | /// 8 | /// Service that provides pages for navigation. 9 | /// 10 | public class PageService : IPageService 11 | { 12 | /// 13 | /// Service which provides the instances of pages. 14 | /// 15 | private readonly IServiceProvider _serviceProvider; 16 | 17 | /// 18 | /// Creates new instance and attaches the . 19 | /// 20 | public PageService(IServiceProvider serviceProvider) 21 | { 22 | _serviceProvider = serviceProvider; 23 | } 24 | 25 | /// 26 | public T? GetPage() where T : class 27 | { 28 | if (!typeof(FrameworkElement).IsAssignableFrom(typeof(T))) 29 | throw new InvalidOperationException("The page should be a WPF control."); 30 | 31 | return (T?)_serviceProvider.GetService(typeof(T)); 32 | } 33 | 34 | /// 35 | public FrameworkElement? GetPage(Type pageType) 36 | { 37 | if (!typeof(FrameworkElement).IsAssignableFrom(pageType)) 38 | throw new InvalidOperationException("The page should be a WPF control."); 39 | 40 | return _serviceProvider.GetService(pageType) as FrameworkElement; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/ViewModels/DashboardViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using CommunityToolkit.Mvvm.Input; 3 | using Wpf.Ui.Common.Interfaces; 4 | 5 | namespace $safeprojectname$.ViewModels 6 | { 7 | public partial class DashboardViewModel : ObservableObject, INavigationAware 8 | { 9 | [ObservableProperty] 10 | private int _counter = 0; 11 | 12 | public void OnNavigatedTo() 13 | { 14 | } 15 | 16 | public void OnNavigatedFrom() 17 | { 18 | } 19 | 20 | [RelayCommand] 21 | private void OnCounterIncrement() 22 | { 23 | Counter++; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/ViewModels/DataViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Windows.Media; 5 | using Wpf.Ui.Common.Interfaces; 6 | using $safeprojectname$.Models; 7 | 8 | namespace $safeprojectname$.ViewModels 9 | { 10 | public partial class DataViewModel : ObservableObject, INavigationAware 11 | { 12 | private bool _isInitialized = false; 13 | 14 | [ObservableProperty] 15 | private IEnumerable _colors; 16 | 17 | public void OnNavigatedTo() 18 | { 19 | if (!_isInitialized) 20 | InitializeViewModel(); 21 | } 22 | 23 | public void OnNavigatedFrom() 24 | { 25 | } 26 | 27 | private void InitializeViewModel() 28 | { 29 | var random = new Random(); 30 | var colorCollection = new List(); 31 | 32 | for (int i = 0; i < 8192; i++) 33 | colorCollection.Add(new DataColor 34 | { 35 | Color = new SolidColorBrush(Color.FromArgb( 36 | (byte)200, 37 | (byte)random.Next(0, 250), 38 | (byte)random.Next(0, 250), 39 | (byte)random.Next(0, 250))) 40 | }); 41 | 42 | Colors = colorCollection; 43 | 44 | _isInitialized = true; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Views/Pages/DashboardPage.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Views/Pages/DashboardPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for DashboardPage.xaml 7 | /// 8 | public partial class DashboardPage : INavigableView 9 | { 10 | public ViewModels.DashboardViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public DashboardPage(ViewModels.DashboardViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Views/Pages/DataPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for DataView.xaml 7 | /// 8 | public partial class DataPage : INavigableView 9 | { 10 | public ViewModels.DataViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public DataPage(ViewModels.DataViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Views/Pages/SettingsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for SettingsPage.xaml 7 | /// 8 | public partial class SettingsPage : INavigableView 9 | { 10 | public ViewModels.SettingsViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public SettingsPage(ViewModels.SettingsViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/Wpf.Ui.Mvvm.FluentNavigation.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows 6 | enable 7 | 10.0 8 | true 9 | app.manifest 10 | applicationIcon.ico 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/__PreviewImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/__PreviewImage.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/__TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/__TemplateIcon.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/applicationIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.FluentNavigation/applicationIcon.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/App.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Assets/applicationIcon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Assets/applicationIcon-1024.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Assets/applicationIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Assets/applicationIcon-256.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Helpers/EnumToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace $safeprojectname$.Helpers 6 | { 7 | internal class EnumToBooleanConverter : IValueConverter 8 | { 9 | public EnumToBooleanConverter() 10 | { 11 | } 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if (parameter is not String enumString) 16 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 17 | 18 | if (!Enum.IsDefined(typeof(Wpf.Ui.Appearance.ThemeType), value)) 19 | throw new ArgumentException("ExceptionEnumToBooleanConverterValueMustBeAnEnum"); 20 | 21 | var enumValue = Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString); 22 | 23 | return enumValue.Equals(value); 24 | } 25 | 26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 27 | { 28 | if (parameter is not String enumString) 29 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 30 | 31 | return Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Models/AppConfig.cs: -------------------------------------------------------------------------------- 1 | namespace $safeprojectname$.Models 2 | { 3 | public class AppConfig 4 | { 5 | public string ConfigurationsFolder { get; set; } 6 | 7 | public string AppPropertiesFileName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Models/DataColor.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | 3 | namespace $safeprojectname$.Models 4 | { 5 | public struct DataColor 6 | { 7 | public Brush Color { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Services/PageService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using Wpf.Ui.Mvvm.Contracts; 4 | 5 | namespace $safeprojectname$.Services 6 | { 7 | /// 8 | /// Service that provides pages for navigation. 9 | /// 10 | public class PageService : IPageService 11 | { 12 | /// 13 | /// Service which provides the instances of pages. 14 | /// 15 | private readonly IServiceProvider _serviceProvider; 16 | 17 | /// 18 | /// Creates new instance and attaches the . 19 | /// 20 | public PageService(IServiceProvider serviceProvider) 21 | { 22 | _serviceProvider = serviceProvider; 23 | } 24 | 25 | /// 26 | public T? GetPage() where T : class 27 | { 28 | if (!typeof(FrameworkElement).IsAssignableFrom(typeof(T))) 29 | throw new InvalidOperationException("The page should be a WPF control."); 30 | 31 | return (T?)_serviceProvider.GetService(typeof(T)); 32 | } 33 | 34 | /// 35 | public FrameworkElement? GetPage(Type pageType) 36 | { 37 | if (!typeof(FrameworkElement).IsAssignableFrom(pageType)) 38 | throw new InvalidOperationException("The page should be a WPF control."); 39 | 40 | return _serviceProvider.GetService(pageType) as FrameworkElement; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/ViewModels/DashboardViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using CommunityToolkit.Mvvm.Input; 3 | using Wpf.Ui.Common.Interfaces; 4 | 5 | namespace $safeprojectname$.ViewModels 6 | { 7 | public partial class DashboardViewModel : ObservableObject, INavigationAware 8 | { 9 | [ObservableProperty] 10 | private int _counter = 0; 11 | 12 | public void OnNavigatedTo() 13 | { 14 | } 15 | 16 | public void OnNavigatedFrom() 17 | { 18 | } 19 | 20 | [RelayCommand] 21 | private void OnCounterIncrement() 22 | { 23 | Counter++; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/ViewModels/DataViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Windows.Media; 5 | using Wpf.Ui.Common.Interfaces; 6 | using $safeprojectname$.Models; 7 | 8 | namespace $safeprojectname$.ViewModels 9 | { 10 | public partial class DataViewModel : ObservableObject, INavigationAware 11 | { 12 | private bool _isInitialized = false; 13 | 14 | [ObservableProperty] 15 | private IEnumerable _colors; 16 | 17 | public void OnNavigatedTo() 18 | { 19 | if (!_isInitialized) 20 | InitializeViewModel(); 21 | } 22 | 23 | public void OnNavigatedFrom() 24 | { 25 | } 26 | 27 | private void InitializeViewModel() 28 | { 29 | var random = new Random(); 30 | var colorCollection = new List(); 31 | 32 | for (int i = 0; i < 8192; i++) 33 | colorCollection.Add(new DataColor 34 | { 35 | Color = new SolidColorBrush(Color.FromArgb( 36 | (byte)200, 37 | (byte)random.Next(0, 250), 38 | (byte)random.Next(0, 250), 39 | (byte)random.Next(0, 250))) 40 | }); 41 | 42 | Colors = colorCollection; 43 | 44 | _isInitialized = true; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Views/Pages/DashboardPage.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Views/Pages/DashboardPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for DashboardPage.xaml 7 | /// 8 | public partial class DashboardPage : INavigableView 9 | { 10 | public ViewModels.DashboardViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public DashboardPage(ViewModels.DashboardViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Views/Pages/DataPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for DataView.xaml 7 | /// 8 | public partial class DataPage : INavigableView 9 | { 10 | public ViewModels.DataViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public DataPage(ViewModels.DataViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Views/Pages/SettingsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Wpf.Ui.Common.Interfaces; 2 | 3 | namespace $safeprojectname$.Views.Pages 4 | { 5 | /// 6 | /// Interaction logic for SettingsPage.xaml 7 | /// 8 | public partial class SettingsPage : INavigableView 9 | { 10 | public ViewModels.SettingsViewModel ViewModel 11 | { 12 | get; 13 | } 14 | 15 | public SettingsPage(ViewModels.SettingsViewModel viewModel) 16 | { 17 | ViewModel = viewModel; 18 | 19 | InitializeComponent(); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/Wpf.Ui.Mvvm.StoreNavigation.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows 6 | enable 7 | 10.0 8 | true 9 | app.manifest 10 | applicationIcon.ico 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/__PreviewImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/__PreviewImage.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/__TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/__TemplateIcon.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/applicationIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Templates/Wpf.Ui.Mvvm.StoreNavigation/applicationIcon.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Wpf.Ui.Extension/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("WPF UI")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("WPF UI")] 12 | [assembly: AssemblyCopyright("")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // Version information for an assembly consists of the following four values: 22 | // 23 | // Major Version 24 | // Minor Version 25 | // Build Number 26 | // Revision 27 | // 28 | // You can specify all the values or you can default the Build and Revision Numbers 29 | // by using the '*' as shown below: 30 | // [assembly: AssemblyVersion("1.0.*")] 31 | [assembly: AssemblyVersion("1.0.0.0")] 32 | [assembly: AssemblyFileVersion("1.0.0.0")] 33 | -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Wpf.Ui.Extension/license.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-2022 Leszek Pomianowski and WPF UI Contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Wpf.Ui.Extension/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Wpf.Ui.Extension/preview.png -------------------------------------------------------------------------------- /src/Wpf.Ui.Extension/Wpf.Ui.Extension/wpfui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.Extension/Wpf.Ui.Extension/wpfui.png -------------------------------------------------------------------------------- /src/Wpf.Ui.FontMapper/FontSource.cs: -------------------------------------------------------------------------------- 1 | namespace Wpf.Ui.FontMapper; 2 | 3 | struct FontSource 4 | { 5 | public string Name { get; set; } 6 | public string Description { get; set; } 7 | public string SourcePath { get; set; } 8 | public string DestinationPath { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/Wpf.Ui.FontMapper/License - Fluent System Icons.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Exe 6 | net6.0 7 | enable 8 | enable 9 | 10.0 10 | 11 | 12 | 13 | 14 | Always 15 | 16 | 17 | Always 18 | 19 | 20 | PreserveNewest 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/App.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.SimpleDemo; 7 | 8 | /// 9 | /// Interaction logic for App.xaml 10 | /// 11 | public partial class App 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.SimpleDemo; 7 | 8 | /// 9 | /// Interaction logic for MainWindow.xaml 10 | /// 11 | public partial class MainWindow 12 | { 13 | public MainWindow() 14 | { 15 | InitializeComponent(); 16 | 17 | Wpf.Ui.Appearance.Accent.ApplySystemAccent(); 18 | 19 | // Wpf.Ui.Appearance.Theme.ApplyDarkThemeToWindow(this); 20 | // Wpf.Ui.Appearance.Background.Apply(this, Wpf.Ui.Appearance.BackgroundType.Mica); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/Wpf.Ui.SimpleDemo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows10.0.22000.0 6 | enable 7 | true 8 | 10.0 9 | 7.0 10 | wpfui.ico 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/mwpf_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.SimpleDemo/mwpf_icon.ico -------------------------------------------------------------------------------- /src/Wpf.Ui.SimpleDemo/wpfui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui.SimpleDemo/wpfui.ico -------------------------------------------------------------------------------- /src/Wpf.Ui/Animations/TransitionType.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Animations; 7 | 8 | /// 9 | /// Available types of transitions. 10 | /// 11 | public enum TransitionType 12 | { 13 | /// 14 | /// None. 15 | /// 16 | None, 17 | 18 | /// 19 | /// Change opacity. 20 | /// 21 | FadeIn, 22 | 23 | /// 24 | /// Change opacity and slide from bottom. 25 | /// 26 | FadeInWithSlide, 27 | 28 | /// 29 | /// Slide from bottom. 30 | /// 31 | SlideBottom, 32 | 33 | /// 34 | /// Slide from the right side. 35 | /// 36 | SlideRight, 37 | 38 | /// 39 | /// Slide from the left side. 40 | /// 41 | SlideLeft, 42 | } 43 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Appearance/BackgroundType.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Appearance; 7 | 8 | /// 9 | /// Collection of fluent background types. 10 | /// 11 | public enum BackgroundType 12 | { 13 | /// 14 | /// Unknown background type. 15 | /// 16 | Unknown, 17 | 18 | /// 19 | /// No backdrop effect. 20 | /// 21 | None, 22 | 23 | /// 24 | /// Sets DWMWA_SYSTEMBACKDROP_TYPE to . 25 | /// 26 | Auto, 27 | 28 | /// 29 | /// Windows 11 Mica effect. 30 | /// 31 | Mica, 32 | 33 | /// 34 | /// Windows Acrylic effect. 35 | /// 36 | Acrylic, 37 | 38 | /// 39 | /// Windows Aero effect 40 | /// 41 | Aero, 42 | 43 | /// 44 | /// Windows 11 wallpaper blur effect. 45 | /// 46 | Tabbed, 47 | 48 | /// 49 | /// Disables all the Background processing code. 50 | /// 51 | Disable 52 | } 53 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Appearance/SystemThemeType.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Appearance; 7 | 8 | /// 9 | /// Collection of Windows 11 themes. 10 | /// 11 | public enum SystemThemeType 12 | { 13 | /// 14 | /// Unknown Windows theme. 15 | /// 16 | Unknown, 17 | 18 | /// 19 | /// Custom Windows theme. 20 | /// 21 | Custom, 22 | 23 | /// 24 | /// Default light theme. 25 | /// 26 | Light, 27 | 28 | /// 29 | /// Default dark theme. 30 | /// 31 | Dark, 32 | 33 | /// 34 | /// First custom, kinda purple Windows 11 theme. 35 | /// 36 | Glow, 37 | 38 | /// 39 | /// Second custom, kinda red Windows 11 theme. 40 | /// 41 | CapturedMotion, 42 | 43 | /// 44 | /// Third custom, kinda washed off cyan Windows 11 theme. 45 | /// 46 | Sunrise, 47 | 48 | /// 49 | /// Fourth custom, kinda gray Windows 11 theme. 50 | /// 51 | Flow 52 | } 53 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Appearance/ThemeChangedEvent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows.Media; 7 | 8 | namespace Wpf.Ui.Appearance; 9 | 10 | /// 11 | /// Event triggered when application theme is updated. 12 | /// 13 | /// Current application . 14 | /// Current base system accent . 15 | public delegate void ThemeChangedEvent(ThemeType currentTheme, Color systemAccent); 16 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Appearance/ThemeType.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Appearance; 7 | 8 | /// 9 | /// Collection of application themes. 10 | /// 11 | public enum ThemeType 12 | { 13 | /// 14 | /// Unknown application theme. 15 | /// 16 | Unknown, 17 | 18 | /// 19 | /// Dark application theme. 20 | /// 21 | Dark, 22 | 23 | /// 24 | /// Light application theme. 25 | /// 26 | Light, 27 | 28 | /// 29 | /// High contract application theme. 30 | /// 31 | HighContrast 32 | } 33 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Appearance/WindowCornerPreference.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Appearance; 7 | 8 | /// 9 | /// Ways you can round windows. 10 | /// 11 | public enum WindowCornerPreference 12 | { 13 | /// 14 | /// Determined by system or application preference. 15 | /// 16 | Default, 17 | 18 | /// 19 | /// Do not round the corners. 20 | /// 21 | DoNotRound, 22 | 23 | /// 24 | /// Round the corners. 25 | /// 26 | Round, 27 | 28 | /// 29 | /// Round the corners slightly. 30 | /// 31 | RoundSmall 32 | } 33 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/Clipboard.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Threading; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// Provides methods to place data on and retrieve data from the system clipboard. 13 | /// 14 | public static class Clipboard 15 | { 16 | /// 17 | /// Set the text data to Clipboard. 18 | /// 19 | public static void SetText(string text) 20 | { 21 | try 22 | { 23 | Thread thread = new(() => System.Windows.Clipboard.SetText(text)); 24 | 25 | thread.SetApartmentState(ApartmentState.STA); //Set the thread to STA 26 | thread.Start(); 27 | //thread.Join(); 28 | } 29 | catch (Exception e) 30 | { 31 | Console.WriteLine(e); 32 | throw; 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/ControlAppearance.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Common; 7 | 8 | /// 9 | /// Types of the available color accents of the controls. 10 | /// 11 | public enum ControlAppearance 12 | { 13 | /// 14 | /// Control color according to the current theme accent. 15 | /// 16 | Primary, 17 | 18 | /// 19 | /// Control color according to the current theme element. 20 | /// 21 | Secondary, 22 | 23 | /// 24 | /// Blue color theme. 25 | /// 26 | Info, 27 | 28 | /// 29 | /// Dark color theme. 30 | /// 31 | Dark, 32 | 33 | /// 34 | /// Light color theme. 35 | /// 36 | Light, 37 | 38 | /// 39 | /// Red color theme. 40 | /// 41 | Danger, 42 | 43 | /// 44 | /// Green color theme. 45 | /// 46 | Success, 47 | 48 | /// 49 | /// Orange color theme. 50 | /// 51 | Caution, 52 | 53 | /// 54 | /// Transparent color theme. 55 | /// 56 | Transparent 57 | } 58 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/DesignerHelper.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Windows; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// Helper class for Visual Studio designer. 13 | /// 14 | public static class DesignerHelper 15 | { 16 | private static bool _validated = false; 17 | 18 | private static bool _isInDesignMode = false; 19 | 20 | /// 21 | /// Indicates whether the project is currently in design mode. 22 | /// 23 | public static bool IsInDesignMode 24 | { 25 | get 26 | { 27 | if (_isInDesignMode) 28 | return true; 29 | 30 | if (_validated) 31 | _isInDesignMode = (bool)(DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)) 32 | ?.DefaultValue ?? false); 33 | 34 | _validated = true; 35 | 36 | return _isInDesignMode; 37 | } 38 | } 39 | 40 | /// 41 | /// Indicates whether the project is currently debugged. 42 | /// 43 | public static bool IsDebugging => System.Diagnostics.Debugger.IsAttached; 44 | } 45 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/ElementPlacement.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Common; 7 | 8 | /// 9 | /// Decides where to put the element. 10 | /// 11 | public enum ElementPlacement 12 | { 13 | /// 14 | /// Puts the control element on the left. 15 | /// 16 | Left, 17 | 18 | /// 19 | /// Puts the control element on the right. 20 | /// 21 | Right 22 | } 23 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/EventIdentifier.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using Wpf.Ui.Extensions; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// Class used to create identifiers of threads or tasks that can be performed multiple times within one instance. 13 | /// represents roughly the time in microseconds at which it was taken. 14 | /// 15 | internal class EventIdentifier 16 | { 17 | /// 18 | /// Current identifier. 19 | /// 20 | public long Current { get; internal set; } = 0; 21 | 22 | /// 23 | /// Creates and gets the next identifier. 24 | /// 25 | public long GetNext() 26 | { 27 | UpdateIdentifier(); 28 | 29 | return Current; 30 | } 31 | 32 | /// 33 | /// Checks if the identifiers are the same. 34 | /// 35 | public bool IsEqual(long storedId) => Current == storedId; 36 | 37 | /// 38 | /// Creates and assigns a random value with an extra time code if possible. 39 | /// 40 | private void UpdateIdentifier() => Current = DateTime.Now.GetMicroTimestamp(); 41 | } 42 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/IRelayCommand.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows.Input; 7 | 8 | namespace Wpf.Ui.Common; 9 | 10 | /// 11 | /// A command whose sole purpose is to relay its functionality to other objects by invoking delegates. The 12 | /// default return value for the method is . 13 | /// 14 | public interface IRelayCommand : ICommand 15 | { 16 | /// 17 | /// Gets encapsulated canExecute function. 18 | /// 19 | /// 20 | public new bool CanExecute(object parameter); 21 | 22 | /// 23 | /// Triggers action with provided parameter. 24 | /// 25 | /// Argument to be passed. 26 | public new void Execute(object parameter); 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/Interfaces/INavigableView.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Controls.Interfaces; 7 | 8 | namespace Wpf.Ui.Common.Interfaces; 9 | 10 | /// 11 | /// A view whose ViewModel is separate from the DataContext and can be navigated by . 12 | /// 13 | public interface INavigableView 14 | { 15 | /// 16 | /// ViewModel used by the view. 17 | /// Optionally, it may implement and be navigated by . 18 | /// 19 | T ViewModel { get; } 20 | } 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/Interfaces/INavigationAware.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Common.Interfaces; 7 | 8 | /// 9 | /// Notifies class about being navigated. 10 | /// 11 | public interface INavigationAware 12 | { 13 | /// 14 | /// Method triggered when the class is navigated. 15 | /// 16 | void OnNavigatedTo(); 17 | 18 | /// 19 | /// Method triggered when the navigation leaves the current class. 20 | /// 21 | void OnNavigatedFrom(); 22 | } 23 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/ItemRange.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Based on VirtualizingWrapPanel created by S. Bäumlisberger licensed under MIT license. 4 | // https://github.com/sbaeumlisberger/VirtualizingWrapPanel 5 | // Copyright (C) S. Bäumlisberger, Leszek Pomianowski and WPF UI Contributors. 6 | // All Rights Reserved. 7 | 8 | namespace Wpf.Ui.Common; 9 | 10 | /// 11 | /// Items range. 12 | /// Based on . 13 | /// 14 | public struct ItemRange 15 | { 16 | public int StartIndex { get; } 17 | public int EndIndex { get; } 18 | 19 | public ItemRange(int startIndex, int endIndex) : this() 20 | { 21 | StartIndex = startIndex; 22 | EndIndex = endIndex; 23 | } 24 | 25 | public bool Contains(int itemIndex) 26 | { 27 | return itemIndex >= StartIndex && itemIndex <= EndIndex; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/NavigationType.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Common; 7 | 8 | public enum NavigationType 9 | { 10 | Fluent, 11 | Compact, 12 | Store 13 | } 14 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/RoutedDialogEvent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | using System.Windows; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// Event triggered on via . 13 | /// 14 | /// Current instance. 15 | #if NET5_0_OR_GREATER 16 | public delegate void RoutedDialogEvent([NotNull] Controls.Dialog sender, RoutedEventArgs e); 17 | #else 18 | public delegate void RoutedDialogEvent(Controls.Dialog sender, RoutedEventArgs e); 19 | #endif 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/RoutedNavigationEvent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | using Wpf.Ui.Controls.Interfaces; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// Event triggered on successful navigation. 13 | /// 14 | /// Current navigation instance. 15 | #if NET5_0_OR_GREATER 16 | public delegate void RoutedNavigationEvent([NotNull] INavigation sender, RoutedNavigationEventArgs e); 17 | #else 18 | public delegate void RoutedNavigationEvent(INavigation sender, RoutedNavigationEventArgs e); 19 | #endif 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/RoutedNavigationEventArgs.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using Wpf.Ui.Controls.Interfaces; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// with additional . 13 | /// 14 | public class RoutedNavigationEventArgs : RoutedEventArgs 15 | { 16 | /// 17 | /// Currently displayed page. 18 | /// 19 | public INavigationItem CurrentPage { get; set; } 20 | 21 | /// 22 | /// Constructor for . 23 | /// 24 | /// The new value that the SourceProperty is being set to. 25 | /// The new value that the Property is being set to. 26 | /// Currently displayed page. 27 | public RoutedNavigationEventArgs(RoutedEvent routedEvent, object source, INavigationItem currentPage) : base( 28 | routedEvent, source) 29 | { 30 | CurrentPage = currentPage; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/RoutedNotifyIconEvent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | using System.Windows; 8 | using Wpf.Ui.Controls; 9 | 10 | namespace Wpf.Ui.Common; 11 | 12 | /// 13 | /// Event triggered on successful navigation. 14 | /// 15 | /// Current navigation instance. 16 | #if NET5_0_OR_GREATER 17 | public delegate void RoutedNotifyIconEvent([NotNull] NotifyIcon sender, RoutedEventArgs e); 18 | #else 19 | public delegate void RoutedNotifyIconEvent(NotifyIcon sender, RoutedEventArgs e); 20 | #endif 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/RoutedSnackbarEvent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | using System.Windows; 8 | 9 | namespace Wpf.Ui.Common; 10 | 11 | /// 12 | /// Event triggered on via . 13 | /// 14 | /// Current instance. 15 | #if NET5_0_OR_GREATER 16 | public delegate void RoutedSnackbarEvent([NotNull] Controls.Snackbar sender, RoutedEventArgs e); 17 | #else 18 | public delegate void RoutedSnackbarEvent(Controls.Snackbar sender, RoutedEventArgs e); 19 | #endif 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/ScrollDirection.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Based on VirtualizingWrapPanel created by S. Bäumlisberger licensed under MIT license. 4 | // https://github.com/sbaeumlisberger/VirtualizingWrapPanel 5 | // Copyright (C) S. Bäumlisberger, Leszek Pomianowski and WPF UI Contributors. 6 | // All Rights Reserved. 7 | 8 | namespace Wpf.Ui.Common; 9 | 10 | /// 11 | /// Direction of . 12 | /// Based on . 13 | /// 14 | public enum ScrollDirection 15 | { 16 | /// 17 | /// Vertical scroll direction. 18 | /// 19 | Vertical, 20 | 21 | /// 22 | /// Horizontal scroll direction. 23 | /// 24 | Horizontal 25 | } 26 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Common/SpacingMode.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Based on VirtualizingWrapPanel created by S. Bäumlisberger licensed under MIT license. 4 | // https://github.com/sbaeumlisberger/VirtualizingWrapPanel 5 | // Copyright (C) S. Bäumlisberger, Leszek Pomianowski and WPF UI Contributors. 6 | // All Rights Reserved. 7 | 8 | namespace Wpf.Ui.Common; 9 | 10 | /// 11 | /// Specifies how remaining space is distributed. 12 | /// Based on . 13 | /// 14 | public enum SpacingMode 15 | { 16 | /// 17 | /// Spacing is disabled and all items will be arranged as closely as possible. 18 | /// 19 | None, 20 | 21 | /// 22 | /// The remaining space is evenly distributed between the items on a layout row, as well as the start and end of each row. 23 | /// 24 | Uniform, 25 | 26 | /// 27 | /// The remaining space is evenly distributed between the items on a layout row, excluding the start and end of each row. 28 | /// 29 | BetweenItemsOnly, 30 | 31 | /// 32 | /// The remaining space is evenly distributed between start and end of each row. 33 | /// 34 | StartAndEndOnly 35 | } 36 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Anchor.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Anchor.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Arc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Arc.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/AutoSuggestBox.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/AutoSuggestBox.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Badge.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Badge.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Badge.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Drawing; 8 | using System.Windows; 9 | using Wpf.Ui.Controls.Interfaces; 10 | 11 | // https://docs.microsoft.com/en-us/fluent-ui/web-components/components/badge 12 | 13 | namespace Wpf.Ui.Controls; 14 | 15 | /// 16 | /// Used to highlight an item, attract attention or flag status. 17 | /// 18 | [ToolboxItem(true)] 19 | [ToolboxBitmap(typeof(Badge), "Badge.bmp")] 20 | public class Badge : System.Windows.Controls.ContentControl, IAppearanceControl 21 | { 22 | /// 23 | /// Property for . 24 | /// 25 | public static readonly DependencyProperty AppearanceProperty = DependencyProperty.Register(nameof(Appearance), 26 | typeof(Common.ControlAppearance), typeof(Badge), 27 | new PropertyMetadata(Common.ControlAppearance.Primary)); 28 | 29 | /// 30 | public Common.ControlAppearance Appearance 31 | { 32 | get => (Common.ControlAppearance)GetValue(AppearanceProperty); 33 | set => SetValue(AppearanceProperty, value); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Card.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Card.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/CardAction.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/CardAction.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/CardExpander.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/CardExpander.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/CodeBlock.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/CodeBlock.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/ControlsServices.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | 8 | namespace Wpf.Ui.Controls; 9 | 10 | /// 11 | /// Used to initialize the library controls with static values. 12 | /// 13 | public static class ControlsServices 14 | { 15 | #if NET48_OR_GREATER || NETCOREAPP3_0_OR_GREATER 16 | internal static IServiceProvider ControlsServiceProvider { get; private set; } 17 | 18 | /// 19 | /// Accepts a ServiceProvider for configuring dependency injection. 20 | /// 21 | /// 22 | /// 23 | public static void Initialize(IServiceProvider serviceProvider) 24 | { 25 | if (serviceProvider == null) 26 | throw new ArgumentNullException(nameof(serviceProvider)); 27 | 28 | ControlsServiceProvider = serviceProvider; 29 | } 30 | #endif 31 | } 32 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Dialog.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Dialog.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/DropDownButton.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls; 7 | 8 | /// 9 | /// A control that drop downs a flyout of choices from which one can be chosen. 10 | /// 11 | public class DropDownButton : System.Windows.Controls.Button 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/DynamicScrollBar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/DynamicScrollBar.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/DynamicScrollViewer.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/DynamicScrollViewer.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/FontIcon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/FontIcon.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/FontIcon.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Drawing; 8 | using System.Windows; 9 | 10 | namespace Wpf.Ui.Controls; 11 | 12 | /// 13 | /// Represents a text element containing an icon glyph with selectable font family. 14 | /// 15 | [ToolboxItem(true)] 16 | [ToolboxBitmap(typeof(FontIcon), "FontIcon.bmp")] 17 | public class FontIcon : System.Windows.Controls.Control 18 | { 19 | /// 20 | /// Property for . 21 | /// 22 | public static readonly DependencyProperty GlyphProperty = DependencyProperty.Register( 23 | nameof(Glyph), 24 | typeof(char), 25 | typeof(FontIcon), 26 | new PropertyMetadata('\uE006') 27 | ); 28 | 29 | /// 30 | /// Gets or sets displayed . 31 | /// 32 | public char Glyph 33 | { 34 | get => (char)GetValue(GlyphProperty); 35 | set => SetValue(GlyphProperty, value); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/InfoBarSeverity.cs: -------------------------------------------------------------------------------- 1 | namespace Wpf.Ui.Controls 2 | { 3 | public enum InfoBarSeverity 4 | { 5 | /// 6 | /// Communicates that the InfoBar is displaying general information that requires the user's attention. 7 | /// 8 | Informational = 0, 9 | 10 | /// 11 | /// Communicates that the InfoBar is displaying information regarding a long-running and/or background task 12 | /// that has completed successfully. 13 | /// 14 | Success = 1, 15 | 16 | /// 17 | /// Communicates that the InfoBar is displaying information regarding a condition that might cause a problem in 18 | /// the future. 19 | /// 20 | Warning = 2, 21 | 22 | /// 23 | /// Communicates that the InfoBar is displaying information regarding an error or problem that has occurred. 24 | /// 25 | Error = 3 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Interfaces/IAppearanceControl.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Common; 7 | 8 | namespace Wpf.Ui.Controls.Interfaces; 9 | 10 | /// 11 | /// UI with attributes. 12 | /// 13 | public interface IAppearanceControl 14 | { 15 | /// 16 | /// Gets or sets the of the control, if available. 17 | /// 18 | public Common.ControlAppearance Appearance { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Interfaces/IDpiAwareControl.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls.Interfaces; 7 | 8 | /// 9 | /// The control that should react to changes in the screen DPI. 10 | /// 11 | public interface IDpiAwareControl 12 | { 13 | Dpi.Dpi CurrentWindowDpi { get; } 14 | } 15 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Interfaces/IIconControl.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows.Media; 7 | 8 | namespace Wpf.Ui.Controls.Interfaces; 9 | 10 | /// 11 | /// UI with attributes. 12 | /// 13 | public interface IIconControl 14 | { 15 | /// 16 | /// Gets or sets displayed . 17 | /// 18 | Common.SymbolRegular Icon { get; set; } 19 | 20 | /// 21 | /// Defines whether or not we should use the . 22 | /// 23 | bool IconFilled { get; set; } 24 | 25 | /// 26 | /// Foreground of the . 27 | /// 28 | Brush IconForeground { get; set; } 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Interfaces/INavigationControl.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls.Interfaces; 7 | 8 | /// 9 | /// An interface element that can be part of a navigation list. 10 | /// 11 | public interface INavigationControl 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Interfaces/IThemeElement.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls.Interfaces; 7 | 8 | /// 9 | /// Control changing its properties or appearance depending on the theme. 10 | /// 11 | public interface IThemeControl 12 | { 13 | /// 14 | /// The theme is currently set. 15 | /// 16 | public Appearance.ThemeType Theme { get; } 17 | } 18 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/LoadingScreen.cs: -------------------------------------------------------------------------------- 1 | namespace Wpf.Ui.Controls; 2 | 3 | /// 4 | /// Prestyled loading screen with . 5 | /// 6 | public class LoadingScreen : System.Windows.Controls.ContentControl 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/MaximizeButton.cs: -------------------------------------------------------------------------------- 1 | namespace Wpf.Ui.Controls; 2 | 3 | internal class MaximizeButton : System.Windows.Controls.Button 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/MessageBox.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/MessageBox.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Navigation/NavigationHeader.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Navigation/NavigationHeader.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Navigation/NavigationSeparator.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Navigation/NavigationSeparator.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Navigation/NavigationSeparator.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Drawing; 8 | using Wpf.Ui.Controls.Interfaces; 9 | 10 | namespace Wpf.Ui.Controls.Navigation; 11 | 12 | [ToolboxItem(true)] 13 | [ToolboxBitmap(typeof(NavigationSeparator), "NavigationSeparator.bmp")] 14 | public class NavigationSeparator : System.Windows.Controls.Separator, INavigationControl 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NavigationCompact.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/NavigationCompact.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NavigationFluent.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/NavigationFluent.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NavigationFluent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Drawing; 8 | 9 | namespace Wpf.Ui.Controls; 10 | 11 | /// 12 | /// Modern navigation styled according to the principles of Fluent Design for Windows 11. 13 | /// 14 | [ToolboxItem(true)] 15 | [ToolboxBitmap(typeof(NavigationFluent), "NavigationFluent.bmp")] 16 | public class NavigationFluent : Wpf.Ui.Controls.Navigation.NavigationBase 17 | { 18 | // XAML 19 | } 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NavigationItem.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/NavigationItem.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NavigationStore.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/NavigationStore.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NavigationStore.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Drawing; 8 | 9 | namespace Wpf.Ui.Controls; 10 | 11 | /// 12 | /// Modern navigation styled according to the principles of Fluent Design for Windows 11. 13 | /// 14 | [ToolboxItem(true)] 15 | [ToolboxBitmap(typeof(NavigationStore), "NavigationStore.bmp")] 16 | public class NavigationStore : Wpf.Ui.Controls.Navigation.NavigationBase 17 | { 18 | // XAML 19 | } 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NotifyIcon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/NotifyIcon.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/NumberBox.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/NumberBox.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/ProgressBar.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Windows; 3 | 4 | namespace Wpf.Ui.Controls; 5 | 6 | public class ProgressBar : System.Windows.Controls.ProgressBar 7 | { 8 | /// 9 | /// Property for . 10 | /// 11 | public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register( 12 | nameof(CornerRadius), 13 | typeof(CornerRadius), typeof(ProgressBar), 14 | new PropertyMetadata(new CornerRadius(4))); 15 | 16 | /// 17 | /// Property for . 18 | /// 19 | public static readonly DependencyProperty IndicatorCornerRadiusProperty = DependencyProperty.Register( 20 | nameof(IndicatorCornerRadius), 21 | typeof(CornerRadius), typeof(ProgressBar), 22 | new PropertyMetadata(new CornerRadius(4))); 23 | 24 | [Bindable(true), Category("Appearance")] 25 | public CornerRadius CornerRadius 26 | { 27 | get => (CornerRadius)GetValue(CornerRadiusProperty); 28 | set => SetValue(CornerRadiusProperty, value); 29 | } 30 | 31 | [Bindable(true), Category("Appearance")] 32 | public CornerRadius IndicatorCornerRadius 33 | { 34 | get => (CornerRadius)GetValue(IndicatorCornerRadiusProperty); 35 | set => SetValue(IndicatorCornerRadiusProperty, value); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/ProgressRing.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/ProgressRing.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Rating.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Rating.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/Snackbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/Snackbar.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/SplitButton.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls; 7 | 8 | /// 9 | /// The is a , but with an addition execution hit target. 10 | /// 11 | public class SplitButton : Wpf.Ui.Controls.DropDownButton 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/States/ThumbRateState.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls.States; 7 | 8 | /// 9 | /// States of the control. 10 | /// 11 | public enum ThumbRateState 12 | { 13 | /// 14 | /// No thumb has been clicked. 15 | /// 16 | None, 17 | 18 | /// 19 | /// The thumb up has been clicked. 20 | /// 21 | Liked, 22 | 23 | /// 24 | /// The thumb down has been clicked. 25 | /// 26 | Disliked 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/SymbolIcon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/SymbolIcon.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/ThumbRate.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/ThumbRate.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/ToggleSwitch.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/ToggleSwitch.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/ToggleSwitch.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.ComponentModel; 7 | using System.Drawing; 8 | 9 | namespace Wpf.Ui.Controls; 10 | 11 | /// 12 | /// Use to present users with two mutally exclusive options (like on/off). 13 | /// 14 | [ToolboxItem(true)] 15 | [ToolboxBitmap(typeof(ToggleSwitch), "ToggleSwitch.bmp")] 16 | public class ToggleSwitch : System.Windows.Controls.Primitives.ToggleButton 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/TreeGridItem.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Controls; 7 | 8 | /// 9 | /// Work in progress. 10 | /// 11 | public class TreeGridItem : System.Windows.Controls.Control 12 | { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/UiPage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/UiPage.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/UiWindow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/UiWindow.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/VirtualizingItemsControl.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/VirtualizingItemsControl.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/VirtualizingUniformGrid.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | 8 | namespace Wpf.Ui.Controls; 9 | 10 | /// 11 | /// Work in progress. 12 | /// 13 | [Obsolete] 14 | internal class VirtualizingUniformGrid : System.Windows.Controls.Control 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Controls/VirtualizingWrapPanel.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Controls/VirtualizingWrapPanel.bmp -------------------------------------------------------------------------------- /src/Wpf.Ui/Converters/BrushToColorConverter.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows.Data; 8 | using System.Windows.Media; 9 | 10 | namespace Wpf.Ui.Converters; 11 | 12 | /// 13 | /// Converts to . 14 | /// 15 | internal class BrushToColorConverter : IValueConverter 16 | { 17 | /// 18 | /// Converts to . 19 | /// 20 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 21 | { 22 | if (value is SolidColorBrush brush) 23 | return brush.Color; 24 | 25 | if (value is Color) 26 | return value; 27 | 28 | // We draw red to visibly see an invalid bind in the UI. 29 | return new Color { A = 255, R = 255, G = 0, B = 0 }; 30 | } 31 | 32 | /// 33 | /// Not Implemented. 34 | /// 35 | /// 36 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 37 | { 38 | throw new NotImplementedException(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Converters/FallbackBrushConverter.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows.Data; 8 | using System.Windows.Media; 9 | 10 | namespace Wpf.Ui.Converters; 11 | 12 | /// 13 | /// Converts to . 14 | /// 15 | internal class FallbackBrushConverter : IValueConverter 16 | { 17 | /// 18 | /// Converts to . 19 | /// 20 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 21 | { 22 | if (value is SolidColorBrush brush) 23 | return brush; 24 | 25 | if (value is Color) 26 | return new SolidColorBrush((Color)value); 27 | 28 | // We draw red to visibly see an invalid bind in the UI. 29 | return new SolidColorBrush(new Color { A = 255, R = 255, G = 0, B = 0 }); 30 | } 31 | 32 | /// 33 | /// Not Implemented. 34 | /// 35 | /// 36 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 37 | { 38 | throw new NotImplementedException(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Converters/IconNotEmptyConverter.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows.Data; 8 | 9 | namespace Wpf.Ui.Converters; 10 | 11 | /// 12 | /// Checks if the is valid and not empty. 13 | /// 14 | internal class IconNotEmptyConverter : IValueConverter 15 | { 16 | /// 17 | /// Checks if the is valid and not empty. 18 | /// 19 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 20 | { 21 | if (value is Common.SymbolRegular icon) 22 | return icon != Common.SymbolRegular.Empty; 23 | 24 | return false; 25 | } 26 | 27 | /// 28 | /// Not Implemented. 29 | /// 30 | /// 31 | public object ConvertBack(object value, Type targetType, object parameter, 32 | System.Globalization.CultureInfo culture) 33 | { 34 | throw new NotImplementedException(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Converters/ProgressBarClipConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Media; 8 | using System.Windows; 9 | using System.Windows.Data; 10 | 11 | namespace Wpf.Ui.Converters 12 | { 13 | internal class ProgressBarClipConverter : IMultiValueConverter 14 | { 15 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | if (values.Length == 3 && 18 | values[0] is double width && 19 | values[1] is double height && 20 | values[2] is CornerRadius radius) 21 | { 22 | var clip = new RectangleGeometry(new Rect(0, 0, width, height), radius.TopLeft, radius.TopLeft); 23 | clip.Freeze(); 24 | 25 | return clip; 26 | } 27 | 28 | return DependencyProperty.UnsetValue; 29 | } 30 | 31 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Converters/ProgressThicknessConverter.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows.Data; 8 | 9 | namespace Wpf.Ui.Converters; 10 | 11 | /// 12 | /// Converts Height to Thickness. 13 | /// 14 | class ProgressThicknessConverter : IValueConverter 15 | { 16 | /// 17 | /// Checks if the is valid and not empty. 18 | /// 19 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 20 | { 21 | // TODO: It's too hardcoded, we should define better formula. 22 | 23 | if (value is double height) 24 | return height / 8; 25 | 26 | return 12.0d; 27 | } 28 | 29 | /// 30 | /// Not Implemented. 31 | /// 32 | /// 33 | public object ConvertBack(object value, Type targetType, object parameter, 34 | System.Globalization.CultureInfo culture) 35 | { 36 | throw new NotImplementedException(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Converters/TextToAsteriskConverter.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows.Data; 8 | 9 | namespace Wpf.Ui.Converters; 10 | 11 | internal class TextToAsteriskConverter : IValueConverter 12 | { 13 | /// 14 | /// Converts to . 15 | /// 16 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 17 | { 18 | return new String('*', value?.ToString()?.Length ?? 0); 19 | } 20 | 21 | /// 22 | /// Not Implemented. 23 | /// 24 | /// 25 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Dpi/DpiChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | using System.Windows; 6 | 7 | namespace Wpf.Ui.Dpi; 8 | 9 | public sealed class DpiChangedEventArgs : RoutedEventArgs 10 | { 11 | /// 12 | /// Gets the scale information after a DPI change. 13 | /// 14 | public Dpi NewDpi { get; } 15 | 16 | /// 17 | /// Gets the DPI scale information before a DPI change. 18 | /// 19 | public Dpi OldDpi { get; } 20 | } 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Extensions/ContextMenuExtensions.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Interop; 9 | using Wpf.Ui.Appearance; 10 | using Wpf.Ui.Interop; 11 | 12 | namespace Wpf.Ui.Extensions; 13 | 14 | /// 15 | /// Extensions for the . 16 | /// 17 | internal static class ContextMenuExtensions 18 | { 19 | /// 20 | /// Tries to apply Mica effect to the . 21 | /// 22 | public static void ApplyMica(this ContextMenu contextMenu) 23 | { 24 | contextMenu.Opened += ContextMenuOnOpened; 25 | } 26 | 27 | private static void ContextMenuOnOpened(object sender, RoutedEventArgs e) 28 | { 29 | if (sender is not ContextMenu contextMenu) 30 | return; 31 | 32 | var source = PresentationSource.FromVisual(contextMenu) as HwndSource; 33 | 34 | if (source == null) 35 | return; 36 | 37 | if (Theme.GetAppTheme() == ThemeType.Dark) 38 | UnsafeNativeMethods.ApplyWindowDarkMode(source.Handle); 39 | 40 | // Needs more work with the Popup service 41 | 42 | //if (Background.Apply(source.Handle, BackgroundType.Mica)) 43 | // contextMenu.Background = Brushes.Transparent; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Extensions/FrameExtensions.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | 9 | namespace Wpf.Ui.Extensions; 10 | 11 | /// 12 | /// Set of extensions for . 13 | /// 14 | public static class FrameExtensions 15 | { 16 | /// 17 | /// Gets from . 18 | /// 19 | /// Selected frame. 20 | /// DataContext of currently active element, otherwise . 21 | public static object GetDataContext(this Frame frame) 22 | { 23 | return frame.Content is not FrameworkElement element ? null : element.DataContext; 24 | } 25 | 26 | /// 27 | /// Cleans journal. 28 | /// 29 | /// Selected frame. 30 | public static void CleanNavigation(this Frame frame) 31 | { 32 | while (frame.CanGoBack) 33 | frame.RemoveBackEntry(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Fonts/FiraCode-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Fonts/FiraCode-Regular.ttf -------------------------------------------------------------------------------- /src/Wpf.Ui/Fonts/FluentSystemIcons-Filled.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Fonts/FluentSystemIcons-Filled.ttf -------------------------------------------------------------------------------- /src/Wpf.Ui/Fonts/FluentSystemIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloxstraplabs/wpfui/f710123e72d9dcc8d09fccc4e2a783cc5cf5e652/src/Wpf.Ui/Fonts/FluentSystemIcons-Regular.ttf -------------------------------------------------------------------------------- /src/Wpf.Ui/Hardware/HardwareAcceleration.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows.Media; 7 | 8 | namespace Wpf.Ui.Hardware; 9 | 10 | /// 11 | /// Set of tools for hardware acceleration. 12 | /// 13 | public static class HardwareAcceleration 14 | { 15 | /// 16 | /// Determines whether the provided rendering tier is supported. 17 | /// 18 | /// Hardware acceleration rendering tier to check. 19 | /// if tier is supported. 20 | public static bool IsSupported(RenderingTier tier) 21 | { 22 | return RenderCapability.Tier >> 16 >= (int)tier; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Interop/WinDef/POINT.cs: -------------------------------------------------------------------------------- 1 | // This Source Code is partially based on reverse engineering of the Windows Operating System, 2 | // and is intended for use on Windows systems only. 3 | // This Source Code is partially based on the source code provided by the .NET Foundation. 4 | // This Source Code Form is subject to the terms of the MIT License. 5 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 6 | // Copyright (C) Leszek Pomianowski. 7 | // All Rights Reserved. 8 | 9 | using System.Runtime.InteropServices; 10 | 11 | namespace Wpf.Ui.Interop.WinDef; 12 | 13 | /// 14 | /// The POINT structure defines the x- and y-coordinates of a point. 15 | /// 16 | [StructLayout(LayoutKind.Sequential)] 17 | // ReSharper disable InconsistentNaming 18 | public struct POINT 19 | { 20 | /// 21 | /// Specifies the x-coordinate of the point. 22 | /// 23 | public int x; 24 | 25 | /// 26 | /// Specifies the y-coordinate of the point. 27 | /// 28 | public int y; 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Interop/WinDef/POINTL.cs: -------------------------------------------------------------------------------- 1 | // This Source Code is partially based on reverse engineering of the Windows Operating System, 2 | // and is intended for use on Windows systems only. 3 | // This Source Code is partially based on the source code provided by the .NET Foundation. 4 | // This Source Code Form is subject to the terms of the MIT License. 5 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 6 | // Copyright (C) Leszek Pomianowski. 7 | // All Rights Reserved. 8 | 9 | using System.Runtime.InteropServices; 10 | 11 | namespace Wpf.Ui.Interop.WinDef; 12 | 13 | /// 14 | /// The structure defines the x- and y-coordinates of a point. 15 | /// 16 | [StructLayout(LayoutKind.Sequential)] 17 | // ReSharper disable InconsistentNaming 18 | public struct POINTL 19 | { 20 | /// 21 | /// Specifies the x-coordinate of the point. 22 | /// 23 | public long x; 24 | 25 | /// 26 | /// Specifies the y-coordinate of the point. 27 | /// 28 | public long y; 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Interop/WinDef/POINTS.cs: -------------------------------------------------------------------------------- 1 | // This Source Code is partially based on reverse engineering of the Windows Operating System, 2 | // and is intended for use on Windows systems only. 3 | // This Source Code is partially based on the source code provided by the .NET Foundation. 4 | // This Source Code Form is subject to the terms of the MIT License. 5 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 6 | // Copyright (C) Leszek Pomianowski. 7 | // All Rights Reserved. 8 | 9 | using System.Runtime.InteropServices; 10 | 11 | namespace Wpf.Ui.Interop.WinDef; 12 | 13 | /// 14 | /// The POINTL structure defines the x- and y-coordinates of a point. 15 | /// 16 | [StructLayout(LayoutKind.Sequential)] 17 | // ReSharper disable InconsistentNaming 18 | public struct POINTS 19 | { 20 | /// 21 | /// Specifies the x-coordinate of the point. 22 | /// 23 | public short x; 24 | 25 | /// 26 | /// Specifies the y-coordinate of the point. 27 | /// 28 | public short y; 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Interop/WinDef/RefPOINT.cs: -------------------------------------------------------------------------------- 1 | // This Source Code is partially based on reverse engineering of the Windows Operating System, 2 | // and is intended for use on Windows systems only. 3 | // This Source Code is partially based on the source code provided by the .NET Foundation. 4 | // This Source Code Form is subject to the terms of the MIT License. 5 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 6 | // Copyright (C) Leszek Pomianowski. 7 | // All Rights Reserved. 8 | 9 | using System.Runtime.InteropServices; 10 | 11 | namespace Wpf.Ui.Interop.WinDef; 12 | 13 | /// 14 | /// structure by reference. 15 | /// 16 | [StructLayout(LayoutKind.Sequential)] 17 | // ReSharper disable InconsistentNaming 18 | public class RefPOINT 19 | { 20 | /// 21 | /// Specifies the x-coordinate of the point. 22 | /// 23 | public int x; 24 | 25 | /// 26 | /// Specifies the y-coordinate of the point. 27 | /// 28 | public int y; 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Interop/WinDef/SIZE.cs: -------------------------------------------------------------------------------- 1 | // This Source Code is partially based on reverse engineering of the Windows Operating System, 2 | // and is intended for use on Windows systems only. 3 | // This Source Code is partially based on the source code provided by the .NET Foundation. 4 | // This Source Code Form is subject to the terms of the MIT License. 5 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 6 | // Copyright (C) Leszek Pomianowski. 7 | // All Rights Reserved. 8 | 9 | using System.Runtime.InteropServices; 10 | 11 | namespace Wpf.Ui.Interop.WinDef; 12 | 13 | /// 14 | /// The SIZE structure defines the width and height of a rectangle. 15 | /// 16 | [StructLayout(LayoutKind.Sequential)] 17 | // ReSharper disable InconsistentNaming 18 | public struct SIZE 19 | { 20 | /// 21 | /// Specifies the rectangle's width. The units depend on which function uses this structure. 22 | /// 23 | public long cx; 24 | 25 | /// 26 | /// Specifies the rectangle's height. The units depend on which function uses this structure. 27 | /// 28 | public long cy; 29 | } 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/License - Fluent System Icons.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui/License - Segoe Fluent Icons.txt: -------------------------------------------------------------------------------- 1 | You may use the Segoe and icon fonts, or glyphs included in this file (“Software”) solely to design, develop and test your programs that run on a Microsoft Platform, a Microsoft Platform includes but is not limited to any hardware or software product or service branded by trademark, trade dress, copyright or some other recognized means, as a product or service of Microsoft. This license does not grant you the right to distribute or sublicense all or part of the Software to any third party. By using the Software, you agree to these terms. If you do not agree to these terms, do not use the Software. -------------------------------------------------------------------------------- /src/Wpf.Ui/License - VirtualizingWrapPanel.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 S. Bäumlisberger 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Markup/ControlsDictionary.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows; 8 | using System.Windows.Markup; 9 | using Wpf.Ui.Appearance; 10 | 11 | namespace Wpf.Ui.Markup; 12 | 13 | /// 14 | /// Provides a dictionary implementation that contains WPF UI controls resources used by components and other elements of a WPF application. 15 | /// 16 | [Localizability(LocalizationCategory.Ignore)] 17 | [Ambient] 18 | [UsableDuringInitialization(true)] 19 | public class ControlsDictionary : ResourceDictionary 20 | { 21 | /// 22 | /// Default constructor defining of the WPF UI controls dictionary. 23 | /// 24 | public ControlsDictionary() 25 | => Source = new Uri($"{AppearanceData.LibraryDictionariesUri}{AppearanceData.LibraryMainDictionary}.xaml", UriKind.Absolute); 26 | } 27 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Markup/ThemeResourceExtension.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.ComponentModel; 8 | using System.Windows; 9 | using System.Windows.Markup; 10 | 11 | namespace Wpf.Ui.Markup; 12 | 13 | /// 14 | /// Class for Xaml markup extension for static resource references. 15 | /// 16 | [TypeConverter(typeof(DynamicResourceExtensionConverter))] 17 | [MarkupExtensionReturnType(typeof(object))] 18 | public class ThemeResourceExtension : DynamicResourceExtension 19 | { 20 | /// 21 | /// Constructor that takes no parameters 22 | /// 23 | public ThemeResourceExtension() 24 | { 25 | ResourceKey = ThemeResource.ApplicationBackgroundBrush.ToString(); 26 | } 27 | 28 | /// 29 | /// Constructor that takes the resource key that this is a static reference to. 30 | /// 31 | public ThemeResourceExtension(ThemeResource resourceKey) 32 | { 33 | if (resourceKey == ThemeResource.Unknown) 34 | throw new ArgumentNullException(nameof(resourceKey)); 35 | 36 | ResourceKey = resourceKey.ToString(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Markup/ThemesDictionary.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows; 8 | using System.Windows.Markup; 9 | using Wpf.Ui.Appearance; 10 | 11 | namespace Wpf.Ui.Markup; 12 | 13 | /// 14 | /// Provides a dictionary implementation that contains WPF UI theme resources used by components and other elements of a WPF application. 15 | /// 16 | [Localizability(LocalizationCategory.Ignore)] 17 | [Ambient] 18 | [UsableDuringInitialization(true)] 19 | public class ThemesDictionary : ResourceDictionary 20 | { 21 | /// 22 | /// Sets the default application theme. 23 | /// 24 | public ThemeType Theme 25 | { 26 | set 27 | { 28 | var themeName = value switch 29 | { 30 | ThemeType.Dark => "Dark", 31 | ThemeType.HighContrast => "HighContrast", 32 | _ => "Light" 33 | }; 34 | 35 | Source = new Uri($"{AppearanceData.LibraryThemeDictionariesUri}{themeName}.xaml", UriKind.Absolute); 36 | } 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Mvvm/Contracts/IDialogService.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using Wpf.Ui.Controls.Interfaces; 7 | 8 | namespace Wpf.Ui.Mvvm.Contracts; 9 | 10 | /// 11 | /// Represents a contract with the service that provides global . 12 | /// 13 | public interface IDialogService 14 | { 15 | /// 16 | /// Sets the 17 | /// 18 | /// 19 | void SetDialogControl(IDialogControl dialog); 20 | 21 | /// 22 | /// Provides direct access to the 23 | /// 24 | /// Instance of the control. 25 | IDialogControl GetDialogControl(); 26 | } 27 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Mvvm/Contracts/IPageService.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | #nullable enable 7 | 8 | using System; 9 | using System.Windows; 10 | using Wpf.Ui.Controls.Interfaces; 11 | 12 | namespace Wpf.Ui.Mvvm.Contracts; 13 | 14 | /// 15 | /// Represents a contract with the service that provides the pages for . 16 | /// 17 | public interface IPageService 18 | { 19 | /// 20 | /// Takes a page of the given type. 21 | /// 22 | /// Page type. 23 | /// Instance of the registered page. 24 | public T? GetPage() where T : class; 25 | 26 | /// 27 | /// Takes a page of the given type. 28 | /// 29 | /// Page type. 30 | /// Instance of the registered page. 31 | public FrameworkElement? GetPage(Type pageType); 32 | } 33 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Mvvm/Interfaces/IViewModel.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Windows; 7 | using Wpf.Ui.Controls.Interfaces; 8 | 9 | namespace Wpf.Ui.Mvvm.Interfaces; 10 | 11 | /// 12 | /// Represents a model used in views. 13 | /// 14 | public interface IViewModel 15 | { 16 | /// 17 | /// Triggered when the model is mounted to the view using the . 18 | /// 19 | /// 20 | public void OnMounted(FrameworkElement parentElement); 21 | } 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Mvvm/Services/DialogService.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | #nullable enable 7 | 8 | using System; 9 | using Wpf.Ui.Controls.Interfaces; 10 | using Wpf.Ui.Mvvm.Contracts; 11 | 12 | namespace Wpf.Ui.Mvvm.Services; 13 | 14 | /// 15 | /// A service that provides methods related to displaying the . 16 | /// 17 | public class DialogService : IDialogService 18 | { 19 | private IDialogControl? _dialogControl; 20 | 21 | /// 22 | public void SetDialogControl(IDialogControl dialog) 23 | { 24 | _dialogControl = dialog; 25 | } 26 | 27 | /// 28 | public IDialogControl GetDialogControl() 29 | { 30 | if (_dialogControl is null) 31 | throw new InvalidOperationException( 32 | $"The ${typeof(DialogService)} cannot be used unless previously defined with {typeof(IDialogControl)}.{nameof(SetDialogControl)}()."); 33 | 34 | return _dialogControl; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Notifications/Toast.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Notifications; 7 | 8 | internal class Toast 9 | { 10 | // TODO: Implement native Toast without external libraries 11 | } 12 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Runtime.InteropServices; 7 | using System.Windows.Markup; 8 | 9 | [assembly: ComVisible(false)] 10 | 11 | [assembly: Guid("072fb71f-784e-4113-9da0-a506ff1a0cd5")] 12 | 13 | [assembly: XmlnsPrefix("http://schemas.lepo.co/wpfui/2022/xaml", "ui")] 14 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui")] 15 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui.Controls")] 16 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui.Common")] 17 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui.Markup")] 18 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui.Converters")] 19 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui.ValidationRules")] 20 | [assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml", "Wpf.Ui.Controls.Navigation")] 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Services/Internal/NavigationServiceExtraData.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Services.Internal; 7 | 8 | /// 9 | /// Additional data passed through the method. 10 | /// 11 | internal struct NavigationServiceExtraData 12 | { 13 | /// 14 | /// Current page id. 15 | /// 16 | public int PageId { get; set; } 17 | 18 | /// 19 | /// Whether we should use the cache. 20 | /// 21 | public bool Cache { get; set; } 22 | 23 | /// 24 | /// Additional . 25 | /// 26 | public object DataContext { get; set; } 27 | } 28 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Assets/Fonts.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | Segoe Ui 13 | 14 | Segoe Fluent Icons 15 | 16 | 17 | pack://application:,,,/Wpf.Ui;component/Fonts/#FluentSystemIcons-Regular 18 | 19 | 20 | pack://application:,,,/Wpf.Ui;component/Fonts/#FluentSystemIcons-Filled 21 | 22 | 23 | pack://application:,,,/Wpf.Ui;component/Fonts/#Fira Code 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Common/ContextMenu.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Common/FocusVisualStyle.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 24 | 25 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Controls/ItemsControl.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 20 | 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Controls/Label.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Controls/Menu.xaml.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Reflection; 7 | using System.Windows; 8 | 9 | namespace Wpf.Ui.Styles.Controls 10 | { 11 | /// 12 | /// Extension to the menu. 13 | /// 14 | partial class Menu : ResourceDictionary 15 | { 16 | /// 17 | /// Sets menu alignment on initialization. 18 | /// 19 | public Menu() => Initialize(); 20 | 21 | private void Initialize() 22 | { 23 | if (!SystemParameters.MenuDropAlignment) 24 | return; 25 | 26 | var fieldInfo = typeof(SystemParameters).GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static); 27 | fieldInfo?.SetValue(null, false); 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Controls/TextBlock.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 10 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Styles/Controls/VirtualizingWrapPanel.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 12 | 13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Syntax/SyntaxLanguage.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Syntax; 7 | 8 | /// 9 | /// Supported languages for syntax highlighting. 10 | /// 11 | internal enum SyntaxLanguage 12 | { 13 | Autodetect, 14 | XAML, 15 | CSHARP 16 | } 17 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Taskbar/TaskbarProgressState.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.TaskBar; 7 | 8 | /// 9 | /// Specifies the state of the progress indicator in the Windows task bar. 10 | /// 11 | /// 12 | public enum TaskBarProgressState 13 | { 14 | /// 15 | /// No progress indicator is displayed in the task bar area. 16 | /// 17 | None = 0x0, 18 | 19 | /// 20 | /// A pulsing green (W10) or gray (W11) indicator is displayed in the task bar area. 21 | /// 22 | Indeterminate = 0x1, 23 | 24 | /// 25 | /// A green progress indicator is displayed in the task bar area. 26 | /// 27 | Normal = 0x2, 28 | 29 | /// 30 | /// A red progress indicator is displayed in the task bar area. 31 | /// 32 | Error = 0x4, 33 | 34 | /// 35 | /// A yellow progress indicator is displayed in the task bar area. 36 | /// 37 | Paused = 0x8 38 | } 39 | 40 | -------------------------------------------------------------------------------- /src/Wpf.Ui/TitleBar/TitleBarButton.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.TitleBar; 7 | 8 | /// 9 | /// Type of the Title Bar button. 10 | /// 11 | internal enum TitleBarButton 12 | { 13 | /// 14 | /// Unknown button. 15 | /// 16 | Unknown, 17 | 18 | /// 19 | /// Maximize button. 20 | /// 21 | Minimize, 22 | 23 | /// 24 | /// Close button. 25 | /// 26 | Close, 27 | 28 | /// 29 | /// Maximize button. 30 | /// 31 | Maximize, 32 | 33 | /// 34 | /// Restore button. 35 | /// 36 | Restore, 37 | 38 | /// 39 | /// Help button. 40 | /// 41 | Help 42 | } 43 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Tray/NotifyIconEvent.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | namespace Wpf.Ui.Tray; 7 | 8 | internal delegate void NotifyIconEventHandler(); 9 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Tray/TrayData.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Collections.Generic; 7 | 8 | namespace Wpf.Ui.Tray; 9 | 10 | /// 11 | /// Singleton containing persistent information about icons in the tray menu for application session. 12 | /// 13 | internal static class TrayData 14 | { 15 | /// 16 | /// Collection of registered tray icons. 17 | /// 18 | public static List NotifyIcons { get; set; } = new(); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Tray/TrayHandler.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System; 7 | using System.Windows.Interop; 8 | 9 | namespace Wpf.Ui.Tray; 10 | 11 | /// 12 | /// Manages the Win32 API and Windows messages. 13 | /// 14 | internal class TrayHandler : HwndSource 15 | { 16 | /// 17 | /// Id of the hooked element. 18 | /// 19 | public int ElementId { get; internal set; } 20 | 21 | /// 22 | /// Creates a new hWnd as a child with transparency parameters, no size and in the default position. Then, it attach the default delegation to the messages it receives. 23 | /// 24 | /// The name of the created window. 25 | /// Parent of the created window. 26 | public TrayHandler(string name, IntPtr parent) 27 | : base(0x0, 0x4000000, 0x80000 | 0x20 | 0x00000008 | 0x08000000, 0, 0, 0, 0, name, parent) 28 | { 29 | #if DEBUG 30 | System.Diagnostics.Debug.WriteLine($"INFO | New {typeof(TrayHandler)} registered with handle: #{Handle}, and parent: #{parent}", "Wpf.Ui.TrayHandler"); 31 | #endif 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Wpf.Ui/ValidationRules/BrushToColorValidationRule.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Drawing; 7 | using System.Globalization; 8 | using System.Windows.Controls; 9 | 10 | namespace Wpf.Ui.ValidationRules; 11 | 12 | internal class BrushToColorValidationRule : ValidationRule 13 | { 14 | public BrushToColorValidationRule() 15 | { 16 | } 17 | 18 | public override ValidationResult Validate(object value, CultureInfo cultureInfo) 19 | { 20 | if (value is Brush) 21 | return ValidationResult.ValidResult; 22 | 23 | if (value is Color) 24 | return ValidationResult.ValidResult; 25 | 26 | return new ValidationResult(false, $"{value?.GetType()} is not {typeof(Brush)} or {typeof(Color)}."); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/Wpf.Ui/ValidationRules/FallbackValidationRule.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Globalization; 7 | using System.Windows.Controls; 8 | 9 | namespace Wpf.Ui.ValidationRules; 10 | 11 | internal class FallbackValidationRule : ValidationRule 12 | { 13 | public FallbackValidationRule() 14 | { 15 | } 16 | 17 | public override ValidationResult Validate(object value, CultureInfo cultureInfo) 18 | { 19 | return ValidationResult.ValidResult; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Wpf.Ui/ValidationRules/ValidationRulesCollection.cs: -------------------------------------------------------------------------------- 1 | // This Source Code Form is subject to the terms of the MIT License. 2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. 3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors. 4 | // All Rights Reserved. 5 | 6 | using System.Collections.ObjectModel; 7 | using System.Windows.Controls; 8 | 9 | namespace Wpf.Ui.ValidationRules; 10 | 11 | internal class ValidationRulesCollection : Collection 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /src/Wpf.Ui/Win32/Win32Constant.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | // See the LICENSE file in the project root for more information. 4 | 5 | namespace Wpf.Ui.Win32; 6 | 7 | /// 8 | /// Common native constants. 9 | /// 10 | internal static class Win32Constant 11 | { 12 | public const int MAX_PATH = 260; 13 | 14 | public const int INFOTIPSIZE = 1024; 15 | 16 | public const int TRUE = 1; 17 | 18 | public const int FALSE = 0; 19 | } 20 | 21 | --------------------------------------------------------------------------------