Questions tagged [converter]

Converters can change data from one type to another, translate data based on cultural information, or modify other aspects of the presentation.

Value converters are culture-aware. Both the Convert and ConvertBack methods have a culture parameter that indicates the cultural information.

Ref: IValueConverter

3976 questions
62
votes
1 answer

Convert between LocalDate and sql.Date

What's the correct way to convert between java.sql.Date and LocalDate (Java8)?
maja
  • 14,242
  • 14
  • 72
  • 106
61
votes
2 answers

Convert LaTeX to ePub

Update 2012-02-11 : Since my question is quite old but very popular, I'd propose to reopen it. I'd like to know, if more options are available a year later. I'd like to convert some university papers from LaTeX into ePub format - without using PDF…
SteAp
  • 10,824
  • 8
  • 48
  • 83
60
votes
7 answers

Ruby XML to JSON Converter?

Is there a library to convert XML to JSON in Ruby?
Lance Pollard
  • 66,757
  • 77
  • 237
  • 416
56
votes
4 answers

Convert between LocalDate and XMLGregorianCalendar

What's the best way to convert between LocalDate from Java 8 and XMLGregorianCalendar?
maja
  • 14,242
  • 14
  • 72
  • 106
54
votes
10 answers

The 'clr-namespace' URI refers to a namespace that is not included in the assembly

I'm trying to include in my XAML some classes which convert values. However, I'm getting the following error when I compile: Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'View.Summary.Converters' that is not included in…
Adam S
  • 8,245
  • 17
  • 60
  • 95
53
votes
7 answers

How do I convert a Color to a Brush in XAML?

I want to convert a System.Windows.Media.Color value to a System.Windows.Media.Brush. The color value is databound to a Rectangle object's Fill property. The Fill property takes a Brush object, so I need an IValueConverter object to perform the…
dthrasher
  • 36,940
  • 32
  • 104
  • 137
51
votes
2 answers

How to pass specific value to the converter parameter?

I have created a class Person that looks like this: public class Person { public enum GenderType { Female, Male } public string Name { get; set; } public GenderType? Gender { get;…
Boris
  • 9,363
  • 30
  • 98
  • 144
51
votes
6 answers

No converter found capable of converting from type to type

I am getting the following stacktrace: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [referencedata.ABDeadlineType] to type [referencedata.DeadlineType] at…
Menelaos
  • 20,773
  • 14
  • 71
  • 130
47
votes
5 answers

Binding to Converter Parameter

Is it possible to bind to a ConverterParameter in Silverlight 4.0? For instance I would like to do something like this and bind the ConverterParameter to an object in a ViewModel for instance. If this is not possible are there any other…
dparker
  • 1,084
  • 1
  • 9
  • 14
46
votes
4 answers

RGB to HSL conversion

I'm creating a Color Picker tool and for the HSL slider, I need to be able to convert RGB to HSL. When I searched SO for a way to do the conversion, I found this question HSL to RGB color conversion. While it provides a function to do conversion…
akinuri
  • 7,673
  • 10
  • 47
  • 80
46
votes
6 answers

Javascript convert HSB/HSV color to RGB accurately

I need to accurately convert HSB to RGB but I am not sure how to get around the problem of turning decimals into whole numbers without rounding. This is the current function I have out of a colorpicker library: HSBToRGB = function (hsb) { var…
that_guy
  • 2,043
  • 4
  • 27
  • 42
45
votes
5 answers

How to convert BASE64 string into Image with Flutter?

I'm converting images saved in my Firebase database to Base64 and would like to decode and encode. I've researched similar questions, but am still getting errors. Here is what I have so far? var image1 = String; var pic =…
Charles Jr
  • 5,303
  • 12
  • 43
  • 68
44
votes
2 answers

How can I check if a string has a numeric value in it in Python?

Possible Duplicate: How do I check if a string is a number in Python? Python - Parse String to Float or Int For example, I want to check a string and if it is not convertible to integer(with int()), how can I detect that?
Figen Güngör
  • 10,407
  • 11
  • 56
  • 101
42
votes
13 answers

What is the best C# to VB.net converter?

While searching the interweb for a solution for my VB.net problems I often find helpful articles on a specific topic, but the code is C#. That is no big problem but it cost some time to convert it to VB manually. There are some sites that offer code…
Florian
  • 880
  • 2
  • 11
  • 19
42
votes
4 answers

How to boolean && two visibility converters

I have two separate converters for visibility, one based on whether a field has been updated and one based on whether a field is allowed to be seen. I use the updatedField one for each text item on my page so that a star shows up next to an updated…
Bill
  • 423
  • 1
  • 4
  • 5