Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista Tutorial - Dynamic MultiBinding?

 
 
Old 06-06-2008   #1 (permalink)
Some Bloke
Guest


 
 

Dynamic MultiBinding?

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?

My System SpecsSystem Spec
Old 06-06-2008   #2 (permalink)
Some Bloke
Guest


 
 

Re: Dynamic MultiBinding?

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
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Dynamic statements? PowerShell
Dynamic Backgrounds gone Live Messenger
VB.NET: dynamic css .NET General
Dynamic .vhd expansion. Virtual Server
dynamic disks Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46