I can't for the life of me figure out how to do this, if possible.
When using explicit expressions as values for EventHandlers or actions on components, is there a way to define how you want them formatted when using code cleanup/formatting functions in the IDE? In this instance, I use Rider and I've tried going through all settings in the code style options to no avail.
Here's an example, the ValueChanged and TextChanged attributes here use expressions and I'd like them to be formatted something along the lines of this:
<DxComboBox
Data="@(cities ?? [])"
Value="@City"
ValueChanged="@((City? city) =>
{
if (city is not null && city != City)
OnCityChanged(city);
})"
TextChanged="@((string? cityName) =>
{
if (cityName is not null && cityName.Length > 0 && cityName != City?.Name)
OnCityChanged(new City(cityName));
})"
AllowUserInput="true"
ListRenderMode="ListRenderMode.Virtual"
SearchMode="ListSearchMode.AutoSearch"
SearchFilterCondition="ListSearchFilterCondition.Contains"/>
But no matter what I try, it will always get formatted into this:
<DxComboBox
Data="@(cities ?? [])"
Value="@City"
ValueChanged="@((City? city) => { if (city is not null && city != City) OnCityChanged(city); })"
TextChanged="@((string? cityName) => { if (cityName is not null && cityName.Length > 0 && cityName != City?.Name) OnCityChanged(new City(cityName)); })"
AllowUserInput="true"
ListRenderMode="ListRenderMode.Virtual"
SearchMode="ListSearchMode.AutoSearch"
SearchFilterCondition="ListSearchFilterCondition.Contains"/>
which, to me, is way less easy to read than the formatting with line breaks.
Is there a way to configure this using editorconfig?