Is there a way to override the tooltips on the recent documents menu ? I'd like to show a friendlier tooltip than the full path, similar to the way MSWord does, if the file is in the current users "My Documents" folder or on their desktop...
e.g. show
"Desktop\foo.txt"
instead of
"C:\Documents and Settings\Jake\Desktop\foo.txt"
It seems that the System.URI used by the recent document manager is expected to be a full path, it has trouble if I pass in a relative one.
e.g. using
new Uri("Desktop\foo.txt", UriKind.Relative)
results in the following exception:
This operation is not supported for a relative URI.
------------------------------------------------------
at System.Uri.get_LocalPath()
at ActiproSoftware.Windows.DocumentManagement.DocumentReference.a(DependencyObject A_0, DependencyPropertyChangedEventArgs A_1)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at ActiproSoftware.Windows.DocumentManagement.DocumentReference.set_Location(Uri value)
at ActiproSoftware.Windows.DocumentManagement.DocumentReference..ctor(Uri location)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location, String name, Object tag)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location)
Thanks!
- Jake
e.g. show
"Desktop\foo.txt"
instead of
"C:\Documents and Settings\Jake\Desktop\foo.txt"
It seems that the System.URI used by the recent document manager is expected to be a full path, it has trouble if I pass in a relative one.
e.g. using
new Uri("Desktop\foo.txt", UriKind.Relative)
results in the following exception:
This operation is not supported for a relative URI.
------------------------------------------------------
at System.Uri.get_LocalPath()
at ActiproSoftware.Windows.DocumentManagement.DocumentReference.a(DependencyObject A_0, DependencyPropertyChangedEventArgs A_1)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at ActiproSoftware.Windows.DocumentManagement.DocumentReference.set_Location(Uri value)
at ActiproSoftware.Windows.DocumentManagement.DocumentReference..ctor(Uri location)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location, String name, Object tag)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location)
Thanks!
- Jake