Ajouter un commentaire

Sylvain
Probleme de lien HyperTexte avec Silverlight

Bonjour,

Je doit crée un site web sous silverlight, la pas de gros problème.

J'ai inséré un bouton dans ma page, et le les encadrer de la balise "HyperlinkButton". Mais la, lorsque je clic sur le bouton aucune page ne s'ouvre.

Pourtant quand j'utilise la methode trouver sur se site : http://blogs.msdn.com/vsastuces/archive/2008/12/02/astuce-silverlight-comment-cr-er-un-lien-hypertexte-hyperlink-s006.aspx sa marche.

Voila le code XAML du site :

<UserControl x:Class="ProjetSiteWeb.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <Grid x:Name="LayoutRoot"  Height="1024" Width="768" Margin="0,0,0,0" RenderTransformOrigin="0.5,0.5">


<!-- debut Grid LayoutSite Background="White"       
<Grid x:Name="LayoutSite" ShowGridLines="True" Height="1024" Width="768" Margin="0,0,0,0" VerticalAlignment="Top" d:LayoutOverrides="Height" RenderTransformOrigin="0.521,0.547" Visibility="Visible" Opacity="1">--> 
	<Grid.Background>
		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" SpreadMethod="Reflect">
			<GradientStop Color="#FFA26666" Offset="0.603"/>
			<GradientStop Color="#FF610707" Offset="0"/>
		</LinearGradientBrush>
	</Grid.Background>
	<!--<TextBlock Margin="96,28,144,24" Text="HAUT" TextWrapping="Wrap"/>-->
            <Grid.RowDefinitions>
                <RowDefinition Height="121"></RowDefinition>
                <RowDefinition Height="798"></RowDefinition>
                <RowDefinition Height="0"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="57"></ColumnDefinition>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
    <!--Debut Grid Image-->
<Grid Height="55" Margin="-3.972,0,-438.972,-0.341" VerticalAlignment="Bottom" Grid.Column="1" x:Name="Grid_top">
	<Image Height="54.807" Source="arrondie_haut5.png" Stretch="Fill" Opacity="1" OpacityMask="#FFFFFFFF" HorizontalAlignment="Stretch" VerticalAlignment="Top" UseLayoutRounding="True" Margin="0,-0.214,0,0" x:Name="Image_top" d:LayoutOverrides="Height"/>
</Grid>
<Grid Width="73.944" Margin="-3.972,0,0,-97" HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Height="895" d:LayoutOverrides="Width" x:Name="Grid_left">
	<Image Source="arrondie_cote2.png" Stretch="Fill" Margin="-0.054,0,0.054,0" x:Name="Image_left"/>
</Grid>
    <!--Fin Grid Image-->
<!--Debut Grid Contenue-->
<Grid x:Name="Grid_Contenue" Margin="69.944,0.125,-439,-96.784" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5" Background="White">
	<!--<Grid.RenderTransform>
		<TransformGroup>
			<ScaleTransform/>
			<SkewTransform AngleY="-0.127"/>
			<RotateTransform/>
			<TranslateTransform Y="-0.498"/>
		</TransformGroup>
	</Grid.RenderTransform>-->
	<TextBlock x:Name="TextBlock_Bienvenue" VerticalAlignment="Top" TextAlignment="Center" TextWrapping="Wrap"  FontSize="36" Margin="7.994,8.113,282.006,0">
        <Run FontFamily="./Fonts/Fonts.zip#JasmineUPC" Text="Bienvenue sur le site de la société "/><LineBreak/>
        <Run FontFamily="./Fonts/Fonts.zip#JasmineUPC" Text="SOCIETE"/>
    </TextBlock>

	<TextBlock x:Name="TextBlock_Copyright" Height="20.529" Width="376"  VerticalAlignment="Bottom" TextWrapping="Wrap"  FontSize="19"  HorizontalAlignment="Left" Margin="145,0,0,16.471" d:LayoutOverrides="Height" >
        <Run FontFamily="./Fonts/Fonts.zip#JasmineUPC"  Text="Copyright © 2009 SOCIETE et Fleurot Sylvain. "/>
        <Run FontFamily="./Fonts/Fonts.zip#JasmineUPC"  Text="Tous droits réservés."/>
    </TextBlock>
	<TextBlock x:Name="TextBlock_DemandeConnexion" Height="24" Margin="49,255,0,0" VerticalAlignment="Top" Text="Veuillez-vous connecter" TextWrapping="Wrap" Width="144" HorizontalAlignment="Left"/>
	<TextBlock x:Name="TextBlock_Login" Height="16" Margin="49,311,0,0" VerticalAlignment="Top" Text="Login :" TextWrapping="Wrap" Width="40" HorizontalAlignment="Left"/>
	<TextBlock x:Name="TextBlock_MDP" Height="16" HorizontalAlignment="Left" Margin="49,351,0,0" VerticalAlignment="Top" Width="88" Text="Mot de passe :" TextWrapping="Wrap"/>
	<TextBox x:Name="TextBox_Login" Height="24" HorizontalAlignment="Left" Margin="153,303,0,0" VerticalAlignment="Top" Width="152" Text="Login" TextWrapping="Wrap"/>
	<PasswordBox Height="24" HorizontalAlignment="Left" Margin="153,343,0,0" VerticalAlignment="Top" Width="152"/>
        
                <HyperlinkButton x:Name="link" NavigateUri="http://www.google.fr">
                    <Button Content="ClickMe" Width="25" Height="25" ></Button>
                </HyperlinkButton>
  
        </Grid>
    <!--Fin Grid Contenue-->

<!--</Grid>
         fin Grid LayoutSite -->
</Grid>
</UserControl>

Merci de votre aide par avance

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 PPPP   ZZZZZ  Y   Y  BBBB   K  K 
P P Z Y Y B B K K
PPPP Z Y BBBB KK
P Z Y B B K K
P ZZZZZ Y BBBB K K