Have you tried looking at TextButtonStyle in StandardStyles.xaml, included in the standard VS templates? You do not need to create your own hyperlink. In the subway, you can completely replace the control template, so there is no need to reproduce the functionality if there is already a control with the required functionality.
Edit: I took the TextButtonStyle template and changed the field to Margin="3,-20,3,0" , and then added FontSize="14" .
Now it looks like this:

The reason this was so far away is because the TextBlock template in the TextBlock in the TextButtonStyle template looks like this:
<Style x:Key="PageSubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource SubheaderTextStyle}"> <Setter Property="TextWrapping" Value="NoWrap"/> <Setter Property="VerticalAlignment" Value="Bottom"/> <Setter Property="Margin" Value="0,0,0,40"/> </Style>
Pay attention to margin. Therefore, to fix this, we either had to create a negative margin on the parent element (like me), or simply change the marker to PageSubheaderTextStyle .
mydogisbox
source share