diff --git a/XamlStudio/Models/FileBackedDocument.cs b/XamlStudio/Models/FileBackedDocument.cs
index e2ffc8e..f88d9d7 100644
--- a/XamlStudio/Models/FileBackedDocument.cs
+++ b/XamlStudio/Models/FileBackedDocument.cs
@@ -25,10 +25,16 @@ public abstract partial class FileBackedDocument : ObservableObject
///
public string Title
{
- get { return (HasChanged ? "*" : "") + field; }
- set { SetProperty(ref field, value.Trim('*')); }
+ get => (HasChanged ? "*" : "") + field;
+ set => SetProperty(ref field, value.Trim('*'));
}
+ ///
+ /// Gets the file path as displayed for tooltips
+ ///
+ [JsonIgnore]
+ public string DisplayPath => BackingFile?.Path ?? Title;
+
//// TODO: This is effectively private, but needs to be serialized, investigate options when switching away from Newtonsoft
public string StorageToken { get; set; }
diff --git a/XamlStudio/Models/XamlDocument.cs b/XamlStudio/Models/XamlDocument.cs
index c3322f5..066bd6f 100644
--- a/XamlStudio/Models/XamlDocument.cs
+++ b/XamlStudio/Models/XamlDocument.cs
@@ -38,7 +38,7 @@ public sealed partial class XamlDocument : FileBackedDocument
public partial DocumentState State { get; set; } = new DocumentState();
[JsonIgnore]
- public string DisplayName { get { return BackingFile.DisplayName; } }
+ public string DisplayName => BackingFile?.DisplayName;
internal XamlDocument()
{
diff --git a/XamlStudio/Views/Explorer.xaml b/XamlStudio/Views/Explorer.xaml
index b21b6c6..95b813e 100644
--- a/XamlStudio/Views/Explorer.xaml
+++ b/XamlStudio/Views/Explorer.xaml
@@ -31,7 +31,8 @@
+ Text="{x:Bind ((storage:StorageFile)Content).Name}"
+ ToolTipService.ToolTip="{x:Bind ((storage:StorageFile)Content).Name}" />
@@ -43,7 +44,8 @@
+ Text="{x:Bind ((storage:StorageFile)Content).Name}"
+ ToolTipService.ToolTip="{x:Bind ((storage:StorageFile)Content).Name}" />
@@ -55,7 +57,8 @@
+ Text="{x:Bind ((storage:StorageFile)Content).Name}"
+ ToolTipService.ToolTip="{x:Bind ((storage:StorageFile)Content).Name}" />
+ Text="{x:Bind ((storage:StorageFile)Content).Name}"
+ ToolTipService.ToolTip="{x:Bind ((storage:StorageFile)Content).Name}" />
@@ -84,7 +88,8 @@
+ Text="{x:Bind ((storage:StorageFolder)Content).DisplayName}"
+ ToolTipService.ToolTip="{x:Bind ((storage:StorageFolder)Content).DisplayName}" />
@@ -149,7 +154,9 @@
+ Text="{Binding Title}"
+ TextTrimming="CharacterEllipsis"
+ ToolTipService.ToolTip="{Binding DisplayPath}"/>
-
+
-
+