Code: Select all
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sf="clr-namespace:Syncfusion.Windows.PropertyGrid;assembly=Syncfusion.PropertyGrid.Wpf"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<sf:PropertyGrid x:Name="PGrid"/>
</Window>
Now if you try the function test1 it is working:
Code: Select all
test1;⎕USING
⎕USING←'Syncfusion.Windows.PropertyGrid,Syncfusion/4.5/Syncfusion.PropertyGrid.Wpf.dll'
⎕USING,←⊂'System.Windows.Markup,WPF/PresentationFramework.dll'
⎕←XamlReader.Parse(⊂test_xaml)
if you define the functions test2 and FixMe, test2 is not working (the Xaml cannot be fixed because PropertyGrid is not found)
Code: Select all
obj←FixMe xaml;⎕USING
⎕USING←'System.Windows.Markup,WPF/PresentationFramework.dll'
obj←XamlReader.Parse(⊂xaml)
Code: Select all
test2;⎕USING
⎕USING←'Syncfusion.Windows.PropertyGrid,Syncfusion/4.5/Syncfusion.PropertyGrid.Wpf.dll'
FixMe test_xaml
Now for the function test3 define as:
Code: Select all
test3;⎕USING
⎕USING←'Syncfusion.Windows.PropertyGrid,Syncfusion/4.5/Syncfusion.PropertyGrid.Wpf.dll'
:Trap 0
Anything Here
:EndTrap
FixMe test_xaml
it is working ! Looks to me that after defining the ⎕USING and before fixing the XAML the interpreter needs to be 'forced' to search in ⎕USING to load it into memory. In the function test1 it is done when the interpreter is reading the line XamlReader.Parse(⊂test_xaml). In test2 when reading the line 'FixMe' the interpreter knows already that it is a function and will not search with ⎕USING making the function to fail. In test3 it will search in ⎕USING to try to find 'Anything Here' and that will load the dll into memory before running the function 'FixMe'.
Question: Is there a better way to write test3 or what is it that I don't understand ?
Thanks in advance,
Pierre Gilbert
P.S.: This has to be tried on a computer that has not the Syncfusion dlls loaded in the GAC (Global Assembly Cache) directory. Only into the Syncfusion/4.5/ directory (like for a RunTime user).