summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2017-05-12 16:42:54 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2017-05-12 16:42:54 -0700
commit2fac693243dc3b6673be104b206bc82f46f0f70c (patch)
tree3458d3b706840b82d180d47a4f087a5bfc1a2cc9 /windows
parente9b956ed71b435bc279fe176d99b10c55a531200 (diff)
downloadinfinitytier-2fac693243dc3b6673be104b206bc82f46f0f70c.tar.gz
infinitytier-2fac693243dc3b6673be104b206bc82f46f0f70c.zip
I guess there's a bug in Clipboard.SetText(). Clipboard.SetDataObject() works, though.
Diffstat (limited to 'windows')
-rw-r--r--windows/WinUI/ToolbarItem.xaml.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/windows/WinUI/ToolbarItem.xaml.cs b/windows/WinUI/ToolbarItem.xaml.cs
index 8b77fa5f..9da9fcdf 100644
--- a/windows/WinUI/ToolbarItem.xaml.cs
+++ b/windows/WinUI/ToolbarItem.xaml.cs
@@ -111,14 +111,19 @@ namespace WinUI
private void ToolbarItem_NodeIDClicked(object sender, System.Windows.RoutedEventArgs e)
{
- try
- {
- Clipboard.SetText(nodeId);
- }
- catch (ArgumentNullException)
- {
- // tried to copy a null nodeId
- }
+ try
+ {
+ Clipboard.SetDataObject(nodeId);
+ }
+ catch (ArgumentNullException)
+ {
+ // tried to copy a null nodeId
+ Console.WriteLine("ArgumentNullException");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+ }
}
private void ToolbarItem_ShowNetworksClicked(object sender, System.Windows.RoutedEventArgs e)