1

我不想创建一个 HyperlinkBut​​ton 来导航到框架中的其他页面,而是使用该按钮。我有这个超链接按钮

<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

4

1 回答 1

0

设计 HyperlinkBut​​ton 的内容。

<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>
于 2013-05-25T05:01:38.427 回答