-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish System.Xaml as a separate nuget package. #46
Comments
Just FYI: Having System.Xaml as separate package (while it is part of Desktop UI shared framework shipping in the .NET Core platform) brings a set of non-trivial challenges (CoreFX repo had plenty of good & bad experience with them over last few years). |
I originally thought this is what was supposed to happen here, but since wpf is no open sources i guess that's a different site. |
This has been an ask for long time, by many... Please do consider System.Xaml target .netstandard 2.0 |
I'm curious if someone could list a set of detailed real-world scenarios for this. It might help sell the team on it. |
Workflow foundation is an example of non-UI Xaml usage of system.xaml. It is a critical component to allow runtime workflows. |
@dotMorten |
For now Net Core 3.0 was released. |
How can I use System.Xaml.dll in .netcore or .net5 ? I need "XmlnsDefinitionAttribute" and “XmlnsPrefixAttribute” 。Thanks。 |
@idea-zone Reference WPF framework. Adding the code to your csproj file:
|
My project needs to be published to linux. It's will here an error and ask add "-windows" to TargetFramework . |
I assume this is not possible to use yet in a .NET 8 console app? |
* Adding Win11 styles * Working code - Window and Theming API changes. * Cleanup - Removing WindowCornerPreference and minor refactoring * Moving types from public to internal + bug fix for Window caption * Moving types from public to internal * Added Menu.xaml.cs to address x:Class attribute in Menu.xaml * Fix namespaces and assembly names, added textbox xaml * Changed x:Class attribute value (#8607) * Adding win11 styles to RichTextBox and Separator (#8581) * Adding win11 styles to RichTextBox and Separator * Changed the IsReadOnly flag to "False" * Fixed win11 theming changes for ListView and ListViewItem (#8629) * Added win11 styles for ListView and ListViewItem * Updated header information and namespace for controls : Calendar, DataGrid, DatePicker, Expander, MenuItem, RichTextBox, ScrollBar, ScrollViewer, Separator Removing unwanted references * Added null check here on CanExecuteChanged to avoid exception (#8619) * Adding Win11 Styles to Combo box (#8593) * Added win11 styles to ComboBox * Removed TranslateTransform from ComboBox's border * Removing unused references * Resolving Merge Conflicts Resolving Merge Conflicts Removing IconProperty Reference * Import xaml styles in the integrated styles page * Moving ThemesDictionary and ControlsDictionary to parent namespace * Update ApplicationThemeManager.cs to use correct namespace * Add missing FontIcon and ImageIcon classes * Fix for fall back colours for high contrast theme * Making SymbolExtensions internal * Removing extra properties for ribbon * fix(win11theme): ExpandDirection not respected in expander * Fix(win11theme): TabStripPlacement not Respected in tabcontrol * Import FluentWindow and TitleBar * Adding win11 styles to PasswordBox (#8612) * Added TextBox styles Todo: Clear button not showing up * Added styles for PasswordBox Todo: Reveal button functionality not supported * fix(win11theming): Ally and Navigation Issues in DataGrid * Fix(Win11Theming): Adding RepeatButton Styles * Add(Win11Theming): Bold, Italics, Underline, Floater and Paragraph Styles * Add(Win11Theming): DocumentViewer, Hyperlink, List, ResizeGrip and Thumb Styles * Add(Win11Theming): ContentControl, GridSplitter, GroupBox, GroupItem and HeaderedContentControl Styles * Add(Win11Theming): Border, ButtonBase, Control, ItemsControl, TextBoxBase, UserControl Styles * Add(Win11Theming): NavigationWindow Styles * Fixing margins in TreeViewItem * Fix for Mica style dropping on theme change * Fix(Win11Theming): TextBlock Foreground and FontIcon Issue * Fixed Border linear gradient for TextBox and PasswordBox * Fix(Win11Theming): MenuItems Dark Theme Visibility * Fix(Win11Theming): TextBlock Foreground and FontIcon Issue * Fix(Win11Theming): Menu Foreground Issue * Fix(win11theming): MenuBar hover highlighting * Fix(win11theming): MenuItems hover highlighting * Fix(Win11Theme): Add PasswordBox Styles to Resource Dictionary * Update resources on theme change * Accent Updates in SystemResources.cs Signed-off-by: Ashish Kumar Singh <singhashish@microsoft.com> * Refactoring accent colorization part * Changing Accent Color and Theme * Remove use of WinDef classes * Fix (Win11Theming): MainWindow does not load with latest system themes (Accent Colors, Background and System Theme) * Fix (win11theming): Delayed theme change (Optimizing theme change time) * Removed Button.Appearance and introduced Accent Button Style * Made extra converters internal * Enabling High Contrast Switching * Fix(win11theming): dark theme not working properly * Update(Win11Theming): Changing access type of non-essential methods to internal * Removed all chromes from Win11 styles * Removed SystemDropShadowChrome from Win11 style * Remove extra properties from PasswordBox * Removed extra public API changes in TextBox and RichTextBox * Made ClearButtonEnabled property internal in TextBox * Removed ContextMenu and Menu code-behind * Made extra methods internal in TextBox * Refactor(Win11Theming): Reusing currentTheme component and minor fixes * Fix(Win11Theming): Removing unused SystemThemeManager and SystemTheme references * Removed IsTextSelectionEnabled from RichTextBox * Making DataGridCheckboxColumn Style property internal * Revert "Removed ContextMenu and Menu code-behind" This reverts commit c7df285. * Removed ContextMeny and Menu Style code behinds * Removed RelayCommands and WindowCornerPreference * Code Cleanup and Removal of ControlsDictionary * Fix(Win11Theming): Adding Opt-in for New styles and controls * Removing unused ObservedWindow class * Removed FluentWindow and made WindowBackdrop internal. Fixed RTB CM * Fix(Win11Theming): Build Failure and High Contrast Switching * Removing Files/Classes not being compiled * Remove TitleBar and FluentWindow * Fix(Win11Theming): CheckBox Design Issues * Fixed gradient for border brush * Fix(Win11Theming): Removal of unused RDM, changing requested method name, and code refactoring * Removed extra classes and replaced FontIcon with TextBlock * Removed color extension and fixed CheckBox style * Fix(Win11Theming): Discarded need for using theme dictionary i app.xaml while not being respected and minor fixes * Removed DisplayDpi and fixed icon animations * Remove unused styles and methods * Fix(Win11Theming): Get Exact Accent color variations * Removed placeholder from the controls * Removed unnecessary code * Removed extra files and renamed AppInitNewTheme flag * Fix(Win11Theming): Updated Common xaml resources to support exact accent colors * Removed some files and renamed some methods * Fix(Win11Theming): Accent Button incorrect styles * Removed some extra code from styles * Fixed calendar header font weight * Revert "Fixed calendar header font weight" This reverts commit bf57add. * Merge branch 'CompleteWin11Changes' of https://dev.azure.com/dnceng/internal/_git/dotnet-wpf into CompleteWin11Changes * Fix(Win11Theming): ListBox Design Issues * Fix(Win11Theming): Progress Bar's Color Issues * Fix(Win11Theming): ProgressBar Design Issues * Fixed RadioButton disabled state colour * Fix(Win11Design): RadioButton and Checkbox Design Issues * Fix(Win11Theming): Checkbox Glyph Design Issues * Candidate Fix for Button Design Issues * Fix(Win11Theming): Removing Extra Border * Fix(Win11Theming): Dark accent button background color * Fix(Win11Theming): Disbaled Button Design Issues * Extended application based theme switching * Updating Theme name * Fix: Dictionary paths * Remove hard-coded reference * Removing unused Acrylic References * Unsubscribing the Loaded handler for applying window backdrop and glass frame * Update src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/DWMColorization.cs Co-authored-by: lindexi <lindexi@users.noreply.github.com> * Fixing ProgressBar's incorrect brush assignment * Adding a fallback if appsuselightthemekey is not present * Replacing the highcontrast detection * Addressing PR Review Comments : 1. Removed Fonts and Pallete resources 2. Fixed Slider styling 3. Removed extra structs from DwmAPI * Change : Removed Dwmapi.cs and merged it with NativeMethods * Removing fallback accent color variation calculation logic and assigning fixed values * Refactoring WindowBackdrop and removing undocumented APIs (#21) * Trimmed WindowBackdrop code * Removed undocumented DWMWA APIs * Fixed theme apply in child windows * Changes : Reverting decoupling of backdrop and background 2. Updated check to AllowsTransparency for applying backdrop 3. Refactored ThemeColorization * Fixed HighContrast and other review comments * Removing unused dwColorSetIndex and updating default value of dwmValue * Changing GetColorFromPreference arguments * Changing the system accent color to get value from IMCLR_SystemAccent * Fixing Typo * Addressing Review Comments - Part 4 (#23) * Moved Clear command to Editing commands * Added DwmSetWindowAttribute* methods and refactoring * Removed ByteColor struct * Fixed DwmColorization ParseDWordColor * Fixed datagrid checkbox column styling * Renamed WindowBackdropType enum values * Remove button from PasswordBox * Replaced sizeof with Marshal.SizeOf * Fix Border Highlight color on focus * Fix Progress Bar Tracker Height and Color Issues * Update Accent color for some controls in Dark mode * Fix MenuFlyout Issues * Slider accent color and ticks fix * Added animations for mouseover and pressed feedback * Fixes review comments - Refactoring (#25) * Refactored WindowBackdrop, BackgroundManager, ThemeColorization * Fix Window implicit style and Textblock inheritence * Moved WindowBackdrop to OnSourceInitialized and added app context switch for disabling backdrop * Initial Accent Color update fix * Added initialization in ThemeManager. Added comments * Added UISettings to handle accent color fetching (#34) * Added UISettings RCW * Made UISettings handle fallback * Fixes UISetting Initialization * Renamed style names (#40) Co-authored-by: dipeshmsft <dipeshkumar@microsoft.com> * ListBox and Slider Design Fix (#41) * Updating ListBox design * Fixed Slider selected range * Fixing ListBox style colors * Fixing selected range offset issue --------- Co-authored-by: Rishabh Chauhan <rchauhan@microsoft.com> Co-authored-by: dipeshmsft <dipeshkumar@microsoft.com> * Updatating OS version check --------- Co-authored-by: dipeshmsft <dipeshkumar@microsoft.com> * Removed extra MenuItem styles (#43) * Made Font Names Dynamic (#45) * Removed TextBlock Style (#44) * Added comments for new default font size * Modified control elevation brush and button style (#46) * Fix control elevation brush (#47) * Renaming the theme to Fluent (#38) * Correcting FluentWindows path of fonts file --------- Co-authored-by: dipeshmsft <dipeshkumar@microsoft.com> --------- Signed-off-by: Ashish Kumar Singh <singhashish@microsoft.com> Co-authored-by: Ashish Kumar Singh <SINGHASHISH@MICROSOFT.COM> Co-authored-by: Pankaj Chaurasia <pchaurasia@microsoft.com> Co-authored-by: Anjali <anjalisheel@microsoft.com> Co-authored-by: dipeshmsft <dipeshkumar@microsoft.com> Co-authored-by: Rishabh Chauhan <rchauhan@microsoft.com> Co-authored-by: lindexi <lindexi@users.noreply.github.com> Co-authored-by: Dipesh Kumar <85861525+dipeshmsft@users.noreply.github.com> Co-authored-by: Rishabh Chauhan <107022063+rchauhan18@users.noreply.github.com>
There is a lot of code in production that uses System.Xaml separetely from WPF on server-side for purposes that aren't related to UI in any way, shape or form.
It's worth as a separate package and will be useful right now even without .NET Core 3.0 and working WPF.
I believe it could be shipped for
netstandard2.0
to make it useful in .NET Standard libraries.The text was updated successfully, but these errors were encountered: