fixed some issues at design time
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user