में हाइपरलिंक का उपयोग उदाहरण मैंने कई सुझाव देखे हैं, कि आप Hyperlink
नियंत्रण के माध्यम से WPF एप्लिकेशन में हाइपरलिंक जोड़ सकते हैं।WPF
यहाँ है कैसे मैं अपने कोड में इसका इस्तेमाल करने की कोशिश कर रहा हूँ:
Property 'Text' does not support values of type 'Hyperlink'.
क्या मैं गलत कर रहा हूँ:
<Window
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"
x:Class="BookmarkWizV2.InfoPanels.Windows.UrlProperties"
Title="UrlProperties" Height="754" Width="576">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Grid>
<ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.RowSpan="2">
<StackPanel >
<DockPanel LastChildFill="True" Margin="0,5">
<TextBlock Text="Url:" Margin="5"
DockPanel.Dock="Left" VerticalAlignment="Center"/>
<TextBox Width="Auto">
<Hyperlink NavigateUri="http://www.google.co.in">
Click here
</Hyperlink>
</TextBox>
</DockPanel >
</StackPanel>
</ScrollViewer>
</Grid>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="0,7,2,7" Grid.Row="1" >
<Button Margin="0,0,10,0">
<TextBlock Text="Accept" Margin="15,3" />
</Button>
<Button Margin="0,0,10,0">
<TextBlock Text="Cancel" Margin="15,3" />
</Button>
</StackPanel>
</Grid>
</Window>
मैं निम्न त्रुटि हो रही है?
नोट: '' RequestNavigateEventArgs' System.Windows.Navigation' नाम स्थान में है। – Ben
धन्यवाद, लेकिन बाध्यकारी के माध्यम से लिंक-टेक्स्ट ("इस मामले में यहां क्लिक करें) निर्दिष्ट करने का कोई तरीका है? – Agent007
बस हाइपरलिंक के अंदर एक टेक्स्टब्लॉक डालें और टेक्स्टप्रोपर्टी – KroaX