Hi all,
I use Silverlight toolkit in my IronPython Silverlight app. To lower bandwidth, I put all necessary Silverlight toolkit .dlls into separate file called SLToolkit.zip which I reference in AppManifest.xaml:

  <Deployment.ExternalParts>
    <ExtensionPart Source="Microsoft.Scripting.zip" />
    <ExtensionPart Source="SLToolkit.zip" />
  </Deployment.ExternalParts>


This works nicely if I don't need to reference assembly already existing in Silverlight - e.g. I do

clr.AddReference('System.Windows.Controls.Data')

and use DataGrid. Unfortunately, when I need to reference PagedCollectionView from System.Windows.Data, this approach does not work. Trying

from System.Windows.Data import PagedCollectionView

fails on ImportError: Cannot import name PagedCollectionView. Doing

import System.Windows.Data
System.Windows.Data.PagedCollectionView(some_data)


fails with AttributeError: attribute 'PagedCollectionView' of 'namespace#' object is read-only. When I try to add

clr.AddReference('System.Windows.Data')

if fails with: IOError: [Errno 2] could not find assembly: System.Windows.Data (check the Web server).

The only way how to make this work is to put System.Windows.Data.dll into .xap file and reference it with

clr.AddReferenceToFile('System.Windows.Data.dll')
from System.Windows.Data import PagedCollectionView


Is there a way to make it work when System.Windows.Data.dll is in the separate file? Or should I use another approach?

Thanks,

--
-- Lukáš
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to