fixed some issues at design time

This commit is contained in:
NaBian committed 2019-06-24 22:12:49 +08:00
1 parent 1c060d46d6
commit 3e90fca0f2
6 files changed
+23 -15

No files matched your search

@@ -204,7 +204,7 @@ namespace HandyControl.Controls
/// <param name="pos"></param>
private void Remove(int pos)
{
var item = _itemShowList[pos];
if (!_itemShowList.TryGetValue(pos, out var item)) return;
_visualParent.Children.Remove(item);
_itemShowList.Remove(pos);
}
@@ -308,10 +308,17 @@ namespace HandyControl.Controls
{
if (content is Uri uri)
{
return new CoverFlowItem(index, PageIndex, new Image
try
{
Source = BitmapFrame.Create(uri)
});
return new CoverFlowItem(index, PageIndex, new Image
{
Source = BitmapFrame.Create(uri, BitmapCreateOptions.DelayCreation, BitmapCacheOption.OnDemand)
});
}
catch
{
return new CoverFlowItem(index, PageIndex, new ContentControl());
}
}
return new CoverFlowItem(index, PageIndex, new ContentControl