[Ironpython-users] problem incorporating namespace into Xaml

John Trinder TrinderJohn at dsl.pipex.com
Fri Jul 25 01:45:00 CEST 2014

I'm new to FePy and after doing a fair bit of studying am embarking on 
transcoding a C# project to FePy. I'm encountering a problem 
incorporating a module that defines a subclass of Canvas and then trying 
to utilize this custom canvas in the Xaml code.

My skeleton files/modules and contents are as follows:


*_import clr
import System.Windows.Controls as swc

class CustomCanvas(swc.Canvas):
     def __init__(self):


        Title="WpfApplication1" Height="300" Width="300">
*<local:CustomCanvas HorizontalAlignment="Left" Height="100" 
Margin="96,90,0,0" VerticalAlignment="Top" Width="100"/>*


import wpf

from System.Windows import Application, Window

class MyWindow(Window):
     def __init__(self):
         wpf.LoadComponent(self, 'WpfApplication1.xaml')


I've marked in bold where I have incorporated my module/namespace. 
Intellisense says that on the *<local:CustomCanvas .../>* line, 
CustomCanvas 'does not exist in the namespace *"clr-namespace:module1"'*
I'm guessing that it's not possible to do (yet) what I want to do - 
which is pretty basic.
Thanks in advance btw for any advice and tips.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140725/f5691193/attachment.html>

More information about the Ironpython-users mailing list