按钮作为HyperlinkButton
本文关键字:HyperlinkButton 按钮 | 更新日期: 2023-09-27 18:15:21
不创建超链接按钮来导航到框架中的其他页面,我想使用按钮。这里有HyperlinkButton
<HyperlinkButton NavigateUri="/MyPageName" TargetName="mainFrame" Content="Go To My Page" />
我认为这是可能的,我到目前为止有这个
<Button x:Name="btnView" Content="View">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<!-- and i dont know what is next here -->
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
任何帮助都将不胜感激。
TIA
设计HyperlinkButton的内容。
<HyperlinkButton Name="btn" Margin="340,5,0,0" Background="Transparent" Height="48" VerticalAlignment="Top" Padding="2,0,2,2" BorderBrush="Transparent" Foreground="Black" HorizontalAlignment="Left" Width="110">
<HyperlinkButton.Content>
<Grid>
<Rectangle Fill="#FFC1B7B7" HorizontalAlignment="Stretch" Margin="0" RadiusX="4" RadiusY="4" Stroke="#FF1D1212" StrokeThickness="2" Width="Auto" Grid.Column="1" VerticalAlignment="Top" Height="43" />
<TextBlock Text="NONE" FontSize="16" Height="20" HorizontalAlignment="Left" Margin="0" Name="tb" Padding="2" VerticalAlignment="Bottom" Width="110" FontFamily="Courier New" FontWeight="Bold" Grid.Column="1" TextAlignment="Center" />
</Grid>
</HyperlinkButton.Content>
</HyperlinkButton>