//testFiles = new string [] { @"Interfaces/Unsorted/testFileDialog.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+ //testFiles = new string [] { @"Interfaces/TemplatedContainer/test_Listbox.crow" };
+ //testFiles = new string [] { @"Interfaces/TemplatedControl/testItemTemplateTag.crow" };
//testFiles = new string [] { @"Interfaces/Divers/test2WayBinding.crow" };
//testFiles = new string [] { @"Interfaces/Divers/testPropLess.crow" };
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
<Label Text="{../ColorList.SelectedItem}" Background="DarkGreen"/>
<Label Text="{Hover}" Background="DarkGreen"/>
<Button Caption="Clear" Width="Stretched" MouseClick="OnClear"/>
-<!-- <ListBox Name="ColorList" Data="{TestList}" Width="200" Height="200"
+ <ListBox Name="ColorList" Data="{TestList}" Width="200" Height="200"
ItemTemplate="#Tests.Interfaces.colorItem.crow">
</ListBox>
- <Button Caption="Load list" Width="Stretched" MouseClick="OnLoadList"/>-->
+ <Button Caption="Load list" Width="Stretched" MouseClick="OnLoadList"/>
</VerticalStack>
</Border>
\ No newline at end of file
il.MarkLabel (convert);
if (dstType == typeof(string)) {
+ System.Reflection.Emit.Label emitNullStr = il.DefineLabel ();
+ il.Emit (OpCodes.Dup);
+ il.Emit (OpCodes.Brfalse, emitNullStr);
il.Emit (OpCodes.Callvirt, CompilerServices.miObjToString);
+ il.Emit (OpCodes.Br, endConvert);
+ il.MarkLabel (emitNullStr);
+ il.Emit (OpCodes.Pop);//remove null string from stack
+ il.Emit (OpCodes.Ldstr, "");//replace with empty string
} else if (dstType.IsPrimitive) {
//il.Emit (OpCodes.Unbox_Any, dstType);
il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (dstType));
il.Emit (OpCodes.Unbox_Any, dstType);
} else{
il.Emit (OpCodes.Stloc_0); //save orig value in loc0
+ //first check if not null
il.Emit (OpCodes.Ldloc_0);
+ il.Emit (OpCodes.Dup);
+ il.Emit (OpCodes.Brfalse, endConvert);
il.Emit (OpCodes.Callvirt, miGetType);
il.Emit (OpCodes.Ldtoken, dstType);//push destination property type for testing
il.Emit (OpCodes.Call, CompilerServices.miGetTypeFromHandle);