Merge branch 'master' into pr/84
This commit is contained in:
commit
bdce2a84c7
160 files changed
+2186
-1603
No files matched your search
@@ -1,47 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using HandyControl.Interactivity;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class LinkElement
|
||||
{
|
||||
public static readonly DependencyProperty LinkProperty = DependencyProperty.RegisterAttached(
|
||||
"Link", typeof(string), typeof(LinkElement), new PropertyMetadata(default(string), OnLinkChanged));
|
||||
|
||||
private static void OnLinkChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (d is UIElement element)
|
||||
{
|
||||
CreateTrigger(element, (string) e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly DependencyProperty CommandBindingProperty = DependencyProperty.RegisterAttached(
|
||||
"CommandBinding", typeof(CommandBinding), typeof(LinkElement), new PropertyMetadata(default(CommandBinding)));
|
||||
|
||||
private static void SetCommandBinding(DependencyObject element, CommandBinding value)
|
||||
=> element.SetValue(CommandBindingProperty, value);
|
||||
|
||||
private static CommandBinding GetCommandBinding(DependencyObject element)
|
||||
=> (CommandBinding) element.GetValue(CommandBindingProperty);
|
||||
|
||||
private static void CreateTrigger(UIElement element, string link)
|
||||
{
|
||||
element.CommandBindings.Remove(GetCommandBinding(element));
|
||||
element.SetCurrentValue(CommandBindingProperty, DependencyProperty.UnsetValue);
|
||||
|
||||
if (string.IsNullOrEmpty(link)) return;
|
||||
var commandBinding = new CommandBinding(ControlCommands.OpenLink, (sender, args) => Process.Start(link));
|
||||
SetCommandBinding(element, commandBinding);
|
||||
element.CommandBindings.Add(commandBinding);
|
||||
}
|
||||
|
||||
public static void SetLink(DependencyObject element, string value)
|
||||
=> element.SetValue(LinkProperty, value);
|
||||
|
||||
public static string GetLink(DependencyObject element)
|
||||
=> (string) element.GetValue(LinkProperty);
|
||||
}
|
||||
}
|
||||
@@ -453,7 +453,7 @@ namespace HandyControl.Controls
|
||||
|
||||
var button = new Button
|
||||
{
|
||||
Margin = new Thickness(0, 0, 12, 12),
|
||||
Margin = new Thickness(6),
|
||||
Style = ResourceHelper.GetResource<Style>(ResourceToken.ButtonCustom),
|
||||
Content = new Border
|
||||
{
|
||||
|
||||
@@ -137,11 +137,6 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
private double _imgWidHeiScale;
|
||||
|
||||
/// <summary>
|
||||
/// 是否已经初始化
|
||||
/// </summary>
|
||||
private bool _isLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// 图片是否倾斜
|
||||
/// </summary>
|
||||
@@ -168,8 +163,6 @@ namespace HandyControl.Controls
|
||||
|
||||
public ImageViewer()
|
||||
{
|
||||
Loaded += ImageViewer_OnLoaded;
|
||||
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Save, ButtonSave_OnClick));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Open, ButtonWindowsOpen_OnClick));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Restore, ButtonActual_OnClick));
|
||||
@@ -177,6 +170,8 @@ namespace HandyControl.Controls
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Enlarge, ButtonEnlarge_OnClick));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.RotateLeft, ButtonRotateLeft_OnClick));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.RotateRight, ButtonRotateRight_OnClick));
|
||||
|
||||
Loaded += (s, e) => Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -217,7 +212,13 @@ namespace HandyControl.Controls
|
||||
"ShowImgMap", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
|
||||
"ImageSource", typeof(BitmapFrame), typeof(ImageViewer), new PropertyMetadata(default(BitmapFrame)));
|
||||
"ImageSource", typeof(BitmapFrame), typeof(ImageViewer), new PropertyMetadata(default(BitmapFrame), OnImageSourceChanged));
|
||||
|
||||
private static void OnImageSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (ImageViewer) d;
|
||||
ctl.Init();
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsFullScreenProperty = DependencyProperty.Register(
|
||||
"IsFullScreen", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
@@ -410,7 +411,7 @@ namespace HandyControl.Controls
|
||||
if (_imageMain != null)
|
||||
{
|
||||
var t = new RotateTransform();
|
||||
BindingOperations.SetBinding(t, RotateTransform.AngleProperty, new Binding(ImageRotateProperty.Name) {Source = this});
|
||||
BindingOperations.SetBinding(t, RotateTransform.AngleProperty, new Binding(ImageRotateProperty.Name) { Source = this });
|
||||
_imageMain.LayoutTransform = t;
|
||||
_imageMain.MouseLeftButtonDown += ImageMain_OnMouseLeftButtonDown;
|
||||
}
|
||||
@@ -422,6 +423,8 @@ namespace HandyControl.Controls
|
||||
_canvasSmallImg.MouseMove += CanvasSmallImg_OnMouseMove;
|
||||
_canvasSmallImg.MouseLeave += CanvasSmallImg_OnMouseLeave;
|
||||
}
|
||||
|
||||
_borderSmallIsLoaded = false;
|
||||
}
|
||||
|
||||
private static void OnImageScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
@@ -439,7 +442,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
private void Init()
|
||||
{
|
||||
if (ImageSource == null) return;
|
||||
if (ImageSource == null || !IsLoaded) return;
|
||||
|
||||
double width;
|
||||
double height;
|
||||
@@ -486,8 +489,10 @@ namespace HandyControl.Controls
|
||||
|
||||
ImageMargin = new Thickness((ActualWidth - ImageWidth) / 2, (ActualHeight - ImageHeight) / 2, 0, 0);
|
||||
|
||||
_imgActualScale = 1;
|
||||
_imgActualScale = ImageScale;
|
||||
_imgActualMargin = ImageMargin;
|
||||
|
||||
InitBorderSmall();
|
||||
}
|
||||
|
||||
private void ButtonActual_OnClick(object sender, RoutedEventArgs e)
|
||||
@@ -571,8 +576,11 @@ namespace HandyControl.Controls
|
||||
{
|
||||
base.OnRenderSizeChanged(sizeInfo);
|
||||
|
||||
if (!_isLoaded) return;
|
||||
OnRenderSizeChanged();
|
||||
}
|
||||
|
||||
private void OnRenderSizeChanged()
|
||||
{
|
||||
if (ImageWidth < 0.001 || ImageHeight < 0.001) return;
|
||||
|
||||
_canMoveX = true;
|
||||
@@ -601,13 +609,6 @@ namespace HandyControl.Controls
|
||||
MoveSmallImg(_imgSmallMouseDownMargin.Left, _imgSmallMouseDownMargin.Top);
|
||||
}
|
||||
|
||||
private void ImageViewer_OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_isLoaded) return;
|
||||
Init();
|
||||
_isLoaded = true;
|
||||
}
|
||||
|
||||
private void ImageMain_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
_imgMouseDownPoint = Mouse.GetPosition(_panelMain);
|
||||
@@ -649,6 +650,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
private void InitBorderSmall()
|
||||
{
|
||||
if (_canvasSmallImg == null) return;
|
||||
var scaleWindow = _canvasSmallImg.MaxWidth / _canvasSmallImg.MaxHeight;
|
||||
if (_imgWidHeiScale > scaleWindow)
|
||||
{
|
||||
@@ -773,7 +775,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_imgActualRotate = rotate;
|
||||
|
||||
_isOblique = ((int) _imgActualRotate - 90) % 180 == 0;
|
||||
_isOblique = ((int)_imgActualRotate - 90) % 180 == 0;
|
||||
ShowSmallImgInternal = false;
|
||||
Init();
|
||||
InitBorderSmall();
|
||||
|
||||
@@ -159,6 +159,10 @@ namespace HandyControl.Controls
|
||||
{
|
||||
var ctl = (NumericUpDown) d;
|
||||
var v = (double) e.NewValue;
|
||||
if (ctl._textBox != null)
|
||||
{
|
||||
ctl._textBox.Text = v.ToString();
|
||||
}
|
||||
|
||||
ctl.OnValueChanged(new FunctionEventArgs<double>(ValueChangedEvent, ctl)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -30,7 +31,7 @@ namespace HandyControl.Controls
|
||||
|
||||
private TabPanel _headerPanel;
|
||||
|
||||
private ScrollViewer _scrollviewerOverflow;
|
||||
private ScrollViewer _scrollViewerOverflow;
|
||||
|
||||
private Button _buttonScrollLeft;
|
||||
|
||||
@@ -146,6 +147,36 @@ namespace HandyControl.Controls
|
||||
set => SetValue(IsScrollableProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示溢出按钮
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ShowOverflowButtonProperty = DependencyProperty.Register(
|
||||
"ShowOverflowButton", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.TrueBox));
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示溢出按钮
|
||||
/// </summary>
|
||||
public bool ShowOverflowButton
|
||||
{
|
||||
get => (bool) GetValue(ShowOverflowButtonProperty);
|
||||
set => SetValue(ShowOverflowButtonProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示滚动按钮
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ShowScrollButtonProperty = DependencyProperty.Register(
|
||||
"ShowScrollButton", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示滚动按钮
|
||||
/// </summary>
|
||||
public bool ShowScrollButton
|
||||
{
|
||||
get => (bool) GetValue(ShowScrollButtonProperty);
|
||||
set => SetValue(ShowScrollButtonProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 可见的标签数量
|
||||
/// </summary>
|
||||
@@ -164,7 +195,7 @@ namespace HandyControl.Controls
|
||||
if (!IsEnableTabFill)
|
||||
{
|
||||
_itemShowCount = (int)(ActualWidth / TabItemWidth);
|
||||
_buttonOverflow.Show(Items.Count > 0 && Items.Count >= _itemShowCount);
|
||||
_buttonOverflow?.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
|
||||
}
|
||||
|
||||
if (IsInternalAction)
|
||||
@@ -214,7 +245,7 @@ namespace HandyControl.Controls
|
||||
if (IsEnableTabFill) return;
|
||||
|
||||
_buttonOverflow = GetTemplateChild(OverflowButtonKey) as ContextMenuToggleButton;
|
||||
_scrollviewerOverflow = GetTemplateChild(OverflowScrollviewer) as ScrollViewer;
|
||||
_scrollViewerOverflow = GetTemplateChild(OverflowScrollviewer) as ScrollViewer;
|
||||
_buttonScrollLeft = GetTemplateChild(ScrollButtonLeft) as Button;
|
||||
_buttonScrollRight = GetTemplateChild(ScrollButtonRight) as Button;
|
||||
|
||||
@@ -224,7 +255,7 @@ namespace HandyControl.Controls
|
||||
if (_buttonOverflow != null)
|
||||
{
|
||||
_itemShowCount = (int)(ActualWidth / TabItemWidth);
|
||||
_buttonOverflow.Show(Items.Count > 0 && Items.Count >= _itemShowCount);
|
||||
_buttonOverflow.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
|
||||
|
||||
var menu = new ContextMenu
|
||||
{
|
||||
@@ -240,12 +271,12 @@ namespace HandyControl.Controls
|
||||
private void Menu_Closed(object sender, RoutedEventArgs e) => _buttonOverflow.IsChecked = false;
|
||||
|
||||
private void ButtonScrollRight_Click(object sender, RoutedEventArgs e) =>
|
||||
_scrollviewerOverflow.ScrollToHorizontalOffsetInternal(Math.Min(
|
||||
_scrollviewerOverflow.CurrentHorizontalOffset + TabItemWidth, _scrollviewerOverflow.ScrollableWidth));
|
||||
_scrollViewerOverflow.ScrollToHorizontalOffsetInternal(Math.Min(
|
||||
_scrollViewerOverflow.CurrentHorizontalOffset + TabItemWidth, _scrollViewerOverflow.ScrollableWidth));
|
||||
|
||||
private void ButtonScrollLeft_Click(object sender, RoutedEventArgs e) =>
|
||||
_scrollviewerOverflow.ScrollToHorizontalOffsetInternal(Math.Max(
|
||||
_scrollviewerOverflow.CurrentHorizontalOffset - TabItemWidth, 0));
|
||||
_scrollViewerOverflow.ScrollToHorizontalOffsetInternal(Math.Max(
|
||||
_scrollViewerOverflow.CurrentHorizontalOffset - TabItemWidth, 0));
|
||||
|
||||
private void ButtonOverflow_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -288,11 +319,37 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}
|
||||
|
||||
internal double GetHorizontalOffset() => _scrollviewerOverflow?.CurrentHorizontalOffset ?? 0;
|
||||
internal double GetHorizontalOffset() => _scrollViewerOverflow?.CurrentHorizontalOffset ?? 0;
|
||||
|
||||
internal void UpdateScroll() => _scrollviewerOverflow?.RaiseEvent(new MouseWheelEventArgs(Mouse.PrimaryDevice, Environment.TickCount, 0)
|
||||
internal void UpdateScroll() => _scrollViewerOverflow?.RaiseEvent(new MouseWheelEventArgs(Mouse.PrimaryDevice, Environment.TickCount, 0)
|
||||
{
|
||||
RoutedEvent = MouseWheelEvent
|
||||
});
|
||||
|
||||
internal void CloseAllItems() => CloseOtherItems(null);
|
||||
|
||||
internal void CloseOtherItems(TabItem currentItem)
|
||||
{
|
||||
IsInternalAction = true;
|
||||
var enumerator = ((IEnumerable)Items).GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
var item = enumerator.Current;
|
||||
if (!Equals(item, currentItem) && item != null)
|
||||
{
|
||||
var argsClosing = new CancelRoutedEventArgs(TabItem.ClosingEvent, item);
|
||||
var elment = item as UIElement;
|
||||
if (elment != null)
|
||||
{
|
||||
elment.RaiseEvent(argsClosing);
|
||||
if (argsClosing.Cancel) return;
|
||||
}
|
||||
|
||||
elment?.RaiseEvent(new RoutedEventArgs(TabItem.ClosedEvent, item));
|
||||
Items.Remove(item);
|
||||
enumerator = ((IEnumerable)Items).GetEnumerator();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Interactivity;
|
||||
using HandyControl.Tools;
|
||||
|
||||
@@ -130,26 +130,11 @@ namespace HandyControl.Controls
|
||||
|
||||
public TabItem()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Close, Close));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.CloseAll, (s, e) =>
|
||||
{
|
||||
TabControlParent.IsInternalAction = true;
|
||||
TabControlParent.Items.Clear();
|
||||
}));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.CloseOther, (s, e) =>
|
||||
{
|
||||
TabControlParent.IsInternalAction = true;
|
||||
var enumerator = ((IEnumerable)TabControlParent.Items).GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
var item = enumerator.Current;
|
||||
if (!Equals(item) && item != null)
|
||||
{
|
||||
TabControlParent.Items.Remove(item);
|
||||
enumerator = ((IEnumerable)TabControlParent.Items).GetEnumerator();
|
||||
}
|
||||
}
|
||||
}));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Close, (s, e) => Close()));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.CloseAll,
|
||||
(s, e) => { TabControlParent.CloseAllItems(); }));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.CloseOther,
|
||||
(s, e) => { TabControlParent.CloseOtherItems(this); }));
|
||||
}
|
||||
|
||||
private TabControl TabControlParent => new Lazy<TabControl>(() => ItemsControl.ItemsControlFromItemContainer(this) as TabControl).Value;
|
||||
@@ -161,11 +146,12 @@ namespace HandyControl.Controls
|
||||
Focus();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭
|
||||
/// </summary>
|
||||
private void Close(object sender, RoutedEventArgs e)
|
||||
internal void Close()
|
||||
{
|
||||
var argsClosing = new CancelRoutedEventArgs(ClosingEvent, this);
|
||||
RaiseEvent(argsClosing);
|
||||
if (argsClosing.Cancel) return;
|
||||
|
||||
if (TabControlParent.IsEnableAnimation)
|
||||
{
|
||||
TabPanel.ClearValue(TabPanel.FluidMoveDurationProperty);
|
||||
@@ -175,6 +161,7 @@ namespace HandyControl.Controls
|
||||
TabPanel.FluidMoveDuration = new Duration(TimeSpan.FromSeconds(0));
|
||||
}
|
||||
TabControlParent.IsInternalAction = true;
|
||||
RaiseEvent(new RoutedEventArgs(ClosedEvent, this));
|
||||
TabControlParent.Items.Remove(this);
|
||||
}
|
||||
|
||||
@@ -300,5 +287,21 @@ namespace HandyControl.Controls
|
||||
|
||||
return result > maxIndex ? maxIndex : result;
|
||||
}
|
||||
|
||||
public static readonly RoutedEvent ClosingEvent = EventManager.RegisterRoutedEvent("Closing", RoutingStrategy.Bubble, typeof(EventHandler), typeof(TabItem));
|
||||
|
||||
public event EventHandler Closing
|
||||
{
|
||||
add => AddHandler(ClosingEvent, value);
|
||||
remove => RemoveHandler(ClosingEvent, value);
|
||||
}
|
||||
|
||||
public static readonly RoutedEvent ClosedEvent = EventManager.RegisterRoutedEvent("Closed", RoutingStrategy.Bubble, typeof(EventHandler), typeof(TabItem));
|
||||
|
||||
public event EventHandler Closed
|
||||
{
|
||||
add => AddHandler(ClosedEvent, value);
|
||||
remove => RemoveHandler(ClosedEvent, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Interactivity;
|
||||
using HandyControl.Tools;
|
||||
|
||||
|
||||
namespace HandyControl.Controls
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace HandyControl.Controls
|
||||
|
||||
private readonly Dictionary<object, TransferEntry> _entryDic = new Dictionary<object, TransferEntry>();
|
||||
|
||||
private readonly List<TransferEntry> _entryList = new List<TransferEntry>();
|
||||
|
||||
private SimpleItemsControl _itemsOrigin;
|
||||
|
||||
private SimpleItemsControl _itemsSelected;
|
||||
@@ -79,8 +81,8 @@ namespace HandyControl.Controls
|
||||
{
|
||||
if (_initEnumerable != null)
|
||||
{
|
||||
OnItemsSourceChanged(null, _itemsSourceInternal);
|
||||
_itemsSourceInternal = null;
|
||||
OnItemsSourceChanged(null, _initEnumerable);
|
||||
_initEnumerable = null;
|
||||
}
|
||||
|
||||
if (_initArgs != null)
|
||||
@@ -89,7 +91,10 @@ namespace HandyControl.Controls
|
||||
_initArgs = null;
|
||||
}
|
||||
|
||||
Refresh();
|
||||
if (_itemsOrigin.Items.Count == 0)
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +115,7 @@ namespace HandyControl.Controls
|
||||
SelectedItem = selected
|
||||
};
|
||||
_entryDic.Add(item, entry);
|
||||
_entryList.Add(entry);
|
||||
_itemsOrigin.Items.Add(origin);
|
||||
_itemsSelected.Items.Add(selected);
|
||||
}
|
||||
@@ -121,12 +127,14 @@ namespace HandyControl.Controls
|
||||
_itemsOrigin.Items.Remove(entry.OriginItem);
|
||||
_itemsSelected.Items.Remove(entry.SelectedItem);
|
||||
_entryDic.Remove(item);
|
||||
_entryList.Remove(entry);
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearItems()
|
||||
{
|
||||
_entryDic.Clear();
|
||||
_entryList.Clear();
|
||||
_itemsOrigin.Items.Clear();
|
||||
_itemsSelected.Items.Clear();
|
||||
}
|
||||
@@ -221,10 +229,10 @@ namespace HandyControl.Controls
|
||||
|
||||
protected override void Refresh()
|
||||
{
|
||||
if (_entryDic.Count > 0)
|
||||
if (_entryList.Count > 0)
|
||||
{
|
||||
_entryDic.Select(item => item.Value.OriginItem).Do(item => _itemsOrigin.Items.Add(item));
|
||||
_entryDic.Select(item => item.Value.SelectedItem).Do(item => _itemsSelected.Items.Add(item));
|
||||
_entryList.Select(item => item.OriginItem).Do(item => _itemsOrigin.Items.Add(item));
|
||||
_entryList.Select(item => item.SelectedItem).Do(item => _itemsSelected.Items.Add(item));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_imageViewer.ImageSource = BitmapFrame.Create(uri);
|
||||
_imageViewer.ImgPath = uri.AbsolutePath;
|
||||
|
||||
if (File.Exists(_imageViewer.ImgPath))
|
||||
{
|
||||
var info = new FileInfo(_imageViewer.ImgPath);
|
||||
|
||||
Reference in new issue
Block a user