microsoft / xaml-standard

XAML Standard : a set of principles that drive XAML dialect alignment
Other
804 stars 50 forks source link

Discussion Shouldn't xaml be made more simpler,easy,clearly ? #240

Open sgf opened 2 years ago

sgf commented 2 years ago
<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>

    </Grid>
</Window>

this is a wpf new mainwindow. u can see many xmlns. This is very confusing, I am using wpf, why do I specify so many urls (xmlns).

<lib>mswpf,more...<lib/>
<Window Title="MainWindow" Height="450" Width="800">
</Window>

I think the design of xaml is full of configuration items (xmlns, x:Class, mc:Ignorable). And many of these things should have been replaced by conventions.

sgf commented 2 years ago

xaml‘s Style is very Poor readability. Compared to the CSS a lot worse.