views:

42

answers:

2

Hey! I was looking at a cool layout example in particular the V3FluidLayout.xaml found inside this set of examples : http://gallery.expression.microsoft.com/en-us/DynamicLayoutTrans

Anyhow - this appears to be a silverlight app - it runs within a browser. I am trying to pull the V3FluidLayout example into a WPF app - and struggling.

I "add an existing item" pulling the .xaml file into my project. When it goes to compile it, the following errors are found : alt text

Are these artifacts Silverlight? The following is the xaml code within the V3FluidLayout.xaml file

http://pastebin.com/h9ujUax6

Can anybody help me pin why this is not working - and how I can convert that xaml code to work inside my wpf app.

Thanks

Andy

+1  A: 

Basically (and from only a quick glance), you'll need a reference to the WPF versions of System.Windows.Interactivity and Microsoft.Expression.Interactions - they are part of Blend. Actually look at the references of that project and find the exact same references, only for WPF.

It looks like they contain pretty much the same classes for both WPF and Silverlight, so I think it should work in the end.

Alex Paven
Ok your answer makes sense however I dont know which ones in particular to look for - and I dont know where they would be on my hdd. I think the ones I need to find are System.windows.Interactivity.dll , system.windows.controls.dll, system.windows.controls.toolkit.dll perhaps?
RenegadeAndy
Well, it depends on the WPF version you're targeting; not sure it will work correctly with 3.5 + WpfToolkit, but in 4 all the internals you need are part of the framework (no need for the toolkit). The Expression Blend assemblies, which are the only extra ones needed (in 4) are located under: C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries for v4 and ....\Blend 3\Interactivity\Libraries\WPF for v3.5. Not sure if you need Blend installed or not but I'm guessing yes?
Alex Paven
I have blend installed, so i look in there for the system.windows dlls and just add them and then rebuild!?
RenegadeAndy
In theory, yes :) Can't guarantee the internals are implemented exactly the same so not sure if it will work exactly as expected from the first try, but... yes, try it.
Alex Paven
Well I added the 3.5 files and it has got rid of all except 1 error : The type or name pane is not defined "<demo:Pane x:Name="States" Grid.Row="1" Grid.RowSpan="3" Title="States"/> <demo:Pane x:Name="Props" Grid.Column="2" Grid.Row="1" Grid.RowSpan="4" Title="Props"/>" which I "Think" is a user control???
RenegadeAndy
Fixed: It was a user control I had not brought across!
RenegadeAndy
A: 

Add references to the interactivity assemblies found here: C:\Program Files (x86)\Microsoft SDKs\Expression\Blend.NETFramework\v4.0\Libraries

You need to install the Blend SDK to get them, the come with Blend also.

justin.m.chase