Tag: 超链接

在iTextSharp中的旋转PdfPCell中创建本地链接

我正在尝试使用iTextSharp在我的pdf中添加指向另一个页面的链接。 旋转单元格中的链接不起作用。 其他单元格按预期工作: FileStream fs = new FileStream(“TestPDF.pdf”, FileMode.Create, FileAccess.Write, FileShare.None); Document doc = new Document(); PdfWriter writer = PdfWriter.GetInstance(doc, fs); doc.Open(); PdfPTable linkTable = new PdfPTable(2); PdfPCell linkCell = new PdfPCell(); linkCell.HorizontalAlignment = Element.ALIGN_CENTER; linkCell.Rotation = 90; linkCell.FixedHeight = 70; Anchor linkAnchor = new Anchor(“Click here”); linkAnchor.Reference = “#target”; Paragraph linkPara = new Paragraph(); […]

如何通过单击HyperLink打开文件

我有这张桌子 我想点击链接,文件(无论文件)将在新的弹出窗口中打开。 这是我的代码: <asp:HyperLink ID="HyperLink4" runat="server" Text='’ NavigateUrl=’file://’> 但它不适用于NavigateUrl。 任何人都可以帮助我或任何想法如何做到这一点。 谢谢

如何在MessageBox.show中创建超链接?

我试过用这种方式在MessageBox中创建一个超链接: MessageBox.Show( “test message”, “caption”, MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 0, **”http://google.com”**, “Keyword” ); 注意:上面的代码实际上是在另一个问题https://stackoverflow.com/a/1833877/2046417中 “选择作为答案”,但我不知道为什么它不适合我。 我收到错误的关键字 ( Error 3 The * or -> operator must be applied to a pointer C:\Users\kiriti\Documents\Visual Studio 2010\Projects\TailorApplication_3\TailorApplication_3\Form1.cs 359 140 TailorApplication_3 )

如何在Silverlight中为HyperlinkBut​​ton添加下划线?

我似乎可以像格式化TextBlock一样格式化HyperlinkBut​​ton: HyperlinkButton hyperlinkButton = new HyperlinkButton(); hyperlinkButton.Content = “google”; hyperlinkButton.NavigateUri = new Uri(“http://www.google.com”); hyperlinkButton.TargetName = “blank”; hyperlinkButton.Foreground = XamlHelpers.GetColorFromHex(“555”); hyperlinkButton.TextDecoration = … //error hyperlinkButton.FontWeight = FontWeights.Bold; 但是,TextDecoration不像在TextBlock中那样工作。 我在鼠标hover时得到一个自动下划线但是希望它在鼠标hover之前也有下划线。 如何在Silverlight中为HyperlinkBut​​ton添加下划线?

如何从代码中添加样式?

我想添加一个样式A:Hover从后面的代码A:Hover到HyperLink控件。 我可以这样做: HyperLink hlRow = new HyperLink(); hlRow.Style.Add(“color”, “#000000”); hlRow.Style.Add(“text-decoration”, “none”); 但是如何为A:Hover添加样式A:Hover为超链接控件? 我是否需要定义一个类并将该类与此控件关联,如果是,如何?

使用c#创建和复制带有文本/标题的超链接到剪贴板

在各种程序中,您可以将超链接复制到剪贴板并将其粘贴到其他应用程序中。 例如,可以将本页底部的“反馈始终欢迎”链接复制并粘贴到MS Word中。 我想以编程方式创建这样的链接,将其复制到剪贴板,然后能够将其粘贴到其他位置。 例如,带有映射到stackoverflow.com的文本Stack的链接。 我用Clipboard.SetData尝试了各种各样的东西,但似乎没有什么可以做的。 (我正在使用VS2010中的Windows表单应用程序,.NET4.0)

Process.Start(链接)省略了部分链接

可能重复: 用查询字符串打开html文件 我正在使用c#编写一个简单的控制台应用程序,我正在尝试使用“name”参数打开本地html文件。 现在我正在使用const url(用于测试……):“file:/// D:/index.html?name = bob” 代码很简单: class Program { static void Main(string[] args) { string link = @”file:///D:/index.html?name=bob”; Process.Start(link); } } 但它打开浏览器的链接:“file:/// D:/index.html”。 有谁知道它为什么省略’name’参数以及如何解决它? 谢谢!

使用RichTextBox中的空格链接到File的路径?

我有VS2010,C#。 我在表单中使用RichTextBox。 我将DectectUrls属性设置为True。 我设置了LinkClicked事件。 我想打开这样的文件链接: file:// C:\ Documents and Settings …或file:// C:\ Program Files(x86)… 它不适用于带空格的路径。 源代码: rtbLog.SelectionFont = fnormal; rtbLog.AppendText(“\t. Open Path” + “file://” + PathAbsScript + “\n\n”); // DetectUrls set to true // launch any http:// or mailto: links clicked in the body of the rich text box private void rtbLog_LinkClicked(object sender, LinkClickedEventArgs e) […]

在TextBox控件中创建超链接

有没有办法在Textbox控件中创建超链接? 问题:我希望只有某些文本可以作为超链接。 例如,StackOverflow.com允许我只将此文本作为超链接。 有没有办法在C#中使用文本框进行此操作?

c#文本框中的链接

我有一个自定义的Jabber IM客户端,我遇到链接问题。 当输入http://something.com之类的内容时,我希望它在消息窗口中显示为链接。 消息窗口是标准的c#文本框。 有没有办法将其标记为链接,以便可以单击并打开网页? 谢谢