diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..1b9d5f4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,49 @@ +name: Bug report +description: Create a report to help us improve +title: "Bug title" +labels: [bug] +body: + - type: textarea + validations: + required: true + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is + - type: textarea + validations: + required: true + attributes: + label: To Reproduce + description: Steps to reproduce the behavior + - type: textarea + validations: + required: true + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen + - type: textarea + attributes: + label: Screenshots + description: If applicable, add screenshots to help explain your problem + - type: textarea + validations: + required: true + attributes: + label: OS version + description: Which OS versions did you see the issue on? + - type: textarea + validations: + required: true + attributes: + label: .NET version + description: Which .NET versions did you see the issue on? + - type: textarea + validations: + required: true + attributes: + label: WPF-UI NuGet version + description: Which WPF-UI NuGet versions did you see the issue on? + - type: textarea + attributes: + label: Additional context + description: Add any other context about the problem here \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..221acf1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Documentation + url: https://wpfui.lepo.co/documentation/ + about: Find out how WPF UI works. + - name: Tutorial + url: https://wpfui.lepo.co/documentation/tutorial + about: Having trouble with the basics? Check out the tutorial! + - name: lepo.co contact + url: https://lepo.co/contact + about: Do you want to establish business contact? Let us know. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..38358df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,25 @@ +name: Feature request +description: Suggest an idea for the wpfui +title: "Feature request title" +labels: [enhancement] +body: + - type: textarea + validations: + required: true + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + - type: textarea + validations: + required: true + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen + - type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here \ No newline at end of file diff --git a/.github/workflows/library.nuget.yml b/.github/workflows/library.nuget.yml new file mode 100644 index 0000000..91375dd --- /dev/null +++ b/.github/workflows/library.nuget.yml @@ -0,0 +1,39 @@ +name: wpfui.violeta + +on: + release: + types: [created] + push: + branches: + - master + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 8.0.x + + - name: Setup Windows SDK + uses: GuillaumeFalourd/setup-windows10-sdk-action@v1.5 + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Pack + run: dotnet pack src\Wpf.Ui.Violeta\Wpf.Ui.Violeta.csproj -c Release --no-build -o out + + - name: Push NuGet package + # run: dotnet nuget push "out\*.nupkg" -k ${{secrets.NUGET_AUTH_TOKEN}} --source https://api.nuget.org/v3/index.json + uses: actions/upload-artifact@v3 + with: + name: nuget-packages + path: out/*.nupkg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30b97c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,364 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# Strong Name Key files +src/lepo.snk + +# DocFX +docs/api/ + +# Desktop service store +.DS_Store + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Visual Studio Code files +.vscode + +# IntelliJ IDEA files +.idea + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b3bdfa9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ema + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ece177e --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +![WPF UI Banner Dark](https://user-images.githubusercontent.com/13592821/174165081-9c62d188-ecb6-4200-abd8-419afbaf32c2.png#gh-dark-mode-only) + +![WPF UI Banner Light](https://user-images.githubusercontent.com/13592821/174165388-921c4745-90ed-4396-9a4b-9c86478f7447.png#gh-light-mode-only) + +# WPF UI Violeta + +[![GitHub license](https://img.shields.io/github/license/emako/wpfui.violeta)](https://github.com/emako/wpfui.violeta/blob/master/LICENSE) [![Nuget](https://img.shields.io/nuget/dt/WPF-UI.Violeta?label=nuget)](https://www.nuget.org/packages/WPF-UI.Violeta/) [![VS 2022 Downloads](https://img.shields.io/visual-studio-marketplace/i/lepo.WPF-UI?label=vs-2022)](https://marketplace.visualstudio.com/items?itemName=lepo.WPF-UI) [![Actions](https://github.com/emako/wpfui.violeta/actions/workflows/library.nuget.yml/badge.svg)](https://github.com/emako/wpfui.violeta/actions/workflows/library.nuget.yml) [![Platform](https://img.shields.io/badge/platform-Windows-blue?logo=windowsxp&color=1E9BFA)](https://dotnet.microsoft.com/zh-cn/download/dotnet/latest/runtime) + +WPF UI Violeta is based on [WPF UI](https://github.com/lepoco/wpfui), and provides the Fluent experience in your known and loved WPF framework. Some new immersive controls like `Toast`. + +When I decided to create this project I was listening to the song `Violeta`. + +### 🚀 Getting started + +Under construction + +### 📷 Screenshots + +Under construction + +### Thanks + +- [🔗 Fischless](https://github.com/GenshinMatrix/Fischless) +- [🔗 ModernWpf](https://github.com/Kinnara/ModernWpf) + diff --git a/Settings.XamlStyler b/Settings.XamlStyler new file mode 100644 index 0000000..7e44ef3 --- /dev/null +++ b/Settings.XamlStyler @@ -0,0 +1,44 @@ +{ + "AttributesTolerance": 2, + "KeepFirstAttributeOnSameLine": false, + "MaxAttributeCharactersPerLine": 0, + "MaxAttributesPerLine": 1, + "NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter", + "SeparateByGroups": false, + "AttributeIndentation": 0, + "AttributeIndentationStyle": 1, + "RemoveDesignTimeReferences": false, + "IgnoreDesignTimeReferencePrefix": false, + "EnableAttributeReordering": true, + "AttributeOrderingRuleGroups": [ + "x:Class", + "xmlns, xmlns:x", + "xmlns:*", + "x:Key, Key, x:Name, Name, x:Uid, Uid, Title", + "Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom", + "Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight", + "Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex", + "*:*, *", + "PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint", + "mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText", + "Storyboard.*, From, To, Duration" + ], + "FirstLineAttributes": "", + "OrderAttributesByName": true, + "PutEndingBracketOnNewLine": false, + "RemoveEndingTagOfEmptyElement": true, + "SpaceBeforeClosingSlash": true, + "RootElementLineBreakRule": 0, + "ReorderVSM": 2, + "ReorderGridChildren": false, + "ReorderCanvasChildren": false, + "ReorderSetters": 0, + "FormatMarkupExtension": true, + "NoNewLineMarkupExtensions": "x:Bind, Binding", + "ThicknessSeparator": 2, + "ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", + "FormatOnSave": true, + "CommentPadding": 2, + "IndentSize": 4, + "IndentWithTabs": false +} \ No newline at end of file diff --git a/Wpf.Ui.sln b/Wpf.Ui.sln new file mode 100644 index 0000000..58998c6 --- /dev/null +++ b/Wpf.Ui.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34902.65 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wpf.Ui.Test", "src\Wpf.Ui.Test\Wpf.Ui.Test.csproj", "{DB963C29-774D-4E63-A6C0-BEE52A23E40B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wpf.Ui.Violeta", "src\Wpf.Ui.Violeta\Wpf.Ui.Violeta.csproj", "{2DBA3326-F339-48CB-BCCC-F2C4FBF2E612}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB963C29-774D-4E63-A6C0-BEE52A23E40B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB963C29-774D-4E63-A6C0-BEE52A23E40B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB963C29-774D-4E63-A6C0-BEE52A23E40B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB963C29-774D-4E63-A6C0-BEE52A23E40B}.Release|Any CPU.Build.0 = Release|Any CPU + {2DBA3326-F339-48CB-BCCC-F2C4FBF2E612}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DBA3326-F339-48CB-BCCC-F2C4FBF2E612}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DBA3326-F339-48CB-BCCC-F2C4FBF2E612}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DBA3326-F339-48CB-BCCC-F2C4FBF2E612}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0BEEA15F-4DFC-4E8B-B5B6-2E2DECE1E579} + EndGlobalSection +EndGlobal diff --git a/branding/geometric_splash.psd b/branding/geometric_splash.psd new file mode 100644 index 0000000..f384dbf Binary files /dev/null and b/branding/geometric_splash.psd differ diff --git a/branding/microsoft-fluent-resources.psd b/branding/microsoft-fluent-resources.psd new file mode 100644 index 0000000..5f710f9 Binary files /dev/null and b/branding/microsoft-fluent-resources.psd differ diff --git a/branding/wpfui.ico b/branding/wpfui.ico new file mode 100644 index 0000000..cc128fd Binary files /dev/null and b/branding/wpfui.ico differ diff --git a/branding/wpfui.png b/branding/wpfui.png new file mode 100644 index 0000000..b70c4ed Binary files /dev/null and b/branding/wpfui.png differ diff --git a/branding/wpfui.psd b/branding/wpfui.psd new file mode 100644 index 0000000..9e2f8ca Binary files /dev/null and b/branding/wpfui.psd differ diff --git a/branding/wpfui_full.png b/branding/wpfui_full.png new file mode 100644 index 0000000..2d54bb3 Binary files /dev/null and b/branding/wpfui_full.png differ diff --git a/src/Wpf.Ui.Test/App.xaml b/src/Wpf.Ui.Test/App.xaml new file mode 100644 index 0000000..6d33642 --- /dev/null +++ b/src/Wpf.Ui.Test/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/src/Wpf.Ui.Test/App.xaml.cs b/src/Wpf.Ui.Test/App.xaml.cs new file mode 100644 index 0000000..2076809 --- /dev/null +++ b/src/Wpf.Ui.Test/App.xaml.cs @@ -0,0 +1,7 @@ +using System.Windows; + +namespace Wpf.Ui.Test; + +public partial class App : Application +{ +} diff --git a/src/Wpf.Ui.Test/AssemblyInfo.cs b/src/Wpf.Ui.Test/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/src/Wpf.Ui.Test/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/src/Wpf.Ui.Test/MainWindow.xaml b/src/Wpf.Ui.Test/MainWindow.xaml new file mode 100644 index 0000000..7745050 --- /dev/null +++ b/src/Wpf.Ui.Test/MainWindow.xaml @@ -0,0 +1,398 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Wpf.Ui.Test/MainWindow.xaml.cs b/src/Wpf.Ui.Test/MainWindow.xaml.cs new file mode 100644 index 0000000..433d17d --- /dev/null +++ b/src/Wpf.Ui.Test/MainWindow.xaml.cs @@ -0,0 +1,64 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using System; +using System.Windows.Media; +using Wpf.Ui.Controls; +using Wpf.Ui.Violeta.Controls; + +namespace Wpf.Ui.Test; + +[ObservableObject] +public partial class MainWindow : FluentWindow +{ + public MainWindow() + { + DataContext = this; + InitializeComponent(); + } + + protected override void OnSourceInitialized(EventArgs e) + { + base.OnSourceInitialized(e); + + if (WindowBackdrop.IsSupported(WindowBackdropType.Mica)) + { + Background = new SolidColorBrush(Colors.Transparent); + WindowBackdrop.ApplyBackdrop(this, WindowBackdropType.Mica); + } + } + + [RelayCommand] + private void ShowToast(Button self) + { + string message = "This is a toast message"; + ToastLocation toastLocation = (ToastLocation)Enum.Parse(typeof(ToastLocation), self.Content.ToString()!); + + if (self.Tag.ToString() == "Information") + { + Toast.Information(message, toastLocation); + } + else if (self.Tag.ToString() == "Error") + { + Toast.Error(message, toastLocation); + } + else if (self.Tag.ToString() == "Success") + { + Toast.Success(message, toastLocation); + } + else if (self.Tag.ToString() == "Warning") + { + Toast.Warning(message, toastLocation); + } + else if (self.Tag.ToString() == "Question") + { + Toast.Question(message, toastLocation); + } + else if (self.Tag.ToString() == "None") + { + Toast.Show(null!, message, new ToastConfig() + { + Location = toastLocation, + }); + } + } +} diff --git a/src/Wpf.Ui.Test/Wpf.Ui.Test.csproj b/src/Wpf.Ui.Test/Wpf.Ui.Test.csproj new file mode 100644 index 0000000..76b37c0 --- /dev/null +++ b/src/Wpf.Ui.Test/Wpf.Ui.Test.csproj @@ -0,0 +1,20 @@ + + + + WinExe + net6.0-windows + enable + true + 12.0 + + + + + + + + + + + + diff --git a/src/Wpf.Ui.Violeta/AssemblyInfo.cs b/src/Wpf.Ui.Violeta/AssemblyInfo.cs new file mode 100644 index 0000000..05bdf58 --- /dev/null +++ b/src/Wpf.Ui.Violeta/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Markup; + +[assembly: ComVisible(false)] +[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] +[assembly: Guid("617d6360-3976-4871-85cb-36bdb4f7ab62")] +[assembly: XmlnsPrefix("http://schemas.lepo.co/wpfui/2022/xaml/violeta", "vio")] +[assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml/violeta", "Wpf.Ui.Violeta.Controls")] +[assembly: XmlnsDefinition("http://schemas.lepo.co/wpfui/2022/xaml/violeta", "Wpf.Ui.Violeta")] diff --git a/src/Wpf.Ui.Violeta/Controls/FontIcon/FontSymbols.cs b/src/Wpf.Ui.Violeta/Controls/FontIcon/FontSymbols.cs new file mode 100644 index 0000000..3c2f251 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/FontIcon/FontSymbols.cs @@ -0,0 +1,1412 @@ +namespace Wpf.Ui.Violeta.Controls; + +/// +/// Segoe Fluent Icons +/// https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font +/// +public sealed class FontSymbols +{ + public const string GlobalNavButton = "\xe700"; + public const string Wifi = "\xe701"; + public const string Bluetooth = "\xe702"; + public const string Connect = "\xe703"; + public const string InternetSharing = "\xe704"; + public const string VPN = "\xe705"; + public const string Brightness = "\xe706"; + public const string MapPin = "\xe707"; + public const string QuietHours = "\xe708"; + public const string Airplane = "\xe709"; + public const string Tablet = "\xe70a"; + public const string QuickNote = "\xe70b"; + public const string RememberedDevice = "\xe70c"; + public const string ChevronDown = "\xe70d"; + public const string ChevronUp = "\xe70e"; + public const string Edit = "\xe70f"; + public const string Add = "\xe710"; + public const string Cancel = "\xe711"; + public const string More = "\xe712"; + public const string Settings = "\xe713"; + public const string Video = "\xe714"; + public const string Mail = "\xe715"; + public const string People = "\xe716"; + public const string Phone = "\xe717"; + public const string Pin = "\xe718"; + public const string Shop = "\xe719"; + public const string Stop = "\xe71a"; + public const string Link = "\xe71b"; + public const string Filter = "\xe71c"; + public const string AllApps = "\xe71d"; + public const string Zoom = "\xe71e"; + public const string ZoomOut = "\xe71f"; + public const string Microphone = "\xe720"; + public const string Search = "\xe721"; + public const string Camera = "\xe722"; + public const string Attach = "\xe723"; + public const string Send = "\xe724"; + public const string SendFill = "\xe725"; + public const string WalkSolid = "\xe726"; + public const string InPrivate = "\xe727"; + public const string FavoriteList = "\xe728"; + public const string PageSolid = "\xe729"; + public const string Forward = "\xe72a"; + public const string Back = "\xe72b"; + public const string Refresh = "\xe72c"; + public const string Share = "\xe72d"; + public const string Lock = "\xe72e"; + public const string ReportHacked = "\xe730"; + public const string EMI = "\xe731"; + public const string FavoriteStar = "\xe734"; + public const string FavoriteStarFill = "\xe735"; + public const string ReadingMode = "\xe736"; + public const string Favicon = "\xe737"; + public const string Remove = "\xe738"; + public const string Checkbox = "\xe739"; + public const string CheckboxComposite = "\xe73a"; + public const string CheckboxFill = "\xe73b"; + public const string CheckboxIndeterminate = "\xe73c"; + public const string CheckboxCompositeReversed = "\xe73d"; + public const string CheckMark = "\xe73e"; + public const string BackToWindow = "\xe73f"; + public const string FullScreen = "\xe740"; + public const string ResizeTouchLarger = "\xe741"; + public const string ResizeTouchSmaller = "\xe742"; + public const string ResizeMouseSmall = "\xe743"; + public const string ResizeMouseMedium = "\xe744"; + public const string ResizeMouseWide = "\xe745"; + public const string ResizeMouseTall = "\xe746"; + public const string ResizeMouseLarge = "\xe747"; + public const string SwitchUser = "\xe748"; + public const string Print = "\xe749"; + public const string Up = "\xe74a"; + public const string Down = "\xe74b"; + public const string OEM = "\xe74c"; + public const string Delete = "\xe74d"; + public const string Save = "\xe74e"; + public const string Mute = "\xe74f"; + public const string BackSpaceQWERTY = "\xe750"; + public const string ReturnKey = "\xe751"; + public const string UpArrowShiftKey = "\xe752"; + public const string Cloud = "\xe753"; + public const string Flashlight = "\xe754"; + public const string RotationLock = "\xe755"; + public const string CommandPrompt = "\xe756"; + public const string SIPMove = "\xe759"; + public const string SIPUndock = "\xe75a"; + public const string SIPRedock = "\xe75b"; + public const string EraseTool = "\xe75c"; + public const string UnderscoreSpace = "\xe75d"; + public const string GripperTool = "\xe75e"; + public const string Dialpad = "\xe75f"; + public const string PageLeft = "\xe760"; + public const string PageRight = "\xe761"; + public const string MultiSelect = "\xe762"; + public const string KeyboardLeftHanded = "\xe763"; + public const string KeyboardRightHanded = "\xe764"; + public const string KeyboardClassic = "\xe765"; + public const string KeyboardSplit = "\xe766"; + public const string Volume = "\xe767"; + public const string Play = "\xe768"; + public const string Pause = "\xe769"; + public const string ChevronLeft = "\xe76b"; + public const string ChevronRight = "\xe76c"; + public const string InkingTool = "\xe76d"; + public const string Emoji2 = "\xe76e"; + public const string GripperBarHorizontal = "\xe76f"; + public const string System = "\xe770"; + public const string Personalize = "\xe771"; + public const string Devices = "\xe772"; + public const string SearchAndApps = "\xe773"; + public const string Globe = "\xe774"; + public const string TimeLanguage = "\xe775"; + public const string EaseOfAccess = "\xe776"; + public const string UpdateRestore = "\xe777"; + public const string HangUp = "\xe778"; + public const string ContactInfo = "\xe779"; + public const string Unpin = "\xe77a"; + public const string Contact = "\xe77b"; + public const string Memo = "\xe77c"; + public const string IncomingCall = "\xe77e"; + public const string Paste = "\xe77f"; + public const string PhoneBook = "\xe780"; + public const string LEDLight = "\xe781"; + public const string Error = "\xe783"; + public const string GripperBarVertical = "\xe784"; + public const string Unlock = "\xe785"; + public const string Slideshow = "\xe786"; + public const string Calendar = "\xe787"; + public const string GripperResize = "\xe788"; + public const string Megaphone = "\xe789"; + public const string Trim = "\xe78a"; + public const string NewWindow = "\xe78b"; + public const string SaveLocal = "\xe78c"; + public const string Color = "\xe790"; + public const string DataSense = "\xe791"; + public const string SaveAs = "\xe792"; + public const string Light = "\xe793"; + public const string AspectRatio = "\xe799"; + public const string DataSenseBar = "\xe7a5"; + public const string Redo = "\xe7a6"; + public const string Undo = "\xe7a7"; + public const string Crop = "\xe7a8"; + public const string OpenWith = "\xe7ac"; + public const string Rotate = "\xe7ad"; + public const string RedEye = "\xe7b3"; + public const string SetlockScreen = "\xe7b5"; + public const string MapPin2 = "\xe7b7"; + public const string Package = "\xe7b8"; + public const string Warning = "\xe7ba"; + public const string ReadingList = "\xe7bc"; + public const string Education = "\xe7be"; + public const string ShoppingCart = "\xe7bf"; + public const string Train = "\xe7c0"; + public const string Flag = "\xe7c1"; + public const string Move = "\xe7c2"; + public const string Page = "\xe7c3"; + public const string TaskView = "\xe7c4"; + public const string BrowsePhotos = "\xe7c5"; + public const string HalfStarLeft = "\xe7c6"; + public const string HalfStarRight = "\xe7c7"; + public const string Record = "\xe7c8"; + public const string TouchPointer = "\xe7c9"; + public const string LangJPN = "\xe7de"; + public const string Ferry = "\xe7e3"; + public const string Highlight = "\xe7e6"; + public const string ActionCenterNotification = "\xe7e7"; + public const string PowerButton = "\xe7e8"; + public const string ResizeTouchNarrower = "\xe7ea"; + public const string ResizeTouchShorter = "\xe7eb"; + public const string DrivingMode = "\xe7ec"; + public const string RingerSilent = "\xe7ed"; + public const string OtherUser = "\xe7ee"; + public const string Admin = "\xe7ef"; + public const string CC = "\xe7f0"; + public const string SDCard = "\xe7f1"; + public const string CallForwarding = "\xe7f2"; + public const string SettingsDisplaySound = "\xe7f3"; + public const string TVMonitor = "\xe7f4"; + public const string Speakers = "\xe7f5"; + public const string Headphone = "\xe7f6"; + public const string DeviceLaptopPic = "\xe7f7"; + public const string DeviceLaptopNoPic = "\xe7f8"; + public const string DeviceMonitorRightPic = "\xe7f9"; + public const string DeviceMonitorLeftPic = "\xe7fa"; + public const string DeviceMonitorNoPic = "\xe7fb"; + public const string Game = "\xe7fc"; + public const string HorizontalTabKey = "\xe7fd"; + public const string StreetsideSplitMinimize = "\xe802"; + public const string StreetsideSplitExpand = "\xe803"; + public const string Car = "\xe804"; + public const string Walk = "\xe805"; + public const string Bus = "\xe806"; + public const string TiltUp = "\xe809"; + public const string TiltDown = "\xe80a"; + public const string CallControl = "\xe80b"; + public const string RotateMapRight = "\xe80c"; + public const string RotateMapLeft = "\xe80d"; + public const string Home = "\xe80f"; + public const string ParkingLocation = "\xe811"; + public const string MapCompassTop = "\xe812"; + public const string MapCompassBottom = "\xe813"; + public const string IncidentTriangle = "\xe814"; + public const string Touch = "\xe815"; + public const string MapDirections = "\xe816"; + public const string StartPoint = "\xe819"; + public const string StopPoint = "\xe81a"; + public const string EndPoint = "\xe81b"; + public const string History = "\xe81c"; + public const string Location = "\xe81d"; + public const string MapLayers = "\xe81e"; + public const string Accident = "\xe81f"; + public const string Work = "\xe821"; + public const string Construction = "\xe822"; + public const string Recent = "\xe823"; + public const string Bank = "\xe825"; + public const string DownloadMap = "\xe826"; + public const string InkingToolFill2 = "\xe829"; + public const string HighlightFill2 = "\xe82a"; + public const string EraseToolFill = "\xe82b"; + public const string EraseToolFill2 = "\xe82c"; + public const string Dictionary = "\xe82d"; + public const string DictionaryAdd = "\xe82e"; + public const string ToolTip = "\xe82f"; + public const string ChromeBack = "\xe830"; + public const string ProvisioningPackage = "\xe835"; + public const string AddRemoteDevice = "\xe836"; + public const string FolderOpen = "\xe838"; + public const string Ethernet = "\xe839"; + public const string ShareBroadband = "\xe83a"; + public const string DirectAccess = "\xe83b"; + public const string DialUp = "\xe83c"; + public const string DefenderApp = "\xe83d"; + public const string BatteryCharging9 = "\xe83e"; + public const string Battery10 = "\xe83f"; + public const string Pinned = "\xe840"; + public const string PinFill = "\xe841"; + public const string PinnedFill = "\xe842"; + public const string PeriodKey = "\xe843"; + public const string PuncKey = "\xe844"; + public const string RevToggleKey = "\xe845"; + public const string RightArrowKeyTime1 = "\xe846"; + public const string RightArrowKeyTime2 = "\xe847"; + public const string LeftQuote = "\xe848"; + public const string RightQuote = "\xe849"; + public const string DownShiftKey = "\xe84a"; + public const string UpShiftKey = "\xe84b"; + public const string PuncKey0 = "\xe84c"; + public const string PuncKeyLeftBottom = "\xe84d"; + public const string RightArrowKeyTime3 = "\xe84e"; + public const string RightArrowKeyTime4 = "\xe84f"; + public const string Battery0 = "\xe850"; + public const string Battery1 = "\xe851"; + public const string Battery2 = "\xe852"; + public const string Battery3 = "\xe853"; + public const string Battery4 = "\xe854"; + public const string Battery5 = "\xe855"; + public const string Battery6 = "\xe856"; + public const string Battery7 = "\xe857"; + public const string Battery8 = "\xe858"; + public const string Battery9 = "\xe859"; + public const string BatteryCharging0 = "\xe85a"; + public const string BatteryCharging1 = "\xe85b"; + public const string BatteryCharging2 = "\xe85c"; + public const string BatteryCharging3 = "\xe85d"; + public const string BatteryCharging4 = "\xe85e"; + public const string BatteryCharging5 = "\xe85f"; + public const string BatteryCharging6 = "\xe860"; + public const string BatteryCharging7 = "\xe861"; + public const string BatteryCharging8 = "\xe862"; + public const string BatterySaver0 = "\xe863"; + public const string BatterySaver1 = "\xe864"; + public const string BatterySaver2 = "\xe865"; + public const string BatterySaver3 = "\xe866"; + public const string BatterySaver4 = "\xe867"; + public const string BatterySaver5 = "\xe868"; + public const string BatterySaver6 = "\xe869"; + public const string BatterySaver7 = "\xe86a"; + public const string BatterySaver8 = "\xe86b"; + public const string SignalBars1 = "\xe86c"; + public const string SignalBars2 = "\xe86d"; + public const string SignalBars3 = "\xe86e"; + public const string SignalBars4 = "\xe86f"; + public const string SignalBars5 = "\xe870"; + public const string SignalNotConnected = "\xe871"; + public const string Wifi1 = "\xe872"; + public const string Wifi2 = "\xe873"; + public const string Wifi3 = "\xe874"; + public const string MobSIMLock = "\xe875"; + public const string MobSIMMissing = "\xe876"; + public const string Vibrate = "\xe877"; + public const string RoamingInternational = "\xe878"; + public const string RoamingDomestic = "\xe879"; + public const string CallForwardInternational = "\xe87a"; + public const string CallForwardRoaming = "\xe87b"; + public const string JpnRomanji = "\xe87c"; + public const string JpnRomanjiLock = "\xe87d"; + public const string JpnRomanjiShift = "\xe87e"; + public const string JpnRomanjiShiftLock = "\xe87f"; + public const string StatusDataTransfer = "\xe880"; + public const string StatusDataTransferVPN = "\xe881"; + public const string StatusDualSIM2 = "\xe882"; + public const string StatusDualSIM2VPN = "\xe883"; + public const string StatusDualSIM1 = "\xe884"; + public const string StatusDualSIM1VPN = "\xe885"; + public const string StatusSGLTE = "\xe886"; + public const string StatusSGLTECell = "\xe887"; + public const string StatusSGLTEDataVPN = "\xe888"; + public const string StatusVPN = "\xe889"; + public const string WifiHotspot = "\xe88a"; + public const string LanguageKor = "\xe88b"; + public const string LanguageCht = "\xe88c"; + public const string LanguageChs = "\xe88d"; + public const string USB = "\xe88e"; + public const string InkingToolFill = "\xe88f"; + public const string View = "\xe890"; + public const string HighlightFill = "\xe891"; + public const string Previous = "\xe892"; + public const string Next = "\xe893"; + public const string Clear = "\xe894"; + public const string Sync = "\xe895"; + public const string Download = "\xe896"; + public const string Help = "\xe897"; + public const string Upload = "\xe898"; + public const string Emoji = "\xe899"; + public const string TwoPage = "\xe89a"; + public const string LeaveChat = "\xe89b"; + public const string MailForward = "\xe89c"; + public const string RotateCamera = "\xe89e"; + public const string ClosePane = "\xe89f"; + public const string OpenPane = "\xe8a0"; + public const string PreviewLink = "\xe8a1"; + public const string AttachCamera = "\xe8a2"; + public const string ZoomIn = "\xe8a3"; + public const string Bookmarks = "\xe8a4"; + public const string Document = "\xe8a5"; + public const string ProtectedDocument = "\xe8a6"; + public const string OpenInNewWindow = "\xe8a7"; + public const string MailFill = "\xe8a8"; + public const string ViewAll = "\xe8a9"; + public const string VideoChat = "\xe8aa"; + public const string Switch = "\xe8ab"; + public const string Rename = "\xe8ac"; + public const string Go = "\xe8ad"; + public const string SurfaceHub = "\xe8ae"; + public const string Remote = "\xe8af"; + public const string Click = "\xe8b0"; + public const string Shuffle = "\xe8b1"; + public const string Movies = "\xe8b2"; + public const string SelectAll = "\xe8b3"; + public const string Orientation = "\xe8b4"; + public const string Import = "\xe8b5"; + public const string ImportAll = "\xe8b6"; + public const string Folder = "\xe8b7"; + public const string Webcam = "\xe8b8"; + public const string Picture = "\xe8b9"; + public const string Caption = "\xe8ba"; + public const string ChromeClose = "\xe8bb"; + public const string ShowResults = "\xe8bc"; + public const string Message = "\xe8bd"; + public const string Leaf = "\xe8be"; + public const string CalendarDay = "\xe8bf"; + public const string CalendarWeek = "\xe8c0"; + public const string Characters = "\xe8c1"; + public const string MailReplyAll = "\xe8c2"; + public const string Read = "\xe8c3"; + public const string ShowBcc = "\xe8c4"; + public const string HideBcc = "\xe8c5"; + public const string Cut = "\xe8c6"; + public const string PaymentCard = "\xe8c7"; + public const string Copy = "\xe8c8"; + public const string Important = "\xe8c9"; + public const string MailReply = "\xe8ca"; + public const string Sort = "\xe8cb"; + public const string MobileTablet = "\xe8cc"; + public const string DisconnectDrive = "\xe8cd"; + public const string MapDrive = "\xe8ce"; + public const string ContactPresence = "\xe8cf"; + public const string Priority = "\xe8d0"; + public const string GotoToday = "\xe8d1"; + public const string Font = "\xe8d2"; + public const string FontColor = "\xe8d3"; + public const string Contact2 = "\xe8d4"; + public const string FolderFill = "\xe8d5"; + public const string Audio = "\xe8d6"; + public const string Permissions = "\xe8d7"; + public const string DisableUpdates = "\xe8d8"; + public const string Unfavorite = "\xe8d9"; + public const string OpenLocal = "\xe8da"; + public const string Italic = "\xe8db"; + public const string Underline = "\xe8dc"; + public const string Bold = "\xe8dd"; + public const string MoveToFolder = "\xe8de"; + public const string LikeDislike = "\xe8df"; + public const string Dislike = "\xe8e0"; + public const string Like = "\xe8e1"; + public const string AlignRight = "\xe8e2"; + public const string AlignCenter = "\xe8e3"; + public const string AlignLeft = "\xe8e4"; + public const string OpenFile = "\xe8e5"; + public const string ClearSelection = "\xe8e6"; + public const string FontDecrease = "\xe8e7"; + public const string FontIncrease = "\xe8e8"; + public const string FontSize = "\xe8e9"; + public const string CellPhone = "\xe8ea"; + public const string Reshare = "\xe8eb"; + public const string Tag = "\xe8ec"; + public const string RepeatOne = "\xe8ed"; + public const string RepeatAll = "\xe8ee"; + public const string Calculator = "\xe8ef"; + public const string Directions = "\xe8f0"; + public const string Library = "\xe8f1"; + public const string ChatBubbles = "\xe8f2"; + public const string PostUpdate = "\xe8f3"; + public const string NewFolder = "\xe8f4"; + public const string CalendarReply = "\xe8f5"; + public const string UnsyncFolder = "\xe8f6"; + public const string SyncFolder = "\xe8f7"; + public const string BlockContact = "\xe8f8"; + public const string SwitchApps = "\xe8f9"; + public const string AddFriend = "\xe8fa"; + public const string Accept = "\xe8fb"; + public const string GoToStart = "\xe8fc"; + public const string BulletedList = "\xe8fd"; + public const string Scan = "\xe8fe"; + public const string Preview = "\xe8ff"; + public const string Group = "\xe902"; + public const string ZeroBars = "\xe904"; + public const string OneBar = "\xe905"; + public const string TwoBars = "\xe906"; + public const string ThreeBars = "\xe907"; + public const string FourBars = "\xe908"; + public const string World = "\xe909"; + public const string Comment = "\xe90a"; + public const string MusicInfo = "\xe90b"; + public const string DockLeft = "\xe90c"; + public const string DockRight = "\xe90d"; + public const string DockBottom = "\xe90e"; + public const string Repair = "\xe90f"; + public const string Accounts = "\xe910"; + public const string DullSound = "\xe911"; + public const string Manage = "\xe912"; + public const string Street = "\xe913"; + public const string Printer3D = "\xe914"; + public const string RadioBullet = "\xe915"; + public const string Stopwatch = "\xe916"; + public const string Photo = "\xe91b"; + public const string ActionCenter = "\xe91c"; + public const string FullCircleMask = "\xe91f"; + public const string ChromeMinimize = "\xe921"; + public const string ChromeMaximize = "\xe922"; + public const string ChromeRestore = "\xe923"; + public const string Annotation = "\xe924"; + public const string BackSpaceQWERTYSm = "\xe925"; + public const string BackSpaceQWERTYMd = "\xe926"; + public const string Swipe = "\xe927"; + public const string Fingerprint = "\xe928"; + public const string Handwriting = "\xe929"; + public const string ChromeBackToWindow = "\xe92c"; + public const string ChromeFullScreen = "\xe92d"; + public const string KeyboardStandard = "\xe92e"; + public const string KeyboardDismiss = "\xe92f"; + public const string Completed = "\xe930"; + public const string ChromeAnnotate = "\xe931"; + public const string Label = "\xe932"; + public const string IBeam = "\xe933"; + public const string IBeamOutline = "\xe934"; + public const string FlickDown = "\xe935"; + public const string FlickUp = "\xe936"; + public const string FlickLeft = "\xe937"; + public const string FlickRight = "\xe938"; + public const string FeedbackApp = "\xe939"; + public const string MusicAlbum = "\xe93c"; + public const string Streaming = "\xe93e"; + public const string Code = "\xe943"; + public const string ReturnToWindow = "\xe944"; + public const string LightningBolt = "\xe945"; + public const string Info = "\xe946"; + public const string CalculatorMultiply = "\xe947"; + public const string CalculatorAddition = "\xe948"; + public const string CalculatorSubtract = "\xe949"; + public const string CalculatorDivide = "\xe94a"; + public const string CalculatorSquareroot = "\xe94b"; + public const string CalculatorPercentage = "\xe94c"; + public const string CalculatorNegate = "\xe94d"; + public const string CalculatorEqualTo = "\xe94e"; + public const string CalculatorBackspace = "\xe94f"; + public const string Component = "\xe950"; + public const string DMC = "\xe951"; + public const string Dock = "\xe952"; + public const string MultimediaDMS = "\xe953"; + public const string MultimediaDVR = "\xe954"; + public const string MultimediaPMP = "\xe955"; + public const string PrintfaxPrinterFile = "\xe956"; + public const string Sensor = "\xe957"; + public const string StorageOptical = "\xe958"; + public const string Communications = "\xe95a"; + public const string Headset = "\xe95b"; + public const string Projector = "\xe95d"; + public const string Health = "\xe95e"; + public const string Wire = "\xe95f"; + public const string Webcam2 = "\xe960"; + public const string Input = "\xe961"; + public const string Mouse = "\xe962"; + public const string Smartcard = "\xe963"; + public const string SmartcardVirtual = "\xe964"; + public const string MediaStorageTower = "\xe965"; + public const string ReturnKeySm = "\xe966"; + public const string GameConsole = "\xe967"; + public const string Network = "\xe968"; + public const string StorageNetworkWireless = "\xe969"; + public const string StorageTape = "\xe96a"; + public const string ChevronUpSmall = "\xe96d"; + public const string ChevronDownSmall = "\xe96e"; + public const string ChevronLeftSmall = "\xe96f"; + public const string ChevronRightSmall = "\xe970"; + public const string ChevronUpMed = "\xe971"; + public const string ChevronDownMed = "\xe972"; + public const string ChevronLeftMed = "\xe973"; + public const string ChevronRightMed = "\xe974"; + public const string Devices2 = "\xe975"; + public const string ExpandTile = "\xe976"; + public const string PC1 = "\xe977"; + public const string PresenceChicklet = "\xe978"; + public const string PresenceChickletVideo = "\xe979"; + public const string Reply = "\xe97a"; + public const string SetTile = "\xe97b"; + public const string Type = "\xe97c"; + public const string Korean = "\xe97d"; + public const string HalfAlpha = "\xe97e"; + public const string FullAlpha = "\xe97f"; + public const string Key12On = "\xe980"; + public const string ChineseChangjie = "\xe981"; + public const string QWERTYOn = "\xe982"; + public const string QWERTYOff = "\xe983"; + public const string ChineseQuick = "\xe984"; + public const string Japanese = "\xe985"; + public const string FullHiragana = "\xe986"; + public const string FullKatakana = "\xe987"; + public const string HalfKatakana = "\xe988"; + public const string ChineseBoPoMoFo = "\xe989"; + public const string ChinesePinyin = "\xe98a"; + public const string ConstructionCone = "\xe98f"; + public const string XboxOneConsole = "\xe990"; + public const string Volume0 = "\xe992"; + public const string Volume1 = "\xe993"; + public const string Volume2 = "\xe994"; + public const string Volume3 = "\xe995"; + public const string BatteryUnknown = "\xe996"; + public const string WifiAttentionOverlay = "\xe998"; + public const string Robot = "\xe99a"; + public const string TapAndSend = "\xe9a1"; + public const string FitPage = "\xe9a6"; + public const string PasswordKeyShow = "\xe9a8"; + public const string PasswordKeyHide = "\xe9a9"; + public const string BidiLtr = "\xe9aa"; + public const string BidiRtl = "\xe9ab"; + public const string ForwardSm = "\xe9ac"; + public const string CommaKey = "\xe9ad"; + public const string DashKey = "\xe9ae"; + public const string DullSoundKey = "\xe9af"; + public const string HalfDullSound = "\xe9b0"; + public const string RightDoubleQuote = "\xe9b1"; + public const string LeftDoubleQuote = "\xe9b2"; + public const string PuncKeyRightBottom = "\xe9b3"; + public const string PuncKey1 = "\xe9b4"; + public const string PuncKey2 = "\xe9b5"; + public const string PuncKey3 = "\xe9b6"; + public const string PuncKey4 = "\xe9b7"; + public const string PuncKey5 = "\xe9b8"; + public const string PuncKey6 = "\xe9b9"; + public const string PuncKey9 = "\xe9ba"; + public const string PuncKey7 = "\xe9bb"; + public const string PuncKey8 = "\xe9bc"; + public const string Frigid = "\xe9ca"; + public const string Unknown = "\xe9ce"; + public const string AreaChart = "\xe9d2"; + public const string CheckList = "\xe9d5"; + public const string Diagnostic = "\xe9d9"; + public const string Equalizer = "\xe9e9"; + public const string Process = "\xe9f3"; + public const string Processing = "\xe9f5"; + public const string ReportDocument = "\xe9f9"; + public const string VideoSolid = "\xea0c"; + public const string MixedMediaBadge = "\xea0d"; + public const string DisconnectDisplay = "\xea14"; + public const string Shield = "\xea18"; + public const string Info2 = "\xea1f"; + public const string ActionCenterAsterisk = "\xea21"; + public const string Beta = "\xea24"; + public const string SaveCopy = "\xea35"; + public const string List = "\xea37"; + public const string Asterisk = "\xea38"; + public const string ErrorBadge = "\xea39"; + public const string CircleRing = "\xea3a"; + public const string CircleFill = "\xea3b"; + public const string MergeCall = "\xea3c"; + public const string PrivateCall = "\xea3d"; + public const string Record2 = "\xea3f"; + public const string AllAppsMirrored = "\xea40"; + public const string BookmarksMirrored = "\xea41"; + public const string BulletedListMirrored = "\xea42"; + public const string CallForwardInternationalMirrored = "\xea43"; + public const string CallForwardRoamingMirrored = "\xea44"; + public const string ChromeBackMirrored = "\xea47"; + public const string ClearSelectionMirrored = "\xea48"; + public const string ClosePaneMirrored = "\xea49"; + public const string ContactInfoMirrored = "\xea4a"; + public const string DockRightMirrored = "\xea4b"; + public const string DockLeftMirrored = "\xea4c"; + public const string ExpandTileMirrored = "\xea4e"; + public const string GoMirrored = "\xea4f"; + public const string GripperResizeMirrored = "\xea50"; + public const string HelpMirrored = "\xea51"; + public const string ImportMirrored = "\xea52"; + public const string ImportAllMirrored = "\xea53"; + public const string LeaveChatMirrored = "\xea54"; + public const string ListMirrored = "\xea55"; + public const string MailForwardMirrored = "\xea56"; + public const string MailReplyMirrored = "\xea57"; + public const string MailReplyAllMirrored = "\xea58"; + public const string OpenPaneMirrored = "\xea5b"; + public const string OpenWithMirrored = "\xea5c"; + public const string ParkingLocationMirrored = "\xea5e"; + public const string ResizeMouseMediumMirrored = "\xea5f"; + public const string ResizeMouseSmallMirrored = "\xea60"; + public const string ResizeMouseTallMirrored = "\xea61"; + public const string ResizeTouchNarrowerMirrored = "\xea62"; + public const string SendMirrored = "\xea63"; + public const string SendFillMirrored = "\xea64"; + public const string ShowResultsMirrored = "\xea65"; + public const string Media = "\xea69"; + public const string SyncError = "\xea6a"; + public const string Devices3 = "\xea6c"; + public const string SlowMotionOn = "\xea79"; + public const string Lightbulb = "\xea80"; + public const string StatusCircle = "\xea81"; + public const string StatusTriangle = "\xea82"; + public const string StatusError = "\xea83"; + public const string StatusWarning = "\xea84"; + public const string Puzzle = "\xea86"; + public const string CalendarSolid = "\xea89"; + public const string HomeSolid = "\xea8a"; + public const string ParkingLocationSolid = "\xea8b"; + public const string ContactSolid = "\xea8c"; + public const string ConstructionSolid = "\xea8d"; + public const string AccidentSolid = "\xea8e"; + public const string Ringer = "\xea8f"; + public const string PDF = "\xea90"; + public const string ThoughtBubble = "\xea91"; + public const string HeartBroken = "\xea92"; + public const string BatteryCharging10 = "\xea93"; + public const string BatterySaver9 = "\xea94"; + public const string BatterySaver10 = "\xea95"; + public const string CallForwardingMirrored = "\xea97"; + public const string MultiSelectMirrored = "\xea98"; + public const string Broom = "\xea99"; + public const string ForwardCall = "\xeac2"; + public const string Trackers = "\xeadf"; + public const string Market = "\xeafc"; + public const string PieSingle = "\xeb05"; + public const string StockDown = "\xeb0f"; + public const string StockUp = "\xeb11"; + public const string Design = "\xeb3c"; + public const string Website = "\xeb41"; + public const string Drop = "\xeb42"; + public const string Radar = "\xeb44"; + public const string BusSolid = "\xeb47"; + public const string FerrySolid = "\xeb48"; + public const string StartPointSolid = "\xeb49"; + public const string StopPointSolid = "\xeb4a"; + public const string EndPointSolid = "\xeb4b"; + public const string AirplaneSolid = "\xeb4c"; + public const string TrainSolid = "\xeb4d"; + public const string WorkSolid = "\xeb4e"; + public const string ReminderFill = "\xeb4f"; + public const string Reminder = "\xeb50"; + public const string Heart = "\xeb51"; + public const string HeartFill = "\xeb52"; + public const string EthernetError = "\xeb55"; + public const string EthernetWarning = "\xeb56"; + public const string StatusConnecting1 = "\xeb57"; + public const string StatusConnecting2 = "\xeb58"; + public const string StatusUnsecure = "\xeb59"; + public const string WifiError0 = "\xeb5a"; + public const string WifiError1 = "\xeb5b"; + public const string WifiError2 = "\xeb5c"; + public const string WifiError3 = "\xeb5d"; + public const string WifiError4 = "\xeb5e"; + public const string WifiWarning0 = "\xeb5f"; + public const string WifiWarning1 = "\xeb60"; + public const string WifiWarning2 = "\xeb61"; + public const string WifiWarning3 = "\xeb62"; + public const string WifiWarning4 = "\xeb63"; + public const string Devices4 = "\xeb66"; + public const string NUIIris = "\xeb67"; + public const string NUIFace = "\xeb68"; + public const string GatewayRouter = "\xeb77"; + public const string EditMirrored = "\xeb7e"; + public const string NUIFPStartSlideHand = "\xeb82"; + public const string NUIFPStartSlideAction = "\xeb83"; + public const string NUIFPContinueSlideHand = "\xeb84"; + public const string NUIFPContinueSlideAction = "\xeb85"; + public const string NUIFPRollRightHand = "\xeb86"; + public const string NUIFPRollRightHandAction = "\xeb87"; + public const string NUIFPRollLeftHand = "\xeb88"; + public const string NUIFPRollLeftAction = "\xeb89"; + public const string NUIFPPressHand = "\xeb8a"; + public const string NUIFPPressAction = "\xeb8b"; + public const string NUIFPPressRepeatHand = "\xeb8c"; + public const string NUIFPPressRepeatAction = "\xeb8d"; + public const string StatusErrorFull = "\xeb90"; + public const string TaskViewExpanded = "\xeb91"; + public const string Certificate = "\xeb95"; + public const string BackSpaceQWERTYLg = "\xeb96"; + public const string ReturnKeyLg = "\xeb97"; + public const string FastForward = "\xeb9d"; + public const string Rewind = "\xeb9e"; + public const string Photo2 = "\xeb9f"; + public const string MobBattery0 = "\xeba0"; + public const string MobBattery1 = "\xeba1"; + public const string MobBattery2 = "\xeba2"; + public const string MobBattery3 = "\xeba3"; + public const string MobBattery4 = "\xeba4"; + public const string MobBattery5 = "\xeba5"; + public const string MobBattery6 = "\xeba6"; + public const string MobBattery7 = "\xeba7"; + public const string MobBattery8 = "\xeba8"; + public const string MobBattery9 = "\xeba9"; + public const string MobBattery10 = "\xebaa"; + public const string MobBatteryCharging0 = "\xebab"; + public const string MobBatteryCharging1 = "\xebac"; + public const string MobBatteryCharging2 = "\xebad"; + public const string MobBatteryCharging3 = "\xebae"; + public const string MobBatteryCharging4 = "\xebaf"; + public const string MobBatteryCharging5 = "\xebb0"; + public const string MobBatteryCharging6 = "\xebb1"; + public const string MobBatteryCharging7 = "\xebb2"; + public const string MobBatteryCharging8 = "\xebb3"; + public const string MobBatteryCharging9 = "\xebb4"; + public const string MobBatteryCharging10 = "\xebb5"; + public const string MobBatterySaver0 = "\xebb6"; + public const string MobBatterySaver1 = "\xebb7"; + public const string MobBatterySaver2 = "\xebb8"; + public const string MobBatterySaver3 = "\xebb9"; + public const string MobBatterySaver4 = "\xebba"; + public const string MobBatterySaver5 = "\xebbb"; + public const string MobBatterySaver6 = "\xebbc"; + public const string MobBatterySaver7 = "\xebbd"; + public const string MobBatterySaver8 = "\xebbe"; + public const string MobBatterySaver9 = "\xebbf"; + public const string MobBatterySaver10 = "\xebc0"; + public const string DictionaryCloud = "\xebc3"; + public const string ResetDrive = "\xebc4"; + public const string VolumeBars = "\xebc5"; + public const string Project = "\xebc6"; + public const string AdjustHologram = "\xebd2"; + public const string CloudDownload = "\xebd3"; + public const string MobWifiCallBars = "\xebd4"; + public const string MobWifiCall0 = "\xebd5"; + public const string MobWifiCall1 = "\xebd6"; + public const string MobWifiCall2 = "\xebd7"; + public const string MobWifiCall3 = "\xebd8"; + public const string MobWifiCall4 = "\xebd9"; + public const string Family = "\xebda"; + public const string LockFeedback = "\xebdb"; + public const string DeviceDiscovery = "\xebde"; + public const string WindDirection = "\xebe6"; + public const string RightArrowKeyTime0 = "\xebe7"; + public const string Bug = "\xebe8"; + public const string TabletMode = "\xebfc"; + public const string StatusCircleLeft = "\xebfd"; + public const string StatusTriangleLeft = "\xebfe"; + public const string StatusErrorLeft = "\xebff"; + public const string StatusWarningLeft = "\xec00"; + public const string MobBatteryUnknown = "\xec02"; + public const string NetworkTower = "\xec05"; + public const string CityNext = "\xec06"; + public const string CityNext2 = "\xec07"; + public const string Courthouse = "\xec08"; + public const string Groceries = "\xec09"; + public const string Sustainable = "\xec0a"; + public const string BuildingEnergy = "\xec0b"; + public const string ToggleFilled = "\xec11"; + public const string ToggleBorder = "\xec12"; + public const string SliderThumb = "\xec13"; + public const string ToggleThumb = "\xec14"; + public const string MiracastLogoSmall = "\xec15"; + public const string MiracastLogoLarge = "\xec16"; + public const string PLAP = "\xec19"; + public const string Badge = "\xec1b"; + public const string SignalRoaming = "\xec1e"; + public const string MobileLocked = "\xec20"; + public const string InsiderHubApp = "\xec24"; + public const string PersonalFolder = "\xec25"; + public const string HomeGroup = "\xec26"; + public const string MyNetwork = "\xec27"; + public const string KeyboardFull = "\xec31"; + public const string Cafe = "\xec32"; + public const string MobSignal1 = "\xec37"; + public const string MobSignal2 = "\xec38"; + public const string MobSignal3 = "\xec39"; + public const string MobSignal4 = "\xec3a"; + public const string MobSignal5 = "\xec3b"; + public const string MobWifi1 = "\xec3c"; + public const string MobWifi2 = "\xec3d"; + public const string MobWifi3 = "\xec3e"; + public const string MobWifi4 = "\xec3f"; + public const string MobAirplane = "\xec40"; + public const string MobBluetooth = "\xec41"; + public const string MobActionCenter = "\xec42"; + public const string MobLocation = "\xec43"; + public const string MobWifiHotspot = "\xec44"; + public const string LanguageJpn = "\xec45"; + public const string MobQuietHours = "\xec46"; + public const string MobDrivingMode = "\xec47"; + public const string SpeedOff = "\xec48"; + public const string SpeedMedium = "\xec49"; + public const string SpeedHigh = "\xec4a"; + public const string ThisPC = "\xec4e"; + public const string MusicNote = "\xec4f"; + public const string FileExplorer = "\xec50"; + public const string FileExplorerApp = "\xec51"; + public const string LeftArrowKeyTime0 = "\xec52"; + public const string MicOff = "\xec54"; + public const string MicSleep = "\xec55"; + public const string MicError = "\xec56"; + public const string PlaybackRate1x = "\xec57"; + public const string PlaybackRateOther = "\xec58"; + public const string CashDrawer = "\xec59"; + public const string BarcodeScanner = "\xec5a"; + public const string ReceiptPrinter = "\xec5b"; + public const string MagStripeReader = "\xec5c"; + public const string CompletedSolid = "\xec61"; + public const string CompanionApp = "\xec64"; + public const string Favicon2 = "\xec6c"; + public const string SwipeRevealArt = "\xec6d"; + public const string MicOn = "\xec71"; + public const string MicClipping = "\xec72"; + public const string TabletSelected = "\xec74"; + public const string MobileSelected = "\xec75"; + public const string LaptopSelected = "\xec76"; + public const string TVMonitorSelected = "\xec77"; + public const string DeveloperTools = "\xec7a"; + public const string MobCallForwarding = "\xec7e"; + public const string MobCallForwardingMirrored = "\xec7f"; + public const string BodyCam = "\xec80"; + public const string PoliceCar = "\xec81"; + public const string Draw = "\xec87"; + public const string DrawSolid = "\xec88"; + public const string LowerBrightness = "\xec8a"; + public const string ScrollUpDown = "\xec8f"; + public const string DateTime = "\xec92"; + public const string HoloLens = "\xec94"; + public const string Tiles = "\xeca5"; + public const string PartyLeader = "\xeca7"; + public const string AppIconDefault = "\xecaa"; + public const string Calories = "\xecad"; + public const string POI = "\xecaf"; + public const string BandBattery0 = "\xecb9"; + public const string BandBattery1 = "\xecba"; + public const string BandBattery2 = "\xecbb"; + public const string BandBattery3 = "\xecbc"; + public const string BandBattery4 = "\xecbd"; + public const string BandBattery5 = "\xecbe"; + public const string BandBattery6 = "\xecbf"; + public const string AddSurfaceHub = "\xecc4"; + public const string DevUpdate = "\xecc5"; + public const string Unit = "\xecc6"; + public const string AddTo = "\xecc8"; + public const string RemoveFrom = "\xecc9"; + public const string RadioBtnOff = "\xecca"; + public const string RadioBtnOn = "\xeccb"; + public const string RadioBullet2 = "\xeccc"; + public const string ExploreContent = "\xeccd"; + public const string Blocked2 = "\xece4"; + public const string ScrollMode = "\xece7"; + public const string ZoomMode = "\xece8"; + public const string PanMode = "\xece9"; + public const string WiredUSB = "\xecf0"; + public const string WirelessUSB = "\xecf1"; + public const string USBSafeConnect = "\xecf3"; + public const string ActionCenterNotificationMirrored = "\xed0c"; + public const string ActionCenterMirrored = "\xed0d"; + public const string SubscriptionAdd = "\xed0e"; + public const string ResetDevice = "\xed10"; + public const string SubscriptionAddMirrored = "\xed11"; + public const string QRCode = "\xed14"; + public const string Feedback = "\xed15"; + public const string Hide = "\xed1a"; + public const string Subtitles = "\xed1e"; + public const string SubtitlesAudio = "\xed1f"; + public const string OpenFolderHorizontal = "\xed25"; + public const string CalendarMirrored = "\xed28"; + public const string MobeSIM = "\xed2a"; + public const string MobeSIMNoProfile = "\xed2b"; + public const string MobeSIMLocked = "\xed2c"; + public const string MobeSIMBusy = "\xed2d"; + public const string SignalError = "\xed2e"; + public const string StreamingEnterprise = "\xed2f"; + public const string Headphone0 = "\xed30"; + public const string Headphone1 = "\xed31"; + public const string Headphone2 = "\xed32"; + public const string Headphone3 = "\xed33"; + public const string Apps = "\xed35"; + public const string KeyboardBrightness = "\xed39"; + public const string KeyboardLowerBrightness = "\xed3a"; + public const string SkipBack10 = "\xed3c"; + public const string SkipForward30 = "\xed3d"; + public const string TreeFolderFolder = "\xed41"; + public const string TreeFolderFolderFill = "\xed42"; + public const string TreeFolderFolderOpen = "\xed43"; + public const string TreeFolderFolderOpenFill = "\xed44"; + public const string MultimediaDMP = "\xed47"; + public const string KeyboardOneHanded = "\xed4c"; + public const string Narrator = "\xed4d"; + public const string EmojiTabPeople = "\xed53"; + public const string EmojiTabSmilesAnimals = "\xed54"; + public const string EmojiTabCelebrationObjects = "\xed55"; + public const string EmojiTabFoodPlants = "\xed56"; + public const string EmojiTabTransitPlaces = "\xed57"; + public const string EmojiTabSymbols = "\xed58"; + public const string EmojiTabTextSmiles = "\xed59"; + public const string EmojiTabFavorites = "\xed5a"; + public const string EmojiSwatch = "\xed5b"; + public const string ConnectApp = "\xed5c"; + public const string CompanionDeviceFramework = "\xed5d"; + public const string Ruler = "\xed5e"; + public const string FingerInking = "\xed5f"; + public const string StrokeErase = "\xed60"; + public const string PointErase = "\xed61"; + public const string ClearAllInk = "\xed62"; + public const string Pencil = "\xed63"; + public const string Marker = "\xed64"; + public const string InkingCaret = "\xed65"; + public const string InkingColorOutline = "\xed66"; + public const string InkingColorFill = "\xed67"; + public const string HardDrive = "\xeda2"; + public const string NetworkAdapter = "\xeda3"; + public const string Touchscreen = "\xeda4"; + public const string NetworkPrinter = "\xeda5"; + public const string CloudPrinter = "\xeda6"; + public const string KeyboardShortcut = "\xeda7"; + public const string BrushSize = "\xeda8"; + public const string NarratorForward = "\xeda9"; + public const string NarratorForwardMirrored = "\xedaa"; + public const string SyncBadge12 = "\xedab"; + public const string RingerBadge12 = "\xedac"; + public const string AsteriskBadge12 = "\xedad"; + public const string ErrorBadge12 = "\xedae"; + public const string CircleRingBadge12 = "\xedaf"; + public const string CircleFillBadge12 = "\xedb0"; + public const string ImportantBadge12 = "\xedb1"; + public const string MailBadge12 = "\xedb3"; + public const string PauseBadge12 = "\xedb4"; + public const string PlayBadge12 = "\xedb5"; + public const string PenWorkspace = "\xedc6"; + public const string CaretLeft8 = "\xedd5"; + public const string CaretRight8 = "\xedd6"; + public const string CaretUp8 = "\xedd7"; + public const string CaretDown8 = "\xedd8"; + public const string CaretLeftSolid8 = "\xedd9"; + public const string CaretRightSolid8 = "\xedda"; + public const string CaretUpSolid8 = "\xeddb"; + public const string CaretDownSolid8 = "\xeddc"; + public const string Strikethrough = "\xede0"; + public const string Export = "\xede1"; + public const string ExportMirrored = "\xede2"; + public const string ButtonMenu = "\xede3"; + public const string CloudSearch = "\xede4"; + public const string PinyinIMELogo = "\xede5"; + public const string CalligraphyPen = "\xedfb"; + public const string ReplyMirrored = "\xee35"; + public const string LockscreenDesktop = "\xee3f"; + public const string TaskViewSettings = "\xee40"; + public const string MiniExpand2Mirrored = "\xee47"; + public const string MiniContract2Mirrored = "\xee49"; + public const string Play36 = "\xee4a"; + public const string PenPalette = "\xee56"; + public const string GuestUser = "\xee57"; + public const string SettingsBattery = "\xee63"; + public const string TaskbarPhone = "\xee64"; + public const string LockScreenGlance = "\xee65"; + public const string GenericScan = "\xee6f"; + public const string ImageExport = "\xee71"; + public const string WifiEthernet = "\xee77"; + public const string ActionCenterQuiet = "\xee79"; + public const string ActionCenterQuietNotification = "\xee7a"; + public const string TrackersMirrored = "\xee92"; + public const string DateTimeMirrored = "\xee93"; + public const string Wheel = "\xee94"; + public const string VirtualMachineGroup = "\xeea3"; + public const string ButtonView2 = "\xeeca"; + public const string PenWorkspaceMirrored = "\xef15"; + public const string PenPaletteMirrored = "\xef16"; + public const string StrokeEraseMirrored = "\xef17"; + public const string PointEraseMirrored = "\xef18"; + public const string ClearAllInkMirrored = "\xef19"; + public const string BackgroundToggle = "\xef1f"; + public const string Marquee = "\xef20"; + public const string ChromeCloseContrast = "\xef2c"; + public const string ChromeMinimizeContrast = "\xef2d"; + public const string ChromeMaximizeContrast = "\xef2e"; + public const string ChromeRestoreContrast = "\xef2f"; + public const string TrafficLight = "\xef31"; + public const string Replay = "\xef3b"; + public const string Eyedropper = "\xef3c"; + public const string LineDisplay = "\xef3d"; + public const string PINPad = "\xef3e"; + public const string SignatureCapture = "\xef3f"; + public const string ChipCardCreditCardReader = "\xef40"; + public const string MarketDown = "\xef42"; + public const string PlayerSettings = "\xef58"; + public const string LandscapeOrientation = "\xef6b"; + public const string Flow = "\xef90"; + public const string Touchpad = "\xefa5"; + public const string Speech = "\xefa9"; + public const string KnowledgeArticle = "\xf000"; + public const string Relationship = "\xf003"; + public const string ZipFolder = "\xf012"; + public const string DefaultAPN = "\xf080"; + public const string UserAPN = "\xf081"; + public const string DoublePinyin = "\xf085"; + public const string BlueLight = "\xf08c"; + public const string CaretSolidLeft = "\xf08d"; + public const string CaretSolidDown = "\xf08e"; + public const string CaretSolidRight = "\xf08f"; + public const string CaretSolidUp = "\xf090"; + public const string ButtonA = "\xf093"; + public const string ButtonB = "\xf094"; + public const string ButtonY = "\xf095"; + public const string ButtonX = "\xf096"; + public const string ArrowUp8 = "\xf0ad"; + public const string ArrowDown8 = "\xf0ae"; + public const string ArrowRight8 = "\xf0af"; + public const string ArrowLeft8 = "\xf0b0"; + public const string QuarentinedItems = "\xf0b2"; + public const string QuarentinedItemsMirrored = "\xf0b3"; + public const string Protractor = "\xf0b4"; + public const string ChecklistMirrored = "\xf0b5"; + public const string StatusCircle7 = "\xf0b6"; + public const string StatusCheckmark7 = "\xf0b7"; + public const string StatusErrorCircle7 = "\xf0b8"; + public const string Connected = "\xf0b9"; + public const string PencilFill = "\xf0c6"; + public const string CalligraphyFill = "\xf0c7"; + public const string QuarterStarLeft = "\xf0ca"; + public const string QuarterStarRight = "\xf0cb"; + public const string ThreeQuarterStarLeft = "\xf0cc"; + public const string ThreeQuarterStarRight = "\xf0cd"; + public const string QuietHoursBadge12 = "\xf0ce"; + public const string BackMirrored = "\xf0d2"; + public const string ForwardMirrored = "\xf0d3"; + public const string ChromeBackContrast = "\xf0d5"; + public const string ChromeBackContrastMirrored = "\xf0d6"; + public const string ChromeBackToWindowContrast = "\xf0d7"; + public const string ChromeFullScreenContrast = "\xf0d8"; + public const string GridView = "\xf0e2"; + public const string ClipboardList = "\xf0e3"; + public const string ClipboardListMirrored = "\xf0e4"; + public const string OutlineQuarterStarLeft = "\xf0e5"; + public const string OutlineQuarterStarRight = "\xf0e6"; + public const string OutlineHalfStarLeft = "\xf0e7"; + public const string OutlineHalfStarRight = "\xf0e8"; + public const string OutlineThreeQuarterStarLeft = "\xf0e9"; + public const string OutlineThreeQuarterStarRight = "\xf0ea"; + public const string SpatialVolume0 = "\xf0eb"; + public const string SpatialVolume1 = "\xf0ec"; + public const string SpatialVolume2 = "\xf0ed"; + public const string SpatialVolume3 = "\xf0ee"; + public const string ApplicationGuard = "\xf0ef"; + public const string OutlineStarLeftHalf = "\xf0f7"; + public const string OutlineStarRightHalf = "\xf0f8"; + public const string ChromeAnnotateContrast = "\xf0f9"; + public const string DefenderBadge12 = "\xf0fb"; + public const string DetachablePC = "\xf103"; + public const string LeftStick = "\xf108"; + public const string RightStick = "\xf109"; + public const string TriggerLeft = "\xf10a"; + public const string TriggerRight = "\xf10b"; + public const string BumperLeft = "\xf10c"; + public const string BumperRight = "\xf10d"; + public const string Dpad = "\xf10e"; + public const string EnglishPunctuation = "\xf110"; + public const string ChinesePunctuation = "\xf111"; + public const string HMD = "\xf119"; + public const string CtrlSpatialRight = "\xf11b"; + public const string PaginationDotOutline10 = "\xf126"; + public const string PaginationDotSolid10 = "\xf127"; + public const string StrokeErase2 = "\xf128"; + public const string SmallErase = "\xf129"; + public const string LargeErase = "\xf12a"; + public const string FolderHorizontal = "\xf12b"; + public const string MicrophoneListening = "\xf12e"; + public const string StatusExclamationCircle7 = "\xf12f"; + public const string Video360 = "\xf131"; + public const string GiftboxOpen = "\xf133"; + public const string StatusCircleOuter = "\xf136"; + public const string StatusCircleInner = "\xf137"; + public const string StatusCircleRing = "\xf138"; + public const string StatusTriangleOuter = "\xf139"; + public const string StatusTriangleInner = "\xf13a"; + public const string StatusTriangleExclamation = "\xf13b"; + public const string StatusCircleExclamation = "\xf13c"; + public const string StatusCircleErrorX = "\xf13d"; + public const string StatusCircleCheckmark = "\xf13e"; + public const string StatusCircleInfo = "\xf13f"; + public const string StatusCircleBlock = "\xf140"; + public const string StatusCircleBlock2 = "\xf141"; + public const string StatusCircleQuestionMark = "\xf142"; + public const string StatusCircleSync = "\xf143"; + public const string Dial1 = "\xf146"; + public const string Dial2 = "\xf147"; + public const string Dial3 = "\xf148"; + public const string Dial4 = "\xf149"; + public const string Dial5 = "\xf14a"; + public const string Dial6 = "\xf14b"; + public const string Dial7 = "\xf14c"; + public const string Dial8 = "\xf14d"; + public const string Dial9 = "\xf14e"; + public const string Dial10 = "\xf14f"; + public const string Dial11 = "\xf150"; + public const string Dial12 = "\xf151"; + public const string Dial13 = "\xf152"; + public const string Dial14 = "\xf153"; + public const string Dial15 = "\xf154"; + public const string Dial16 = "\xf155"; + public const string DialShape1 = "\xf156"; + public const string DialShape2 = "\xf157"; + public const string DialShape3 = "\xf158"; + public const string DialShape4 = "\xf159"; + public const string ClosedCaptionsInternational = "\xf15f"; + public const string TollSolid = "\xf161"; + public const string TrafficCongestionSolid = "\xf163"; + public const string ExploreContentSingle = "\xf164"; + public const string CollapseContent = "\xf165"; + public const string CollapseContentSingle = "\xf166"; + public const string InfoSolid = "\xf167"; + public const string GroupList = "\xf168"; + public const string CaretBottomRightSolidCenter8 = "\xf169"; + public const string ProgressRingDots = "\xf16a"; + public const string Checkbox14 = "\xf16b"; + public const string CheckboxComposite14 = "\xf16c"; + public const string CheckboxIndeterminateCombo14 = "\xf16d"; + public const string CheckboxIndeterminateCombo = "\xf16e"; + public const string StatusPause7 = "\xf175"; + public const string CharacterAppearance = "\xf17f"; + public const string Lexicon = "\xf180"; + public const string ScreenTime = "\xf182"; + public const string HeadlessDevice = "\xf191"; + public const string NetworkSharing = "\xf193"; + public const string EyeGaze = "\xf19d"; + public const string ToggleLeft = "\xf19e"; + public const string ToggleRight = "\xf19f"; + public const string WindowsInsider = "\xf1ad"; + public const string ChromeSwitch = "\xf1cb"; + public const string ChromeSwitchContast = "\xf1cc"; + public const string StatusCheckmark = "\xf1d8"; + public const string StatusCheckmarkLeft = "\xf1d9"; + public const string KeyboardLeftAligned = "\xf20c"; + public const string KeyboardRightAligned = "\xf20d"; + public const string KeyboardSettings = "\xf210"; + public const string NetworkPhysical = "\xf211"; + public const string IOT = "\xf22c"; + public const string UnknownMirrored = "\xf22e"; + public const string ViewDashboard = "\xf246"; + public const string ExploitProtectionSettings = "\xf259"; + public const string KeyboardNarrow = "\xf260"; + public const string Keyboard12Key = "\xf261"; + public const string KeyboardDock = "\xf26b"; + public const string KeyboardUndock = "\xf26c"; + public const string KeyboardLeftDock = "\xf26d"; + public const string KeyboardRightDock = "\xf26e"; + public const string Ear = "\xf270"; + public const string PointerHand = "\xf271"; + public const string Bullseye = "\xf272"; + public const string DocumentApproval = "\xf28b"; + public const string LocaleLanguage = "\xf2b7"; + public const string PassiveAuthentication = "\xf32a"; + public const string ColorSolid = "\xf354"; + public const string NetworkOffline = "\xf384"; + public const string NetworkConnected = "\xf385"; + public const string NetworkConnectedCheckmark = "\xf386"; + public const string SignOut = "\xf3b1"; + public const string StatusInfo = "\xf3cc"; + public const string StatusInfoLeft = "\xf3cd"; + public const string NearbySharing = "\xf3e2"; + public const string CtrlSpatialLeft = "\xf3e7"; + public const string InteractiveDashboard = "\xf404"; + public const string DeclineCall = "\xf405"; + public const string ClippingTool = "\xf406"; + public const string RectangularClipping = "\xf407"; + public const string FreeFormClipping = "\xf408"; + public const string CopyTo = "\xf413"; + public const string IDBadge = "\xf427"; + public const string DynamicLock = "\xf439"; + public const string PenTips = "\xf45e"; + public const string PenTipsMirrored = "\xf45f"; + public const string HWPJoin = "\xf460"; + public const string HWPInsert = "\xf461"; + public const string HWPStrikeThrough = "\xf462"; + public const string HWPScratchOut = "\xf463"; + public const string HWPSplit = "\xf464"; + public const string HWPNewLine = "\xf465"; + public const string HWPOverwrite = "\xf466"; + public const string MobWifiWarning1 = "\xf473"; + public const string MobWifiWarning2 = "\xf474"; + public const string MobWifiWarning3 = "\xf475"; + public const string MobWifiWarning4 = "\xf476"; + public const string MicLocationCombo = "\xf47f"; + public const string Globe2 = "\xf49a"; + public const string SpecialEffectSize = "\xf4a5"; + public const string GIF = "\xf4a9"; + public const string Sticker2 = "\xf4aa"; + public const string SurfaceHubSelected = "\xf4be"; + public const string HoloLensSelected = "\xf4bf"; + public const string Earbud = "\xf4c0"; + public const string MixVolumes = "\xf4c3"; + public const string Safe = "\xf540"; + public const string LaptopSecure = "\xf552"; + public const string PrintDefault = "\xf56d"; + public const string PageMirrored = "\xf56e"; + public const string LandscapeOrientationMirrored = "\xf56f"; + public const string ColorOff = "\xf570"; + public const string PrintAllPages = "\xf571"; + public const string PrintCustomRange = "\xf572"; + public const string PageMarginPortraitNarrow = "\xf573"; + public const string PageMarginPortraitNormal = "\xf574"; + public const string PageMarginPortraitModerate = "\xf575"; + public const string PageMarginPortraitWide = "\xf576"; + public const string PageMarginLandscapeNarrow = "\xf577"; + public const string PageMarginLandscapeNormal = "\xf578"; + public const string PageMarginLandscapeModerate = "\xf579"; + public const string PageMarginLandscapeWide = "\xf57a"; + public const string CollateLandscape = "\xf57b"; + public const string CollatePortrait = "\xf57c"; + public const string CollatePortraitSeparated = "\xf57d"; + public const string DuplexLandscapeOneSided = "\xf57e"; + public const string DuplexLandscapeOneSidedMirrored = "\xf57f"; + public const string DuplexLandscapeTwoSidedLongEdge = "\xf580"; + public const string DuplexLandscapeTwoSidedLongEdgeMirrored = "\xf581"; + public const string DuplexLandscapeTwoSidedShortEdge = "\xf582"; + public const string DuplexLandscapeTwoSidedShortEdgeMirrored = "\xf583"; + public const string DuplexPortraitOneSided = "\xf584"; + public const string DuplexPortraitOneSidedMirrored = "\xf585"; + public const string DuplexPortraitTwoSidedLongEdge = "\xf586"; + public const string DuplexPortraitTwoSidedLongEdgeMirrored = "\xf587"; + public const string DuplexPortraitTwoSidedShortEdge = "\xf588"; + public const string DuplexPortraitTwoSidedShortEdgeMirrored = "\xf589"; + public const string PPSOneLandscape = "\xf58a"; + public const string PPSTwoLandscape = "\xf58b"; + public const string PPSTwoPortrait = "\xf58c"; + public const string PPSFourLandscape = "\xf58d"; + public const string PPSFourPortrait = "\xf58e"; + public const string HolePunchOff = "\xf58f"; + public const string HolePunchPortraitLeft = "\xf590"; + public const string HolePunchPortraitRight = "\xf591"; + public const string HolePunchPortraitTop = "\xf592"; + public const string HolePunchPortraitBottom = "\xf593"; + public const string HolePunchLandscapeLeft = "\xf594"; + public const string HolePunchLandscapeRight = "\xf595"; + public const string HolePunchLandscapeTop = "\xf596"; + public const string HolePunchLandscapeBottom = "\xf597"; + public const string StaplingOff = "\xf598"; + public const string StaplingPortraitTopLeft = "\xf599"; + public const string StaplingPortraitTopRight = "\xf59a"; + public const string StaplingPortraitBottomRight = "\xf59b"; + public const string StaplingPortraitTwoLeft = "\xf59c"; + public const string StaplingPortraitTwoRight = "\xf59d"; + public const string StaplingPortraitTwoTop = "\xf59e"; + public const string StaplingPortraitTwoBottom = "\xf59f"; + public const string StaplingPortraitBookBinding = "\xf5a0"; + public const string StaplingLandscapeTopLeft = "\xf5a1"; + public const string StaplingLandscapeTopRight = "\xf5a2"; + public const string StaplingLandscapeBottomLeft = "\xf5a3"; + public const string StaplingLandscapeBottomRight = "\xf5a4"; + public const string StaplingLandscapeTwoLeft = "\xf5a5"; + public const string StaplingLandscapeTwoRight = "\xf5a6"; + public const string StaplingLandscapeTwoTop = "\xf5a7"; + public const string StaplingLandscapeTwoBottom = "\xf5a8"; + public const string StaplingLandscapeBookBinding = "\xf5a9"; + public const string StatusDataTransferRoaming = "\xf5aa"; + public const string MobSIMError = "\xf5ab"; + public const string CollateLandscapeSeparated = "\xf5ac"; + public const string PPSOnePortrait = "\xf5ad"; + public const string StaplingPortraitBottomLeft = "\xf5ae"; + public const string PlaySolid = "\xf5b0"; + public const string RepeatOff = "\xf5e7"; + public const string Set = "\xf5ed"; + public const string SetSolid = "\xf5ee"; + public const string FuzzyReading = "\xf5ef"; + public const string VerticalBattery0 = "\xf5f2"; + public const string VerticalBattery1 = "\xf5f3"; + public const string VerticalBattery2 = "\xf5f4"; + public const string VerticalBattery3 = "\xf5f5"; + public const string VerticalBattery4 = "\xf5f6"; + public const string VerticalBattery5 = "\xf5f7"; + public const string VerticalBattery6 = "\xf5f8"; + public const string VerticalBattery7 = "\xf5f9"; + public const string VerticalBattery8 = "\xf5fa"; + public const string VerticalBattery9 = "\xf5fb"; + public const string VerticalBattery10 = "\xf5fc"; + public const string VerticalBatteryCharging0 = "\xf5fd"; + public const string VerticalBatteryCharging1 = "\xf5fe"; + public const string VerticalBatteryCharging2 = "\xf5ff"; + public const string VerticalBatteryCharging3 = "\xf600"; + public const string VerticalBatteryCharging4 = "\xf601"; + public const string VerticalBatteryCharging5 = "\xf602"; + public const string VerticalBatteryCharging6 = "\xf603"; + public const string VerticalBatteryCharging7 = "\xf604"; + public const string VerticalBatteryCharging8 = "\xf605"; + public const string VerticalBatteryCharging9 = "\xf606"; + public const string VerticalBatteryCharging10 = "\xf607"; + public const string VerticalBatteryUnknown = "\xf608"; + public const string SIMError = "\xf618"; + public const string SIMMissing = "\xf619"; + public const string SIMLock = "\xf61a"; + public const string ESIM = "\xf61b"; + public const string ESIMNoProfile = "\xf61c"; + public const string ESIMLocked = "\xf61d"; + public const string ESIMBusy = "\xf61e"; + public const string NoiseCancelation = "\xf61f"; + public const string NoiseCancelationOff = "\xf620"; + public const string MusicSharing = "\xf623"; + public const string MusicSharingOff = "\xf624"; + public const string CircleShapeSolid = "\xf63c"; + public const string WifiCallBars = "\xf657"; + public const string WifiCall0 = "\xf658"; + public const string WifiCall1 = "\xf659"; + public const string WifiCall2 = "\xf65a"; + public const string WifiCall3 = "\xf65b"; + public const string WifiCall4 = "\xf65c"; + public const string CHTLanguageBar = "\xf69e"; + public const string ComposeMode = "\xf6a9"; + public const string ExpressiveInputEntry = "\xf6b8"; + public const string EmojiTabMoreSymbols = "\xf6ba"; + public const string WebSearch = "\xf6fa"; + public const string Kiosk = "\xf712"; + public const string RTTLogo = "\xf714"; + public const string VoiceCall = "\xf715"; + public const string GoToMessage = "\xf716"; + public const string ReturnToCall = "\xf71a"; + public const string StartPresenting = "\xf71c"; + public const string StopPresenting = "\xf71d"; + public const string ProductivityMode = "\xf71e"; + public const string SetHistoryStatus = "\xf738"; + public const string SetHistoryStatus2 = "\xf739"; + public const string Keyboardsettings20 = "\xf73d"; + public const string OneHandedRight20 = "\xf73e"; + public const string OneHandedLeft20 = "\xf73f"; + public const string Split20 = "\xf740"; + public const string Full20 = "\xf741"; + public const string Handwriting20 = "\xf742"; + public const string ChevronLeft20 = "\xf743"; + public const string ChevronLeft32 = "\xf744"; + public const string ChevronRight20 = "\xf745"; + public const string ChevronRight32 = "\xf746"; + public const string Event12 = "\xf763"; + public const string MicOff2 = "\xf781"; + public const string DeliveryOptimization = "\xf785"; + public const string CancelMedium = "\xf78a"; + public const string SearchMedium = "\xf78b"; + public const string AcceptMedium = "\xf78c"; + public const string RevealPasswordMedium = "\xf78d"; + public const string DeleteWord = "\xf7ad"; + public const string DeleteWordFill = "\xf7ae"; + public const string DeleteLines = "\xf7af"; + public const string DeleteLinesFill = "\xf7b0"; + public const string InstertWords = "\xf7b1"; + public const string InstertWordsFill = "\xf7b2"; + public const string JoinWords = "\xf7b3"; + public const string JoinWordsFill = "\xf7b4"; + public const string OverwriteWords = "\xf7b5"; + public const string OverwriteWordsFill = "\xf7b6"; + public const string AddNewLine = "\xf7b7"; + public const string AddNewLineFill = "\xf7b8"; + public const string OverwriteWordsKorean = "\xf7b9"; + public const string OverwriteWordsFillKorean = "\xf7ba"; + public const string EducationIcon = "\xf7bb"; + public const string WindowSnipping = "\xf7ed"; + public const string VideoCapture = "\xf7ee"; + public const string StatusSecured = "\xf809"; + public const string NarratorApp = "\xf83b"; + public const string PowerButtonUpdate = "\xf83d"; + public const string RestartUpdate = "\xf83e"; + public const string UpdateStatusDot = "\xf83f"; + public const string Eject = "\xf847"; + public const string Spelling = "\xf87b"; + public const string SpellingKorean = "\xf87c"; + public const string SpellingSerbian = "\xf87d"; + public const string SpellingChinese = "\xf87e"; + public const string FolderSelect = "\xf89a"; + public const string SmartScreen = "\xf8a5"; + public const string ExploitProtection = "\xf8a6"; + public const string AddBold = "\xf8aa"; + public const string SubtractBold = "\xf8ab"; + public const string BackSolidBold = "\xf8ac"; + public const string ForwardSolidBold = "\xf8ad"; + public const string PauseBold = "\xf8ae"; + public const string ClickSolid = "\xf8af"; + public const string SettingsSolid = "\xf8b0"; + public const string MicrophoneSolidBold = "\xf8b1"; + public const string SpeechSolidBold = "\xf8b2"; + public const string ClickedOutLoudSolidBold = "\xf8b3"; +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/Toast.cs b/src/Wpf.Ui.Violeta/Controls/Toast/Toast.cs new file mode 100644 index 0000000..13ef3b8 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/Toast.cs @@ -0,0 +1,50 @@ +using System.Linq; +using System.Windows; + +namespace Wpf.Ui.Violeta.Controls; + +public static class Toast +{ + public static void Information(FrameworkElement owner, string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(owner, message, new ToastConfig(ToastIcon.Information, location, offsetMargin, time)); + + public static void Information(string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(null!, message, new ToastConfig(ToastIcon.Information, location, offsetMargin, time)); + + public static void Success(FrameworkElement owner, string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(owner, message, new ToastConfig(ToastIcon.Success, location, offsetMargin, time)); + + public static void Success(string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(null!, message, new ToastConfig(ToastIcon.Success, location, offsetMargin, time)); + + public static void Error(FrameworkElement owner, string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(owner, message, new ToastConfig(ToastIcon.Error, location, offsetMargin, time)); + + public static void Error(string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(null!, message, new ToastConfig(ToastIcon.Error, location, offsetMargin, time)); + + public static void Warning(FrameworkElement owner, string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(owner, message, new ToastConfig(ToastIcon.Warning, location, offsetMargin, time)); + + public static void Warning(string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(null!, message, new ToastConfig(ToastIcon.Warning, location, offsetMargin, time)); + + public static void Question(FrameworkElement owner, string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(owner, message, new ToastConfig(ToastIcon.Question, location, offsetMargin, time)); + + public static void Question(string message, ToastLocation location = ToastLocation.TopCenter, Thickness offsetMargin = default, int time = ToastConfig.NormalTime) + => Show(null!, message, new ToastConfig(ToastIcon.Question, location, offsetMargin, time)); + + public static void Show(FrameworkElement owner, string message, ToastConfig? options = null) + { + ToastControl toast = new(owner ?? Owner(), message, options); + toast.ShowCore(); + } + + public static FrameworkElement Owner() + { + return Application.Current.Windows.OfType() + .Where(win => win.IsActive) + .FirstOrDefault(); + } +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastConfig.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastConfig.cs new file mode 100644 index 0000000..59ff506 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastConfig.cs @@ -0,0 +1,43 @@ +using System.Windows; +using System.Windows.Media; + +namespace Wpf.Ui.Violeta.Controls; + +public sealed class ToastConfig +{ + public const int FastTime = 1500; + public const int NormalTime = 2000; + public const int SlowTime = 3000; + + public int Time { get; set; } = NormalTime; + + public ToastIcon ToastIcon { get; set; } = ToastIcon.None; + public ToastLocation Location { get; set; } = ToastLocation.TopCenter; + + public FontStyle FontStyle { get; set; } = SystemFonts.MessageFontStyle; + public FontStretch FontStretch { get; set; } = FontStretches.Normal; + public double FontSize { get; set; } = SystemFonts.MessageFontSize; + public FontWeight FontWeight { get; set; } = SystemFonts.MenuFontWeight; + public double IconSize { get; set; } = 16d; + public CornerRadius CornerRadius { get; set; } = new CornerRadius(3d); + public Brush BorderBrush { get; set; } = (Brush)new BrushConverter().ConvertFromString("#1B1B1B"); + public Thickness BorderThickness { get; set; } = new Thickness(1d); + public HorizontalAlignment HorizontalContentAlignment { get; set; } = HorizontalAlignment.Left; + public VerticalAlignment VerticalContentAlignment { get; set; } = VerticalAlignment.Center; + public Thickness OffsetMargin { get; set; } = new Thickness(15d); + + public ToastConfig() + { + } + + public ToastConfig(ToastIcon icon, ToastLocation location, Thickness offsetMargin, int time) : this() + { + ToastIcon = icon; + Location = location; + if (offsetMargin != default) + { + OffsetMargin = offsetMargin; + } + Time = time; + } +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastControl.xaml b/src/Wpf.Ui.Violeta/Controls/Toast/ToastControl.xaml new file mode 100644 index 0000000..d404fa9 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastControl.xaml @@ -0,0 +1,55 @@ + + + pack://application:,,,/Wpf.Ui.Violeta;component/Resources/Fonts/Segoe Fluent Icons.ttf#Segoe Fluent Icons + + + + + + + + + + + + diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastControl.xaml.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastControl.xaml.cs new file mode 100644 index 0000000..c183f82 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastControl.xaml.cs @@ -0,0 +1,301 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Media; +using System.Windows.Threading; +using Wpf.Ui.Violeta.Win32; + +namespace Wpf.Ui.Violeta.Controls; + +public partial class ToastControl : UserControl +{ + public Window Window { get; internal set; } = null!; + public FrameworkElement Owner { get; private set; } = null!; + public Popup Popup { get; internal set; } = null!; + public DispatcherTimer Timer { get; set; } = null!; + public Thickness OffsetMargin { get; set; } = new Thickness(15); + public ToastConfig? Options { get; set; } = null!; + + public ToastControl() : this(null!, string.Empty) + { + } + + public ToastControl(FrameworkElement owner, string message, ToastConfig? options = null) + { + InitializeComponent(); + DataContext = this; + Options = options; + + if (Options != null) + { + Time = Options.Time; + ToastIcon = Options.ToastIcon; + IconSize = Options.IconSize; + Location = Options.Location; + FontStyle = Options.FontStyle; + FontStretch = Options.FontStretch; + FontSize = Options.FontSize; + FontWeight = Options.FontWeight; + BorderBrush = Options.BorderBrush; + BorderThickness = Options.BorderThickness; + CornerRadius = Options.CornerRadius; + HorizontalContentAlignment = Options.HorizontalContentAlignment; + VerticalContentAlignment = Options.VerticalContentAlignment; + OffsetMargin = Options.OffsetMargin; + } + + Message = message; + Owner = owner ?? Application.Current.MainWindow; + Window = Window.GetWindow(Owner); + if (Window != null) + { + Window.Closed += (s, e) => Close(); + } + } + + internal void ShowCore() + { + if (Window == null) + { + return; + } + + Window.Dispatcher.Invoke(() => + { + Popup = new Popup() + { + Width = double.NaN, + Height = double.NaN, + PopupAnimation = PopupAnimation.Fade, + AllowsTransparency = true, + StaysOpen = true, + Placement = PlacementMode.Relative, + IsOpen = false, + Child = this, + PlacementTarget = Window, + }; + + Window.LocationChanged += OnUpdatePosition; + Window.SizeChanged += OnUpdatePosition; + + SetPopupOffset(Popup, this); + + Popup.Opened += OnUpdatePosition; + Popup.Closed += (s, _) => + { + if (s is not Popup popup) + { + return; + } + if (popup.Child is not ToastControl t) + { + return; + } + }; + Popup.IsOpen = true; + }); + + Timer = new DispatcherTimer(); + Timer.Tick += (_, _) => + { + Popup.IsOpen = false; + Window.LocationChanged -= OnUpdatePosition; + Window.SizeChanged -= OnUpdatePosition; + }; + Timer.Interval = TimeSpan.FromMilliseconds(Options?.Time ?? ToastConfig.NormalTime); + Timer.Start(); + } + + protected virtual void OnUpdatePosition(object? sender, EventArgs e) + { + var up = typeof(Popup).GetMethod("UpdatePosition", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); + if (up == null || Popup == null) + { + return; + } + SetPopupOffset(Popup, this); + up.Invoke(Popup, null); + } + + protected virtual void SetPopupOffset(Popup popup, ToastControl toast) + { + double ownerWidth = toast.Owner.RenderSize.Width; + double ownerHeight = toast.Owner.RenderSize.Height; + + double popupWidth = popup.Child.RenderSize.Width; + double popupHeight = popup.Child.RenderSize.Height; + + Thickness offset = toast.OffsetMargin; + + if (popup.PlacementTarget == null) + { + ownerWidth = SystemParameters.WorkArea.Size.Width * DpiHelper.ScaleX; + ownerHeight = SystemParameters.WorkArea.Size.Height * DpiHelper.ScaleY; + } + + switch (toast.Location) + { + case ToastLocation.Center: + popup.HorizontalOffset = (ownerWidth - popupWidth) / 2d; + popup.VerticalOffset = (ownerHeight - popupHeight) / 2d; + break; + + case ToastLocation.Left: + popup.HorizontalOffset = offset.Left; + popup.VerticalOffset = (ownerHeight - popupHeight) / 2d; + break; + + case ToastLocation.Right: + popup.HorizontalOffset = ownerWidth - popupWidth - offset.Right; + popup.VerticalOffset = (ownerHeight - popupHeight) / 2d; + break; + + case ToastLocation.TopLeft: + popup.HorizontalOffset = offset.Left; + popup.VerticalOffset = toast.OffsetMargin.Top + offset.Top; + break; + + case ToastLocation.TopCenter: + popup.HorizontalOffset = (ownerWidth - popupWidth) / 2d; + popup.VerticalOffset = toast.OffsetMargin.Top + offset.Top; + break; + + case ToastLocation.TopRight: + popup.HorizontalOffset = ownerWidth - popupWidth - offset.Right; + popup.VerticalOffset = toast.OffsetMargin.Top + offset.Top; + break; + + case ToastLocation.BottomLeft: + popup.HorizontalOffset = offset.Left; + popup.VerticalOffset = ownerHeight - popupHeight - offset.Bottom; + break; + + case ToastLocation.BottomCenter: + popup.HorizontalOffset = (ownerWidth - popupWidth) / 2d; + popup.VerticalOffset = ownerHeight - popupHeight - offset.Bottom; + break; + + case ToastLocation.BottomRight: + popup.HorizontalOffset = ownerWidth - popupWidth - offset.Right; + popup.VerticalOffset = ownerHeight - popupHeight - offset.Bottom; + break; + } + } + + public void Close() + { + if (Timer != null) + { + Timer.Stop(); + Timer = null!; + } + Popup.IsOpen = false; + Window.LocationChanged -= OnUpdatePosition; + Window.SizeChanged -= OnUpdatePosition; + } + + public string Message + { + get => (string)GetValue(MessageProperty); + set => SetValue(MessageProperty, value); + } + + public static readonly DependencyProperty MessageProperty = DependencyProperty.Register("Message", typeof(string), typeof(ToastControl), new PropertyMetadata(string.Empty)); + + public CornerRadius CornerRadius + { + get => (CornerRadius)GetValue(CornerRadiusProperty); + set => SetValue(CornerRadiusProperty, value); + } + + public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(ToastControl), new PropertyMetadata(new CornerRadius(5))); + + public double IconSize + { + get => (double)GetValue(IconSizeProperty); + set => SetValue(IconSizeProperty, value); + } + + public static readonly DependencyProperty IconSizeProperty = DependencyProperty.Register("IconSize", typeof(double), typeof(ToastControl), new PropertyMetadata(26.0)); + + public new Brush BorderBrush + { + get => (Brush)GetValue(BorderBrushProperty); + set => SetValue(BorderBrushProperty, value); + } + + public new static readonly DependencyProperty BorderBrushProperty = DependencyProperty.Register("BorderBrush", typeof(Brush), typeof(ToastControl), new PropertyMetadata((Brush)new BrushConverter().ConvertFromString("#E1E1E1"))); + + public new Thickness BorderThickness + { + get => (Thickness)GetValue(BorderThicknessProperty); + set => SetValue(BorderThicknessProperty, value); + } + + public new static readonly DependencyProperty BorderThicknessProperty = DependencyProperty.Register("BorderThickness", typeof(Thickness), typeof(ToastControl), new PropertyMetadata(new Thickness(0.5d))); + + public new Brush Background + { + get => (Brush)GetValue(BackgroundProperty); + set => SetValue(BackgroundProperty, value); + } + + public new static readonly DependencyProperty BackgroundProperty = DependencyProperty.Register("Background", typeof(Brush), typeof(ToastControl), new PropertyMetadata((Brush)new BrushConverter().ConvertFromString("#FAFAFA"))); + + public new HorizontalAlignment HorizontalContentAlignment + { + get => (HorizontalAlignment)GetValue(HorizontalContentAlignmentProperty); + set => SetValue(HorizontalContentAlignmentProperty, value); + } + + public new static readonly DependencyProperty HorizontalContentAlignmentProperty = DependencyProperty.Register("HorizontalContentAlignment", typeof(HorizontalAlignment), typeof(ToastControl), new PropertyMetadata(HorizontalAlignment.Left)); + + public new VerticalAlignment VerticalContentAlignment + { + get => (VerticalAlignment)GetValue(VerticalContentAlignmentProperty); + set => SetValue(VerticalContentAlignmentProperty, value); + } + + public new static readonly DependencyProperty VerticalContentAlignmentProperty = DependencyProperty.Register("VerticalContentAlignment", typeof(VerticalAlignment), typeof(ToastControl), new PropertyMetadata(VerticalAlignment.Center)); + + public new double Width + { + get => (double)GetValue(WidthProperty); + set => SetValue(WidthProperty, value); + } + + public new static readonly DependencyProperty WidthProperty = DependencyProperty.Register("Width", typeof(double), typeof(ToastControl), new PropertyMetadata(100d)); + + public new double Height + { + get => (double)GetValue(HeightProperty); + set => SetValue(HeightProperty, value); + } + + public new static readonly DependencyProperty HeightProperty = DependencyProperty.Register("Height", typeof(double), typeof(ToastControl), new PropertyMetadata(48.0)); + + public ToastIcon ToastIcon + { + get => (ToastIcon)GetValue(MessageBoxIconProperty); + set => SetValue(MessageBoxIconProperty, value); + } + + public static readonly DependencyProperty MessageBoxIconProperty = DependencyProperty.Register("ToastIcon", typeof(ToastIcon), typeof(ToastControl)); + + public int Time + { + get => (int)GetValue(TimeProperty); + set => SetValue(TimeProperty, value); + } + + public static readonly DependencyProperty TimeProperty = DependencyProperty.Register("Time", typeof(int), typeof(ToastControl), new PropertyMetadata(ToastConfig.NormalTime)); + + public ToastLocation Location + { + get => (ToastLocation)GetValue(LocationProperty); + set => SetValue(LocationProperty, value); + } + + public static readonly DependencyProperty LocationProperty = DependencyProperty.Register("Location", typeof(ToastLocation), typeof(ToastControl), new PropertyMetadata(ToastLocation.TopCenter)); +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastIcon.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIcon.cs new file mode 100644 index 0000000..d45ea5b --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIcon.cs @@ -0,0 +1,11 @@ +namespace Wpf.Ui.Violeta.Controls; + +public enum ToastIcon +{ + None, + Information, + Success, + Error, + Warning, + Question, +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconConverter.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconConverter.cs new file mode 100644 index 0000000..5ebad77 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconConverter.cs @@ -0,0 +1,34 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Wpf.Ui.Violeta.Controls; + +[ValueConversion(typeof(ToastIcon), typeof(string))] +internal sealed class ToastIconConverter : IValueConverter +{ + public static ToastIconConverter Default => new(); + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is ToastIcon icon) + { + return icon switch + { + ToastIcon.Information => FontSymbols.Info, + ToastIcon.Success => FontSymbols.Accept, + ToastIcon.Warning => FontSymbols.Warning, + ToastIcon.Error => FontSymbols.Cancel, + ToastIcon.Question => FontSymbols.Unknown, + ToastIcon.None or _ => string.Empty, + }; + } + return string.Empty; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return DependencyProperty.UnsetValue; + } +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconForegroundConverter.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconForegroundConverter.cs new file mode 100644 index 0000000..fa4b784 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconForegroundConverter.cs @@ -0,0 +1,42 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Media; + +namespace Wpf.Ui.Violeta.Controls; + +[ValueConversion(typeof(ToastIcon), typeof(SolidColorBrush))] +internal sealed class ToastIconForegroundConverter : IValueConverter +{ + public static ToastIconForegroundConverter Default => new(); + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is ToastIcon icon) + { + return icon switch + { + ToastIcon.Information => "#55CEF1".ToColor().ToBrush(), + ToastIcon.Success => "#75CD43".ToColor().ToBrush(), + ToastIcon.Warning => "#F9D01A".ToColor().ToBrush(), + ToastIcon.Error => "#FF5656".ToColor().ToBrush(), + ToastIcon.Question => "#55CEF1".ToColor().ToBrush(), + ToastIcon.None or _ => "#55CEF1".ToColor().ToBrush(), + }; + } + return "#55CEF1".ToColor().ToBrush(); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return DependencyProperty.UnsetValue; + } +} + +file static class ColorExtension +{ + public static Color ToColor(this string hex) => (Color)ColorConverter.ConvertFromString(hex); + + public static SolidColorBrush ToBrush(this Color color) => new(color); +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconVisibilityConverter.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconVisibilityConverter.cs new file mode 100644 index 0000000..047bbb6 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastIconVisibilityConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Wpf.Ui.Violeta.Controls; + +[ValueConversion(typeof(ToastIcon), typeof(Visibility))] +internal sealed class ToastIconVisibilityConverter : IValueConverter +{ + public static ToastIconVisibilityConverter Default => new(); + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is ToastIcon icon) + { + return icon switch + { + ToastIcon.None => Visibility.Collapsed, + _ => Visibility.Visible, + }; + } + return Visibility.Collapsed; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return DependencyProperty.UnsetValue; + } +} diff --git a/src/Wpf.Ui.Violeta/Controls/Toast/ToastLocation.cs b/src/Wpf.Ui.Violeta/Controls/Toast/ToastLocation.cs new file mode 100644 index 0000000..1f6d7d1 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Controls/Toast/ToastLocation.cs @@ -0,0 +1,14 @@ +namespace Wpf.Ui.Violeta.Controls; + +public enum ToastLocation +{ + Center, + Left, + Right, + TopLeft, + TopCenter, + TopRight, + BottomLeft, + BottomCenter, + BottomRight, +} diff --git a/src/Wpf.Ui.Violeta/Keep.cs b/src/Wpf.Ui.Violeta/Keep.cs new file mode 100644 index 0000000..b0e1a59 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Keep.cs @@ -0,0 +1,5 @@ +namespace Wpf.Ui.Violeta; + +internal sealed class Keep +{ +} diff --git a/src/Wpf.Ui.Violeta/Resources/Fonts/Segoe Fluent Icons.ttf b/src/Wpf.Ui.Violeta/Resources/Fonts/Segoe Fluent Icons.ttf new file mode 100644 index 0000000..8f05a4b Binary files /dev/null and b/src/Wpf.Ui.Violeta/Resources/Fonts/Segoe Fluent Icons.ttf differ diff --git a/src/Wpf.Ui.Violeta/Win32/DpiHelper.cs b/src/Wpf.Ui.Violeta/Win32/DpiHelper.cs new file mode 100644 index 0000000..328ec77 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Win32/DpiHelper.cs @@ -0,0 +1,38 @@ +using System.Runtime.InteropServices; +using System.Security; + +namespace Wpf.Ui.Violeta.Win32; + +internal static class DpiHelper +{ + public static float ScaleX => GetScale().X; + public static float ScaleY => GetScale().Y; + + private static (float X, float Y) GetScale() + { + nint hdc = GetDC(0); + float scaleX = GetDeviceCaps(hdc, DeviceCap.LOGPIXELSX); + float scaleY = GetDeviceCaps(hdc, DeviceCap.LOGPIXELSY); + _ = ReleaseDC(0, hdc); + return new(scaleX / 96f, scaleY / 96f); + } + + [SecurityCritical] + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] + private static extern nint GetDC(nint hWnd); + + [SecurityCritical] + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] + private static extern int ReleaseDC(nint hWnd, nint hDC); + + [DllImport("gdi32.dll", SetLastError = false, ExactSpelling = true)] + private static extern int GetDeviceCaps(nint hdc, DeviceCap nIndex); + + private enum DeviceCap + { + LOGPIXELSX = 88, + LOGPIXELSY = 90, + } +} diff --git a/src/Wpf.Ui.Violeta/Wpf.Ui.Violeta.csproj b/src/Wpf.Ui.Violeta/Wpf.Ui.Violeta.csproj new file mode 100644 index 0000000..c22e541 --- /dev/null +++ b/src/Wpf.Ui.Violeta/Wpf.Ui.Violeta.csproj @@ -0,0 +1,61 @@ + + + + WPF-UI.Violeta + WPF-UI.Violeta + net472;net48;net6.0-windows;net7.0-windows;net8.0-windows; + true + false + false + 12.0 + enable + true + true + 3.0.5.0 + 3.0.5.0 + $(VersionPrefix)3.0.5.0 + ema + ema + WPF UI Violeta is based on WPF UI, and provides the Fluent experience in your known and loved WPF framework. Some new immersive controls like `Toast`. + https://github.com/emako/wpfui.violeta + https://github.com/emako/wpfui.violeta + git + WPF-UI .NET WPF Violeta + MIT + README.md + wpfui.png + + + + + + + + + + + + + + + + + + + + + + all + build; analyzers + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + +