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" />
<PackageReference Include="Bars.Mvvm.FluentApi.Generator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=Bars.Mvvm.FluentApi.Generator&version=0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 thanBars.Mvvm.FluidApi.Generator
. No changes to functionality. - Continuing existing version history to maintain consistency with previous releases.
- Renamed package to
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 aIHasVariantImages
using a registered image fromIBarImageProvider
.RibbonViewModel.WithFooter
with various overloads for quickly setting simple footer or info bar footer.WithItem
,WithTab
,WithGroup
for adding items to read-onlyObservableCollection<T>
properties on ViewModels likeRibbonTabViewModel.Groups
,RibbonGroupViewModel.Items
, andBarComboBoxViewModel.AboveMenuItems
.WithItems
,WithTabs
, etc for adding a batch of items toObservableCollection<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 |