-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add support for Avalonia .axaml File Extensions #300
Comments
It appears all the issues leading to the file extension change are with VS itself (AvaloniaUI/Avalonia#4102). I am trying to understand if there are any "gotchas" with just processing |
@grochocki I agree with you fully. Maybe @grokys @danwalmsley from the Avalonia team can give some insight. I see it as even if there are compatibility issues I would prefer to have your tool beautify my xaml and then I would manual fix any issues. |
@grochocki Actually I noticed only one problem. XamlStyler forces replacing <Style Selector="RadioButton > TextBlock">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonForegroundPointerOver}" />
</Style> Although code with |
in a nutshell, AXAML is still your good ol' XAML we were forced to rename because VS tooling isnt up to snuff lately... |
@yannduran we supported and still supports xaml files.. axaml is just some kind of alias file extension since VS XAML tooling team isnt too cooperative with us. |
@yannduran as @jmacato said, I use .xaml instead of .axaml. |
@yannduran @maxkatz6 but the risk of using xaml instead of axaml is that Visual Studio does what it wants to your xaml and project files. I renamed everything to use axaml to avoid the Visual Studio headaches. If the XamlStyler team would recognize that extension or allow for us to enter that extension in configuration and acknowledge that we could run into issues, that would be great. I miss this tool but after tasting Avalonia hope I won't be using much WPF for new projects. |
@jtbrower it's true about Visual Studio, but I am used to it and keep my project files clean manually. So I don't really need another file extension. And probably some day Microsoft will fix it on their side. |
@yannduran it would actually be @grochocki who is with the XamlStyler team. @jmacato is with Avalonia. But I am with you! Hoping I can soon use it with axaml file extensions even if I have to correct things like changing > to > after running it. I have really been missing it lately. |
@maxkatz6 I have a lot of confidence in most all Microsoft Engineers as individuals, but when it comes to Visual Studio related tooling I have much less confidence. Working with xaml for 13 years using their tooling has predisposed me to think negative thoughts, LOL. Before I renamed xaml to axaml, it was mucking with my csproj files. I hate that because I too keep mine really tidy. Especially with Directory.Build.props and targets files for us to use. |
Sorry for the long delay in responding to this issue -- we would like to add support for Avalonia. To help capture any possible quirks, we would like to explore adding support behind an opt-in setting. Proposal:
#302 addresses the only lingering issue with handling the CSS-like selectors syntax. While this syntax does go against how special characters are typically treated in XAML, it also seems to be fundamental to styling in Avalonia, so would not make much sense to add support for .axaml but not support this syntax. Instead of exposing a new setting for this, we'd like to fold this into this one setting for Avalonia support, and only for the Moving forward, we can capture any additional quirks behind this |
@grochocki Happy New Year and thank you! I agree that your approach is acceptable. |
@grochocki thank you for the response! On other hand it's possible to have file with user defined namespace |
Added with #321. |
Is this feature added to the 2022 version? |
Avalonia uses the "axaml" extension within Visual Studio to avoid clashing with Microsoft's tooling. That means that my favorite XamlStyler will not format documents as I have grown to love with WPF.
Describe the solution you'd like
A Configuration property that gives users the option to list file extensions that the XamlStyler should handle.
The text was updated successfully, but these errors were encountered: