Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom CommandParameter
Message
From
22/01/2010 21:35:09
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01445153
Message ID:
01445595
Views:
22
>>What class are TextBoxes bound to? Couldn't you just pass that class to the converter?
>
>With the MultiBinding approach they didn't need to be bound to anything - they were just supplying parameters for creating an object (i.e. no existing source). The converter was just throwing out a simple class to hold the parameters:
public class NewPaperParameters
>    {
>        public double Width { get; set; }
>        public double Height { get; set; }
>        public string Name { get; set; }
>    }
>I guess it would be possible to hold an instance of this as a StaticResource and bind the TextBoxes to it and then bind this instance to the Button.CommandParameter. But that would require just as much nous on the part of the designers (and I'm not sure it's doable anyway). I think I'm going to stick with modifying the VM but I'm not happy....

See my other reply. That's basically what I did. If the designer can't hack that I think you'll have to do the binding work for them. I'm not sure I see how modifying the VM would be simpler.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform