Git Product home page Git Product logo

omnixaml's Introduction

Get the latest nighly NuGet packages with this NuGet feed! https://www.myget.org/F/omnixaml/api/v2

OmniXAML

The Cross-platform XAML Framework.

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

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);
}

omnixaml's People

Contributors

superjmn avatar grokys avatar wieslawsoltes avatar gitter-badger avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.