Code Monkey home page Code Monkey logo

mynetxaml's Introduction


My .NET Xaml

Downloads Forks Stargazers Issues MIT License

Various tools for easing the development of XAML related applications.

As i only use WPF myself everything is focused on WPF, but things should work for other XAML dialects (at least in theory).

You can either use the commandline tool MyNet.Xaml.Merger or the MSBuild version MyNet.Xaml.Merger.MSBuild to make use of the provided functionalities.

Language Framework Version Build

XAMLCombine

Combines multiple XAML files to one large file.
This is useful when you want to provide one Generic.xaml instead of multiple small XAML files.
Using one large XAML file not only makes it easier to consume, but can also drastically improving loading performance.

Using the MSBuild-Task

<XAMLCombineItems Include="Themes/Controls/*.xaml">
  <TargetFile>Themes/Generic.xaml</TargetFile>
</XAMLCombineItems>

The MSBuild-Task includes the items used for combining as pages during debug builds and removes them from pages during release builds. This is done to reduce the binary size for release builds and still enable intellisense in debug builds for those XAML files.

Remarks when using Rider
To get intellisense in debug builds inside the XAML files and to prevent duplicate display of those files you have to define:

<PropertyGroup Condition="'$(IsBuildingInsideRider)' == 'True'">
  <DefaultItemExcludes>$(DefaultItemExcludes);Themes\Controls\*.xaml</DefaultItemExcludes>
</PropertyGroup>

<ItemGroup Condition="'$(IsBuildingInsideRider)' == 'True'">
  <Page Include="Themes\Controls\*.xaml" />
</ItemGroup>

Using the executable

XAMLTools accepts the following commandline parameters for the combine verb:

  • -s "Path_To_Your_SourceFile" => A file containing a new line separated list of files to combine (lines starting with # are skipped)
  • -t "Path_To_Your_Target_File.xaml"

XAMLColorSchemeGenerator

Generates color scheme XAML files while replacing certain parts of a template file.

For an example on how this tool works see the generator input and template files.

Using the MSBuild-Task

<XAMLColorSchemeGeneratorItems Include="Themes\ColorScheme.Template.xaml">
  <ParametersFile>Themes\GeneratorParameters.json</ParametersFile>
  <OutputPath>Themes\ColorSchemes</OutputPath>
</XAMLColorSchemeGeneratorItems>

Using the executable

XAMLTools accepts the following commandline parameters for the colorscheme verb:

  • -p "Path_To_Your_GeneratorParameters.json"
  • -t "Path_To_Your_ColorScheme.Template.xaml"
  • -o "Path_To_Your_Output_Folder"

License

Copyright © Stéphane ANDRE.

My .NET WPF is provided as-is under the MIT license. For more information see LICENSE.

mynetxaml's People

Contributors

sandre58 avatar

Watchers

 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.