locked
Hyperlink (MyWebTV) - 6/30/2006 9:03 AM PST RRS feed

  • Question

  • By: MyWebTV

    I recalled Unni has mentioned before to add Hyperlink into page ;

    <TextBlock>
    Click <Hyperlink NavigateUri="
    http://www.microsoft.com">here</Hyperlink>
    to navigate.
    </TextBlock>

    I have to two questions about this:
    1. How to change the "Text" such as "Click" and "here" dynamically. These
    text is not part of TextBlock.Text
    2. There is no Target attribute for the <Hyperlink> in XAML, so it alway
    open the web inside the current window.

    Thanks

    Tuesday, February 19, 2008 1:18 AM

Answers

  • By: Unni Ravindranathan (MS)

    For 1), you can do something like this:
    <TextBlock HorizontalAlignment="Left" Margin="96,60,0,0"
    VerticalAlignment="Top" Width="160" Height="50" FontSize="12">
    <Run>OuterTextBox</Run>
    <InlineUIContainer>
    <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,0"
    VerticalAlignment="Stretch" Text="TextBlock" TextWrapping="Wrap"
    FontSize="12"/>
    </InlineUIContainer>
    <Run>SampleText</Run>
    </TextBlock>

    Now in the inner TextBlock, setup the binding. We will allow you to author
    this in Expression Interactive Designer in the future if we already don't (I
    haven't checked the CTPs lately).

    For 2), look at this
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=396383&SiteID=1 Please
    feel free to follow up on this question over there.

    Thanks,
    -Unni

    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "MyWebTV" <MyWebTV@discussions.microsoft.com> wrote in message
    news:D14E61BE-BE1D-4011-809B-F01B6D529DCC@microsoft.com...
    >I recalled Unni has mentioned before to add Hyperlink into page ;
    >
    > <TextBlock>
    > Click <Hyperlink
    > NavigateUri="http://www.microsoft.com">here</Hyperlink>
    > to navigate.
    > </TextBlock>
    >
    > I have to two questions about this:
    > 1. How to change the "Text" such as "Click" and "here" dynamically. These
    > text is not part of TextBlock.Text
    > 2. There is no Target attribute for the <Hyperlink> in XAML, so it alway
    > open the web inside the current window.
    >
    > Thanks
    >
    >
    >

    Tuesday, February 19, 2008 6:55 PM

