-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In WPF it is easy to use a ValueConverter to format values etc, (in our case convert some numbers into a different unit, e.g km to miles)
I know it can be done in Winforms, but all my Googleing just brings up results for WPF and Silverlight.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to initialize a converter in the Resources section of my UserControl with a reference to one of the objects in my control. When I try to run the application I get an XAML parse exception.
XAML:
<UserControl.Resources>
<converter:PointConverter x:Key="pointConverter" Map="{Binding…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have an ObservableCollection bound to a list box and a boolean property bound to a button. I then defined two converters, one that operates on the collection and the other operates on the boolean property. Whenever I modify the boolean property, the converter's Convert method is called, where as…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a DatePicker for which I want to set the BorderBrush to SolidColorBrush(Colors.Red) if the SelectedDate is null. If a date has been filled in though, I want to just have the default BorderBrush. I still want to be able to style the default BorderBrush in Blend, so I don't want to hardcode the…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a ComboBox that uses a DataTemplate. The DataTemplate contains a binding which uses an IValueConverter to convert an enumerated value into a string. The problem is that the value converter is never invoked.
This is my XAML:
<ComboBox ItemsSource="{Binding Path=StatusChoices, Mode=OneWay}">
…
>>> More