Bars.Mvvm.FluentApi.Generator 0.3.0

dotnet add package Bars.Mvvm.FluentApi.Generator --version 0.3.0
                    
NuGet\Install-Package Bars.Mvvm.FluentApi.Generator -Version 0.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bars.Mvvm.FluentApi.Generator" Version="0.3.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bars.Mvvm.FluentApi.Generator" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Bars.Mvvm.FluentApi.Generator">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bars.Mvvm.FluentApi.Generator --version 0.3.0
                    
#r "nuget: Bars.Mvvm.FluentApi.Generator, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bars.Mvvm.FluentApi.Generator@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bars.Mvvm.FluentApi.Generator&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Bars.Mvvm.FluentApi.Generator&version=0.3.0
                    
Install as a Cake Tool

Bars.Mvvm.FluentApi.Generator

This source code generator generates extension methods for Actipro's WPF Bars ViewModels to allow for method chaining to set properties in a more Fluent API style.

Features

  • Extension methods for fluent property assignment.
  • Convenience methods to reduce boilerplate when building bar menus.

Basic Usage

// Method chaining to set properties.
new BarToggleButtonViewModel(key)
    .WithCommand(setTextAlignmentCommand, TextAlignment.Center)
    .WithKeyTipText("AC")
    .WithDescription("Center content with the page."));

Release Notes:

  • 0.3.0

    • Renamed package to Bars.Mvvm.FluentApi.Generator to better reflect terminology, rather than Bars.Mvvm.FluidApi.Generator. No changes to functionality.
    • Continuing existing version history to maintain consistency with previous releases.
  • 0.2.0

    • Added some minor tweaks to the WithFooter convenience method for InfoBar padding to be 0 rather than the default padding.
    • Extended the sample application and cleaned up some code related to another project that will be split into its own repository.
  • 0.1.0

    • Initial release with basic functionality for generating extension methods.
    • Convenience methods:
      • WithCommand to assign commands and parameters in a single call for ICommand properties with matching command parameter property.
      • BarComboBox.WithUnmatchedTextCommand with overload for setting IsUnmatchedTextAllowed.
      • IHasVariantImages.WithImages to set all image sizes for a IHasVariantImages using a registered image from IBarImageProvider.
      • RibbonViewModel.WithFooter with various overloads for quickly setting simple footer or info bar footer.
      • WithItem, WithTab, WithGroup for adding items to read-only ObservableCollection<T> properties on ViewModels like RibbonTabViewModel.Groups, RibbonGroupViewModel.Items, and BarComboBoxViewModel.AboveMenuItems.
      • WithItems, WithTabs, etc for adding a batch of items to ObservableCollection<T> properties.
      • RibbonBackstageViewModel.WithItemSeparator for adding a separator with top alignment, or provide parameter for bottom.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 106 7/28/2025