Let's say I have a View that is bound to ViewModel A which has an observable collection Customers.
An advantage of this MVVM pattern is that I can also bind the View to ViewModel B which fills it with different data.
But what if in my View converter Converters to display my customers, e.g. I have a "ContractToCustomerConverter" that ac...
So I have an object that implements INotifyPropertyChanged, and I have a property that when it changes, it call the PropertyChanged event all right, but when I use a converter like this:
<Image Grid.Column="0">
<Image.Source>
<Binding Path="IsInstrumentStatusOk" UpdateSourceTrigger="PropertyChanged">
<Bindin...
Hello I have a Binding that I am using along with a converter, I want the parameter that is transferred to the converter should be an empty string.
Is there a way I can pass it via an inline binding?
...
What should be the best practice to declare the converters:
Declare ALL my converters in the app.xaml (i.e. in <Application.Resources/>) so it's available in the entire application.
Declare on each Page/Window/ResourceDictionary/DataTemplate etc. at its Resources section, the converters I need on this page.
You tell me...
That's for ...
Question: How can you pass an instance of an object from the view model to a converter along with the value to be converted to a converter?
Info: I'm working on an inventory program for people on our factory floor who receive incoming shipments. While receiving a shipment they will mark down who the shipping company was and who the dr...
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 the same is not called if I modify the o...
I have a user control (NameField). Within it I have a stackpanel containing 3 Grids: StandardView, FluidView, OtherView. Within the code-behind I have a DependencyProperty called View of type NameFieldView (enum). The enum contains STANDARD, FLUID, OTHER.
I think I have to create a converter, but I'm not sure if that's necessary. I basi...
Hello,
I have implemented grouping on a list box, where I need to show a summary row for each group. For summary row, I called a converter to give count variables to show. Code is working fine with a issue. Converter is calling for each item instead of one time for each group.
Is there any way to call the converter only once for each g...