Cross-platform XAML Framework
Перейти к файлу
José Manuel Nieto Sánchez 947d25842f Cleanup 2016-01-11 23:02:48 +01:00
Source Cleanup 2016-01-11 23:02:48 +01:00
.gitattributes Update .gitattributes 2015-07-30 20:19:30 +02:00
.gitignore Yes, this one is the initial commit :) 2015-04-28 13:29:30 +02:00
LICENSE License changed to MIT 2015-09-25 21:52:02 +02:00
OmniXaml.sln Solution arrangement. Minor renames. 2016-01-09 12:12:54 +01:00
OmniXaml.sln.DotSettings Member dependencies can now be configured without attributes. Feature https://github.com/SuperJMN/OmniXAML/issues/30 2015-09-23 17:20:49 +02:00
README.md Update README.md 2015-11-10 10:51:19 +01:00
Settings.StyleCop Initial commit 2015-04-18 13:08:30 +02:00
appveyor.yml fixed appveyor 2015-09-30 21:37:59 +02:00

README.md

OmniXAML

The Cross-platform XAML Framework.

Join the chat at https://gitter.im/SuperJMN/OmniXAML

I know you need it, I know you want it. I know you XAML!

Sample

OmniXAML is a library that allows you interpret XAML with ease. You can read XAML and get the object it represents, like a Window in WPF, a document, a diagram or whatever object you can describe.

In its current state it's able to interpret quite complex XAML without problems.

It complies with most of the features that XAML provides, except for some uncommon/advanced features like:

  • x:Class directive
  • x:TypeArguments
  • x:Shared

It also lacks support for events.

OmniXAML doesn't generate compiled XAML, so no intermediate format is produced. Since it's designed to be cross-platform, it doesn't rely on extra build steps. This means that right, in order to have access to named elements (x:Name/Name) you will have to use namescopes, for instance window.Find(nameOfControl).

Using OmniXAML with WPF

It's super easy! Just follow this simple guide.

Sample XAML

The following an example of XAML that can be read with OmniXAML.

<Window Width="300" Height="300" 
        xmlns="perspex"
        xmlns:m="clr-namespace:TestApplication;Assembly=TestApplication">
    <ScrollViewer>
        <StackPanel>
            <ListBox Items="{Binding Path=People}">
                <ListBox.DataTemplates>
                    <XamlDataTemplate DataType="{Type TypeName=m:Person}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Image Source="github_icon.png" Height="60" />
                            <Button Grid.Column="1" Content="{Binding Path=Name}" />
                        </Grid>
                    </XamlDataTemplate>
                </ListBox.DataTemplates>
            </ListBox>
        </StackPanel>
    </ScrollViewer>
</Window>

This project is linked with Perspex, the next-generation WPF.

Thanks to Nicholas Blumhardt for his awesome project Sprache that has introduced me in the world of parsers.

foreach (var thing in life) 
{
   world.Shout(string.Format("XAML is the best language to describe {0}", thing);
}