Skip to content

Commit

Permalink
v2.2.15.1-alpha (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mochengvia authored Dec 3, 2021
1 parent faaf8cc commit 94534c3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private void UpdateBinding()
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, FontFamilyProperty, Source, IconHelper.FontFamilyProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, ForegroundProperty, Source, IconHelper.ForegroundProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, FontSizeProperty, Source, IconHelper.FontSizeProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, ToolTipProperty, Source, IconHelper.ToolTipProperty);
FrameworkElementUtil.BindingPropertyIfUndefaultAndUninherited(this, VisibilityProperty, this, ContentProperty, new NullToCollapseConverter());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ public PendingHandlerImpl()
#region Methods
public void Close()
{

if(_window.IsAlive && _window.Target is PendingBoxWindow window)
{
window.Dispatcher.Invoke(new Action(() =>
if (window.Dispatcher.CheckAccess())
{
window.Close();
}));
window.Dispatcher.Invoke(new Action(() =>
{
window.Close();
}));
}
}
}
#endregion
Expand All @@ -58,10 +60,13 @@ public void UpdateMessage(string message)
{
if (_window.IsAlive && _window.Target is PendingBoxWindow window)
{
window.Dispatcher.Invoke(new Action(() =>
if (window.Dispatcher.CheckAccess())
{
window.UpdateMessage(message);
}));
window.Dispatcher.Invoke(new Action(() =>
{
window.UpdateMessage(message);
}));
}
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,22 @@ public static void SetForeground(DependencyObject obj, Brush value)
DependencyProperty.RegisterAttached("Foreground", typeof(Brush), typeof(IconHelper), new PropertyMetadata(Brushes.Black));
#endregion

#region ToolTip
public static object GetToolTip(DependencyObject obj)
{
return (object)obj.GetValue(ToolTipProperty);
}

public static void SetToolTip(DependencyObject obj, object value)
{
obj.SetValue(ToolTipProperty, value);
}

public static readonly DependencyProperty ToolTipProperty =
DependencyProperty.RegisterAttached("ToolTip", typeof(object), typeof(IconHelper), new PropertyMetadata(null));
#endregion


#endregion
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.15")]
[assembly: AssemblyFileVersion("2.2.15")]
[assembly: AssemblyVersion("2.2.15.1")]
[assembly: AssemblyFileVersion("2.2.15.1")]

0 comments on commit 94534c3

Please sign in to comment.