|
10 | 10 | xmlns:ctrl="clr-namespace:MRULib.Controls"
|
11 | 11 | xmlns:reskeys="clr-namespace:MRULib.Themes"
|
12 | 12 | >
|
13 |
| -<!-- |
14 |
| - !!! NOT Using a Grid here because the PathTrimmingTextBlock looks for a parent Grid |
15 |
| - !!! to compute its correct size. So, the complete control should be placed inside a Grid |
16 |
| - !!! to make sure measuring works as expected. |
17 |
| ---> |
18 |
| - <!--UserControl.ContextMenu> |
| 13 | + <!--UserControl.ContextMenu> |
19 | 14 | <ContextMenu>
|
20 | 15 | <MenuItem Header="Copy Url to Clipboard"
|
21 | 16 | Command="{x:Static hyperl:PathTrimmingFileHyperlink.CopyUri}"
|
|
30 | 25 | CommandTarget="{Binding PlacementTarget, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContextMenu}}}"/>
|
31 | 26 | </ContextMenu>
|
32 | 27 | </UserControl.ContextMenu-->
|
33 |
| - <!-- |
34 |
| - !!! NOT Using a Grid here because the PathTrimmingTextBlock looks for a parent Grid |
35 |
| - !!! to compute its correct size. So, the complete control should be placed inside a Grid. |
36 |
| - --> |
| 28 | + |
| 29 | + <Grid> |
37 | 30 | <TextBlock>
|
38 | 31 | <TextBlock.InputBindings>
|
39 | 32 | <KeyBinding Key="C" Modifiers="Ctrl"
|
|
59 | 52 | TextDecorations="{Binding Path=TextDecorations, RelativeSource={RelativeSource FindAncestor, AncestorType=hyperl:PathTrimmingFileHyperlink, AncestorLevel=1},Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
60 | 53 | >
|
61 | 54 | <ctrl:PathTrimmingTextBlock
|
62 |
| - ShowElipses="{Binding ShowEllipses, RelativeSource={RelativeSource FindAncestor, AncestorType=hyperl:PathTrimmingFileHyperlink, AncestorLevel=1},Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
63 | 55 | Path="{Binding Path=Text, RelativeSource={RelativeSource FindAncestor, AncestorType=hyperl:PathTrimmingFileHyperlink, AncestorLevel=1},Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
64 | 56 | Foreground="{DynamicResource {x:Static reskeys:ResourceKeys.Hyperlink_Foreground}}"
|
65 |
| - /> |
66 |
| - <!-- TextBlock Text="{Binding Path=Text, RelativeSource={RelativeSource FindAncestor, AncestorType=hyperl:PathTrimmingFileHyperlink, AncestorLevel=1}}" / --> |
| 57 | + ShowElipses="{Binding ShowEllipses, RelativeSource={RelativeSource FindAncestor, AncestorType=hyperl:PathTrimmingFileHyperlink, AncestorLevel=1},Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" |
| 58 | + > |
| 59 | + </ctrl:PathTrimmingTextBlock> |
67 | 60 | </Hyperlink>
|
68 | 61 | </TextBlock>
|
| 62 | + </Grid> |
69 | 63 | </UserControl>
|
0 commit comments