private void CreaTextBox() { TextBox txtInputData = new TextBox(); //txtInputData.Visibility = Visibility.Hidden; txtInputData.Name = "TextWithUrl";
txtInputData.TextWrapping = TextWrapping.Wrap; txtInputData.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; txtInputData.AcceptsReturn = true; txtInputData.MouseLeave += new MouseEventHandler(Change_LeaveTextbox); Stack.Children.Add(txtInputData);
RichTextBox txtOutPutData = new RichTextBox(); //txtOutPutData.Visibility = Visibility.Visible; txtOutPutData.Name = "TextLinkUrl"; txtOutPutData.IsReadOnly = true; txtOutPutData.IsDocumentEnabled = true; txtOutPutData.SetValue(TextBox.TextProperty, "TextWithUrl"); //txtOutPutData.SetBinding(TextBox.TextProperty, "TextWithUrl"); txtOutPutData.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(TextLinkUrl_MouseLeftButtonDown); Stack.Children.Add(txtOutPutData); }
why the txtOutData, IS NOT BINDING????
Hi Carles,
Is this the RichTextBox .NET provided control in WPF?
Hi Matthew Kraft
SORRY,
yes, this is the RichTextBox .NET provided control in WPF?
i need in c# not in xaml
thank you very much