219 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
198
views
MAUI Converter inline syntax for Generic Types
EDITED: included code snippet
MAUI with XAML being as verbose as it is, just curious if there is a way to write shorter syntax for converters with Generic Types. Take a look at screenshot below. I ...
0
votes
2
answers
93
views
How to convert a time string measured in 24 hours cycle to 12 hours cycle?
I have a stored value of an hour in a 24-hour format in a variable named hour. My task is to convert this value to a 12-hour format and print the result.
I tried while-loops, if-elif-statements. I ...
0
votes
0
answers
110
views
Text color value depending on the background color through Converter in MAUI .net
I have used converter in MAUI .net and on the basis of cost of toy I have changed the background color i.e.
<Frame x:Name="FrameToy" Grid.Column="0" Grid.Row="0">
&...
0
votes
1
answer
198
views
How can I bind RotateTransform.Angle value via a Converter?
I need to create a Converter that takes some value and returns another. This will be used to set the textblock RotateTransform.Angle value in XAML.
If I hard-code the value to a static number the ...
2
votes
1
answer
4k
views
Entity Framework Core 7 apply custom ValueConverter to Inserts and Updates
I am struggling to understand how to apply a custom ValueConverter to all the properties of all the models before every insert and update.
According to this resource it can be done:
https://learn....
user avatar
user10630162
2
votes
2
answers
1k
views
EF Core - ValueConverter or OwnedType for simple ValueObjects?
I use value objects to encapsulate validations like maxLength. This is an extract of a sample class without factory method and validation:
public class CallingName : ValueObject
{
public string ...
0
votes
1
answer
348
views
Is it possible to create a Xamarin Converter dynamically and in one line?
Xamarin Converters normally have to be static (not changed after start) and classes which makes them quite an overkill for what they do in the most cases. Therefore I thought it would be easier to ...
1
vote
3
answers
350
views
CollectionView template calls converter incorrectly
Xamarin.Forms 5.0.0.2012, Visual Studio 2019 for Mac 8.10.16
I am encountering a problem (on both iOS and Android, on both emulators and physical devices) trying to call a Converter in the XAML ...
0
votes
1
answer
294
views
I have values withing the range of 0-5 but I need to convert them from 1-5 range
I have CSV file from one of our device with the range of 0-5 volts. But I need to convert this range from 0-5 to 1-5 volts to use it in another application. I have tried with "Convert a number ...
0
votes
0
answers
439
views
EF Core and keeping the default initialized Value after loading
In my domain model I have a property type Property<T> which holds a Value and a DefaultValue just beside:
public class Property<T> : Entity
{
public Property(T defaultValue)
{
...
-1
votes
1
answer
528
views
Bixby command for currency converter
I wanted to try the currency converter feature of bixby where i ask it to convert the value from lets say USD to INR. This feature was in earlier updates of bixby. But when i tried it now, it wont ...
-1
votes
1
answer
58
views
ValueConverter method is hit but not showing on UI
I a have list containing invoices. These invoices have a direction value represented by an int (incoming = 0, issued = 1). I want to differentiate these invoices by color in the list.
I tried to use ...
-1
votes
1
answer
79
views
MVVMCross WPF ValueConverter has invalid cast [closed]
I am trying to bind a foreground color to a WPF Textblock.
The property in the view model is a color, as directed by MvvmCross documentation:
private System.Drawing.Color _setValueColor;
...
1
vote
0
answers
118
views
How to populated WPF comboboxes with generic enum to List<string> function
I would like to populate WPF combobox (and other similar controls) with the geniric enum to List<string> below:
How do I call it in XAML?
public class ToList<TEnum> : List<string> ...
user avatar
user11719716
1
vote
2
answers
2k
views
Generic method for setting string enum converter in EF Core for all entities
I'm trying to set String-Enum value converter to all enum properties of all entities in my EF Core Code-First project.
I can do this manually like this:
protected override void OnModelCreating(...