I am trying to bind an Enum to a ComboBox. I have seen a lot of people using an ObjectDataProvider but I cannot seem to access it. I have also noticed that some people are using it within a Window.Resources, rather than Page.Resources but I cannot…
Trying to determine if it is possible to bind the SelectedValue of a ComboBox to the inputs of multiple ObjectDataProviders with XAMAL Bindings.
I looked at MultiBinding but that appears to be grouping multiple controls together, not exactly what…
I'm implementing a textbox filter on a list based on Josh Smith's example at http://joshsmithonwpf.wordpress.com/2007/06/12/searching-for-items-in-a-listbox. Basically, it sets the Filter on the view to a delegate that checks against the text in the…
Im attempting to bind to the output of a method. Now I've seen examples of this using ObjectDataProvider However the problem with this is ObjectDataProvider creates a new instance of the object to call the method. Where I need the method called on…
I would like to create my ObjectDataProvider in my C# code behind rather than my XAML.
I was wondering how to change this XAML into equivalent C#. The XAML was generated by Microsoft Expression Blend 2, so the d: namespace can be ignored…
Let's say I have a base viewmodel for a specific control that implements some basic properties, e.g.
public abstract class ControlVmBase{
public abstract int IconSize {get;set;}
}
I also have a ResourceDictionary which I want to use with…
How do you pass "this" to the constructor for ObjectDataProvider in XAML.
Lets say my presenter class is:
public class ApplicationPresenter(IView view){}
and that my UserControl implements IView.
What do I pass to the ConstructorParameters in the…
I trying to bind List to Listbox. And at the Button1Click method new instance of MyClass adds in my List<>, but that not visible in my listbox. There my code:
public static class NotesEngine
{
public static…
I've been exploring WPF and XAML for a while now, but have hit a slight stumbling block revolving around binding to a method.
My situation is:
There is a ComboBox bound to a DataTable. There is a ListBox bound to the return value of a method…
Is there any way to bind a value to a textblock that is obtained from a method. For example, I pass my Person object into the HierarchicalDataTemplate, from there I can access its Weight property. Now lets say I want to get the weight in mars, I…
I have an enum that bind to a ComboBox in my view.
public enum MyItems
{
[Browsable(false)]
Item1,
[Browsable(true)]
Item2,
[Browsable(false)]
Item3,
[Browsable(true)]
Item4,
}
In view I use ObjectDataProvider
…