- if (_border != null)
- { // for nine-patch image
- _nPatchMap = new PropertyMap();
- _nPatchMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch));
- _nPatchMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url));
- _nPatchMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border));
- if (_borderOnly != null) { _nPatchMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); }
- if (_synchronousLoading != null) { _nPatchMap.Add(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); }
- if (_orientationCorrection != null) { _nPatchMap.Add(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); }
- SetProperty(ImageView.Property.IMAGE, new PropertyValue(_nPatchMap));
- _imageType = ImageType.Npatch;
- }
- else if (_synchronousLoading != null || _orientationCorrection != null)
- { // for normal image, with synchronous loading property
- PropertyMap imageMap = new PropertyMap();
- imageMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
- imageMap.Add(ImageVisualProperty.URL, new PropertyValue(_url));
- if (_synchronousLoading != null) { imageMap.Add(ImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); }
- if (_orientationCorrection != null) { imageMap.Add(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); }
- SetProperty(ImageView.Property.IMAGE, new PropertyValue(imageMap));
-
- _imageType = ImageType.Specific;
- }
- else
- { // just for normal image
- SetProperty(ImageView.Property.IMAGE, new PropertyValue(_url));
- _imageType = ImageType.Normal;
- }
+ temp.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ temp.Insert(NpatchImageVisualProperty.BorderOnly, new PropertyValue(false));
+ temp.Insert(NpatchImageVisualProperty.Border, new PropertyValue(new Rectangle(0, 0, 0, 0)));