File tree Expand file tree Collapse file tree 5 files changed +64
-7
lines changed Expand file tree Collapse file tree 5 files changed +64
-7
lines changed Original file line number Diff line number Diff line change @@ -504,9 +504,23 @@ public static async void CloseApp()
504
504
public class WSLDistroItem : INavigationControlItem
505
505
{
506
506
public string Glyph { get ; set ; } = null ;
507
+
507
508
public string Text { get ; set ; }
508
- public string Path { get ; set ; }
509
+
510
+ private string path ;
511
+ public string Path
512
+ {
513
+ get => path ;
514
+ set
515
+ {
516
+ path = value ;
517
+ HoverDisplayText = Path . Contains ( "?" ) ? Text : Path ;
518
+ }
519
+ }
520
+ public string HoverDisplayText { get ; private set ; }
521
+
509
522
public NavigationControlItemType ItemType => NavigationControlItemType . LinuxDistro ;
523
+
510
524
public Uri Logo { get ; set ; }
511
525
}
512
526
}
Original file line number Diff line number Diff line change @@ -15,7 +15,19 @@ namespace Files.Filesystem
15
15
public class DriveItem : ObservableObject , INavigationControlItem
16
16
{
17
17
public string Glyph { get ; set ; }
18
- public string Path { get ; set ; }
18
+
19
+ private string path ;
20
+ public string Path
21
+ {
22
+ get => path ;
23
+ set
24
+ {
25
+ path = value ;
26
+ HoverDisplayText = Path . Contains ( "?" ) ? Text : Path ;
27
+ }
28
+ }
29
+
30
+ public string HoverDisplayText { get ; private set ; }
19
31
public string DeviceID { get ; set ; }
20
32
public StorageFolder Root { get ; set ; }
21
33
public NavigationControlItemType ItemType { get ; set ; } = NavigationControlItemType . Drive ;
Original file line number Diff line number Diff line change 3
3
public interface INavigationControlItem
4
4
{
5
5
public string Glyph { get ; }
6
+
6
7
public string Text { get ; }
8
+
7
9
public string Path { get ; }
10
+
11
+ public string HoverDisplayText { get ; }
12
+
8
13
public NavigationControlItemType ItemType { get ; }
9
14
}
10
15
Original file line number Diff line number Diff line change @@ -6,7 +6,19 @@ public class LocationItem : INavigationControlItem
6
6
{
7
7
public string Glyph { get ; set ; }
8
8
public string Text { get ; set ; }
9
- public string Path { get ; set ; }
9
+
10
+ private string path ;
11
+ public string Path
12
+ {
13
+ get => path ;
14
+ set
15
+ {
16
+ path = value ;
17
+ HoverDisplayText = Path . Contains ( "?" ) ? Text : Path ;
18
+ }
19
+ }
20
+
21
+ public string HoverDisplayText { get ; private set ; }
10
22
public FontFamily Font { get ; set ; } = new FontFamily ( "Segoe MDL2 Assets" ) ;
11
23
public NavigationControlItemType ItemType => NavigationControlItemType . Location ;
12
24
public bool IsDefaultLocation { get ; set ; }
@@ -15,8 +27,22 @@ public class LocationItem : INavigationControlItem
15
27
public class HeaderTextItem : INavigationControlItem
16
28
{
17
29
public string Glyph { get ; set ; } = null ;
30
+
18
31
public string Text { get ; set ; }
19
- public string Path { get ; set ; } = null ;
32
+
33
+ private string path ;
34
+ public string Path
35
+ {
36
+ get => path ;
37
+ set
38
+ {
39
+ path = value ;
40
+ HoverDisplayText = Path . Contains ( "?" ) ? Text : Path ;
41
+ }
42
+ }
43
+
44
+ public string HoverDisplayText { get ; private set ; }
45
+
20
46
public NavigationControlItemType ItemType => NavigationControlItemType . Header ;
21
47
}
22
48
}
Original file line number Diff line number Diff line change 56
56
IsRightTapEnabled =" True"
57
57
RightTapped =" NavigationViewLocationItem_RightTapped"
58
58
Tag =" {x:Bind Path}"
59
- ToolTipService.ToolTip=" {x:Bind Path }" >
59
+ ToolTipService.ToolTip=" {x:Bind HoverDisplayText }" >
60
60
<muxc : NavigationViewItem .Icon>
61
61
<FontIcon
62
62
FontFamily =" {x:Bind Font}"
80
80
IsRightTapEnabled =" True"
81
81
RightTapped =" NavigationViewDriveItem_RightTapped"
82
82
Tag =" {x:Bind Path}"
83
- ToolTipService.ToolTip=" {x:Bind Path , Mode=OneWay}"
83
+ ToolTipService.ToolTip=" {x:Bind HoverDisplayText , Mode=OneWay}"
84
84
Visibility =" {x:Bind ItemVisibility}" >
85
85
<muxc : NavigationViewItem .Icon>
86
86
<FontIcon
100
100
DragEnter =" NavigationViewItem_DragEnter"
101
101
DragLeave =" NavigationViewItem_DragLeave"
102
102
Tag =" {x:Bind Path}"
103
- ToolTipService.ToolTip=" {x:Bind Path , Mode=OneWay}" >
103
+ ToolTipService.ToolTip=" {x:Bind HoverDisplayText , Mode=OneWay}" >
104
104
<muxc : NavigationViewItem .Icon>
105
105
<BitmapIcon
106
106
Width =" 30"
You can’t perform that action at this time.
0 commit comments