ivalueconverter Questions
4
Solved
When declaring converters in a WPF application, should I:
Declare all my converters in the App.xaml (i.e. in <Application.Resources/>) so it's available to the entire application
Declare on...
Melly asked 2/11, 2009 at 3:17
6
Solved
I've got a situation in which I need to show an integer value, bound to a property on my data context, after putting it through two separate conversions:
Reverse the value within a range (e.g. ra...
Sancho asked 9/4, 2010 at 12:50
8
Solved
How does one use a converter with Multiple parameters in a Windows Phone 7 Application?
Whatsoever asked 4/7, 2012 at 5:56
4
<Canvas.DataContext>
<ViewModels:VMSomeControl Model="{Binding RelativeSource={RelativeSource TemplatedParent}}" />
</Canvas.DataContext>
<!-- DataContext is not...
Overweary asked 7/6, 2010 at 14:39
7
Solved
Is there a way to use the existing WPF BooleanToVisibilityConverter converter but have False values convert to Hidden instead of the default Collapsed, or should I just write my own? I'm on a proje...
Buccinator asked 27/6, 2010 at 16:41
3
Solved
I have an extremely simple IMultiValueConverter that simply OR's two values. In the example below, I want to invert the first value using an equally simple boolean inverter.
<MultiBinding Conve...
Transcendental asked 11/5, 2010 at 14:12
2
Solved
Recently I read about an IValueConverter which also inherits from MarkupExtension. It was something like:
internal class BoolToVisibilityConverter : MarkupExtension, IValueConverter
{
private sta...
Marten asked 13/2, 2015 at 13:48
3
Solved
I'm binding the Source property of an Image to a string. This string may be null in which case I just don't want to display an Image. However, I'm getting the following in my Debug output:
Syste...
Coffeecolored asked 23/3, 2011 at 0:39
3
Solved
I'm having issues with a converter i'm using to convert between a string and our timeformat. The converter itself works fine and is implemeneted like this:
[ValueConversion(typeof(string), typeof...
Deuno asked 10/12, 2010 at 8:37
1
Solved
How can you bind to a DynamicResource so you can use a Converter or StringFormat, etc.? (Revision 4)
Note: This is a revision of an earlier design that had the limitation of not being usable in a style, negating its effectiveness quite a bit. However, this new version now works with styles, esse...
Orola asked 19/11, 2015 at 23:47
1
Solved
I am writing a Xamarin.Forms app using XAML for my views, and I am trying to write an IValueConverter whose job should be returning false if the input is "empty" for types where those semantics mak...
Thong asked 14/11, 2017 at 8:5
2
Solved
I have an instance of IValueConverter in a Silverlight 5 project, which converts custom data into different colors. I need to read the actual color values from a database (as these can be edited by...
Indefinite asked 23/4, 2012 at 9:36
2
Solved
I need to define a DependencyProperty in a converter class because I need this data to make the conversion and this data is in another object, not the one I'm binding to.
My converter class is the...
Oleaceous asked 25/1, 2015 at 21:33
4
Solved
I'm tring to use a lambda with a multiple-params function but Moq throws this exception at runtime when I attempt to call the mock.Object.Convert(value, null, null, null); line.
System.Reflection....
Dunlavy asked 10/10, 2011 at 14:48
2
I have trouble defining a trigger for TreeViewItems. I believe it is just some syntax problem, but I don't know what else to write...
This is the Trigger:
<DataTrigger Binding="{Binding Path=....
Backstage asked 10/10, 2016 at 9:41
4
Solved
I would like to use static texts fetched from a web service in my WP7 app. Each text has a Name (the indetifier) and a Content property.
For example a text could look like this:
Name = "M43";
Con...
Pullet asked 3/8, 2012 at 13:40
2
Solved
I have an IValueConverter which I want to use for doing simple math that has the following Convert function :
public object Convert(
object value,
Type targetType,
object parameter,
CultureInfo...
Ilysa asked 19/2, 2016 at 19:0
3
Solved
This is driving me NUTS!!!
I have a ComboBox used to filter a query by employee which works fine but only displays the employees first name. I want to use a MultiValueConverter to display the empl...
Serotine asked 4/2, 2010 at 6:27
2
Solved
I'm having a simple WPF XAML Window, I need to Create a StaticResource Key with in the following XAML.
The XAML Source Code is
<Window x:Class="WpfApplication1.Trigger"
xmlns="http://schemas....
Transfinite asked 18/12, 2015 at 8:50
4
Is there a way to define a converter when using the DynamicResource extension? Something in the lines of
<RowDefinition Height="{Binding Source={DynamicResource someHeight}, Converter={StaticR...
Designed asked 26/1, 2011 at 13:58
1
Solved
I'd like to be able to display an index value from within a DataTemplate, but I don't want the data to be persisted or backed by the model or viewmodel. In other words, if the order of the items in...
Hephaestus asked 15/7, 2015 at 17:11
2
Solved
Intro:
Here is a part of my Translator that I use in my app. I want to update all the strings in it when I change the language with a ComboBox.
Problem:
I would like to update labels Content when ...
Rog asked 14/7, 2015 at 14:7
2
Solved
I am using a collection of texts fetched from a web service, which should be used for a variety of controls.
The easiest and most dynamic way to do this, in my opinion, is to use an IValueConverte...
Inheritor asked 7/8, 2012 at 10:2
5
Solved
I am trying to bind to an integer property:
<RadioButton Content="None"
IsChecked="{Binding MyProperty,
Converter={StaticResource IntToBoolConverter},
ConverterParameter=0}" />
and my c...
Allanadale asked 20/10, 2010 at 14:30
2
Solved
What is the point of this attribute? After adding it I still need to make a cast on value object.
[ValueConversion(sourceType: typeof(double), targetType: typeof(string))]
public class SpeedConver...
Reefer asked 9/3, 2012 at 4:16
1 Next >
© 2022 - 2024 — McMap. All rights reserved.