Open Schecher1 opened 2 years ago
apart from that there is a huge difference between XML and XAML. Only that XAML has the structure of XML.
What huge difference? It looks exactly like ordinary XML to me.
What huge difference? It looks exactly like ordinary XML to me.
So of course xaml is based on xml, but with xaml you don't store data but define an interface. Xaml is partly like HTML and CSS. As an example.
Syntactically, what's the difference? Is there a difference?
Well, the syntax can't be much different because it's based on XML. But actually the reason would be enough that with XML you store data and with XAML you can define UI.
Data != Interface.
The UI is just described by an XML syntax.
Like:
<Button x:Name="Bttn_SelectFile" Content="Select File" HorizontalAlignment="Left" Margin="30,45,0,0" VerticalAlignment="Top" Height="45" Width="85" RenderTransformOrigin="0.294,0" FontSize="15" Click="Bttn_SelectFile_Click"/>
But let's assume that XAML is XML. Why is the language not listed in the history of a repo?
I mean, I have now in a project 20 C# files and 13 XML (XAML) files. Why is only 100% C# shown? This is simply not true.
Why is only 100% C# shown?
XML is classified as data
by default and is therefore hidden in the sidebar by default. Which therein lies the justification for this request.
It is understandable that XML is classified as data, because it is. But now I hope you can understand why I don't agree that XAML is represented as XML.
Is there anything new? greetings
@Schecher1 If you want XAML files to contribute to your project's language statistics, you can use an override:
*.xaml linguist-detectable
Hello, thank you for the answer. But I mean if you/we can standardize it? So that the language as well as C# is automatically detected. Apart from that, when I add this in the ".gitattributes" file only XML appears, and there we come back to my problem.
@Schecher1 If you know of a TextMate grammar for XAML that will improve the appearance of .xaml
files, then we can add XAML as a separate language. We'd happily accept a pull-request in that case.
Thanks, is there somewhere an instruction how I make the request? so what I have to add?
Literally everything you need to know is documented in CONTRIBUTING.md
.
Thank you, I will create the request and then delete this issue when everything is finished.
Add a syntax-highlighting grammar for your language using:
I do not quite understand, may u can help me?
Add a syntax-highlighting grammar for your language using:
I do not quite understand, may u can help me?
Run the command shown (script/add-grammar
) from within your checkout of your fork of this repo replacing the URL with the URL of the grammar you are adding.
This will require you to have met all the requirements as detailed at the start of the document.
Language name
XAML (Extensible Application Markup Language)
Description
It is a FrontEnd language for (most popular) WPFs and MAUIs, is used by the VB and C# language.
URL of example repository
Press me to go to the Repo
URL of syntax highlighting grammar
Press me to get the Wikipedia Post
Most popular extensions
*.xaml
Detected language
Unfortunately it is recognized as XML and is not even displayed, apart from that there is a huge difference between XML and XAML. Only that XAML has the structure of XML.
Color of recognition
It should be a BrightBlue as well as the logo of XAML. Here are some HEX examples. As well as my source (XAML-Logo)
004AAE 145FCE 0548B3 336CBB