| Subject: Dynamic MultiBinding? |
| Group: microsoft.public.windows.developer.winfx.avalon |
| Date: 6/6/2008 4:24:41 AM |
| From: Some Bloke [Email Address Protection] |
In WPF I have a Canvas with child elements bound to data that render as shapes. I want the width of the Canvas bound to the maximum width of the shapes inside it so that that it automatically resizes as items are added or removed from the bound collection. This is one example but I have other examples of where I want to bind to an aggregate of a collection. I tried using a multibinding with a converter that returns the maximum width of the items in its Bindings collection but when I remove an item it throws an exception saying that a multibinding can not be changed once it is used. Is there a recommended way of doing this? |
| Back |
| Subject: Re: Dynamic MultiBinding? |
| Group: microsoft.public.windows.developer.winfx.avalon |
| Date: 6/6/2008 8:35:22 AM |
| From: Some Bloke [Email Address Protection] |
Sorry. I got a bit carried away with MultiBindings there. I solved it by creating a single binding to another ObservableCollection<Double> and updating that. Obvious now :) |
| Back |