All replies

  • By: Unni Ravindranathan (MS)

    For 1), you can do something like this:
    <TextBlock HorizontalAlignment="Left" Margin="96,60,0,0"
    VerticalAlignment="Top" Width="160" Height="50" FontSize="12">
    <Run>OuterTextBox</Run>
    <InlineUIContainer>
    <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,0"
    VerticalAlignment="Stretch" Text="TextBlock" TextWrapping="Wrap"
    FontSize="12"/>
    </InlineUIContainer>
    <Run>SampleText</Run>
    </TextBlock>

    Now in the inner TextBlock, setup the binding. We will allow you to author
    this in Expression Interactive Designer in the future if we already don't (I
    haven't checked the CTPs lately).

    For 2), look at this
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=396383&SiteID=1 Please
    feel free to follow up on this question over there.

    Thanks,
    -Unni

    --
    This posting is provided "AS IS" with no warranties, and confers no rights.

    "MyWebTV" <MyWebTV@discussions.microsoft.com> wrote in message
    news:D14E61BE-BE1D-4011-809B-F01B6D529DCC@microsoft.com...
    >I recalled Unni has mentioned before to add Hyperlink into page ;
    >
    > <TextBlock>
    > Click <Hyperlink
    > NavigateUri="http://www.microsoft.com">here</Hyperlink>
    > to navigate.
    > </TextBlock>
    >
    > I have to two questions about this:
    > 1. How to change the "Text" such as "Click" and "here" dynamically. These
    > text is not part of TextBlock.Text
    > 2. There is no Target attribute for the <Hyperlink> in XAML, so it alway
    > open the web inside the current window.
    >
    > Thanks
    >
    >
    >

    Tuesday, February 19, 2008 6:55 PM
  • By: MyWebTV

    Unni,
    
    I am still not sure how you able to change the text between <run> tag. In 
    this case;  
    "OuterTextBox" and "SampleText".
    
    Thanks
      
    
    "Unni Ravindranathan (MS)" wrote:
    
    > For 1), you can do something like this:
    > <TextBlock HorizontalAlignment="Left" Margin="96,60,0,0" 
    > VerticalAlignment="Top" Width="160" Height="50" FontSize="12">
    >     <Run>OuterTextBox</Run>
    >     <InlineUIContainer>
    >       <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,0" 
    > VerticalAlignment="Stretch" Text="TextBlock" TextWrapping="Wrap" 
    > FontSize="12"/>
    >     </InlineUIContainer>
    >     <Run>SampleText</Run>
    >   </TextBlock>
    > 
    > Now in the inner TextBlock, setup the binding. We will allow you to author 
    > this in Expression Interactive Designer in the future if we already don't (I 
    > haven't checked the CTPs lately).
    > 
    > For 2), look at this 
    > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=396383&SiteID=1 Please 
    > feel free to follow up on this question over there.
    > 
    > Thanks,
    > -Unni
    > 
    > -- 
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > 
    > "MyWebTV" <MyWebTV@discussions.microsoft.com> wrote in message 
    > news:D14E61BE-BE1D-4011-809B-F01B6D529DCC@microsoft.com...
    > >I recalled Unni has mentioned before to add Hyperlink into page ;
    > >
    > > <TextBlock>
    > >     Click <Hyperlink 
    > > NavigateUri="http://www.microsoft.com">here</Hyperlink>
    > > to navigate.
    > > </TextBlock>
    > >
    > > I have to two questions about this:
    > > 1. How to change the "Text" such as "Click" and "here" dynamically. These
    > > text is not part of TextBlock.Text
    > > 2. There is no Target attribute for the <Hyperlink> in XAML, so it alway
    > > open the web inside the current window.
    > >
    > > Thanks
    > >
    > >
    > > 
    > 
    > 
    > 
    Tuesday, February 19, 2008 6:56 PM
  • By: Unni Ravindranathan (MS)

    You can have as many InlineUIContainers as you want one after the other - 
    simply add as many TextBlocks as you want to factorize your string.
    
    Thanks,
    -Unni
    
    -- 
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "MyWebTV" <MyWebTV@discussions.microsoft.com> wrote in message 
    news:FF3B29D5-1E6D-4A1E-BBD5-8D20811FD2C8@microsoft.com...
    > Unni,
    >
    > I am still not sure how you able to change the text between <run> tag. In
    > this case;
    > "OuterTextBox" and "SampleText".
    >
    > Thanks
    >
    >
    > "Unni Ravindranathan (MS)" wrote:
    >
    >> For 1), you can do something like this:
    >> <TextBlock HorizontalAlignment="Left" Margin="96,60,0,0"
    >> VerticalAlignment="Top" Width="160" Height="50" FontSize="12">
    >>     <Run>OuterTextBox</Run>
    >>     <InlineUIContainer>
    >>       <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,0"
    >> VerticalAlignment="Stretch" Text="TextBlock" TextWrapping="Wrap"
    >> FontSize="12"/>
    >>     </InlineUIContainer>
    >>     <Run>SampleText</Run>
    >>   </TextBlock>
    >>
    >> Now in the inner TextBlock, setup the binding. We will allow you to 
    >> author
    >> this in Expression Interactive Designer in the future if we already don't 
    >> (I
    >> haven't checked the CTPs lately).
    >>
    >> For 2), look at this
    >> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=396383&SiteID=1 
    >> Please
    >> feel free to follow up on this question over there.
    >>
    >> Thanks,
    >> -Unni
    >>
    >> -- 
    >> This posting is provided "AS IS" with no warranties, and confers no 
    >> rights.
    >>
    >> "MyWebTV" <MyWebTV@discussions.microsoft.com> wrote in message
    >> news:D14E61BE-BE1D-4011-809B-F01B6D529DCC@microsoft.com...
    >> >I recalled Unni has mentioned before to add Hyperlink into page ;
    >> >
    >> > <TextBlock>
    >> >     Click <Hyperlink
    >> > NavigateUri="http://www.microsoft.com">here</Hyperlink>
    >> > to navigate.
    >> > </TextBlock>
    >> >
    >> > I have to two questions about this:
    >> > 1. How to change the "Text" such as "Click" and "here" dynamically. 
    >> > These
    >> > text is not part of TextBlock.Text
    >> > 2. There is no Target attribute for the <Hyperlink> in XAML, so it 
    >> > alway
    >> > open the web inside the current window.
    >> >
    >> > Thanks
    >> >
    >> >
    >> >
    >>
    >>
    >> 
    
    
    
    Tuesday, February 19, 2008 6:56 PM