I have one textbox in which i just want user to do an manual entry.so i need to disable copy and as-specially paste option which is there in windows phone. is it possible to do it?
This is unfortunaly not possible.
The only solution is to create your own control, with a custom keyboard too.
Regards,
Textbox is not copy-paste-able. You can try using a ReadOnly TextBox as seen here: WP7 CopyPaste on TextBox
.
You could also put it in a WebBrowser control (provided you have enough content and are willing to suffer the display / performance )
Related
I am currently porting my application from WPF to Cross-platform. In the WPF, I used a read-only richtextbox to show the result to user in order to show both IMAGE & TEXT. In Xamarin.Forms, Is there anything similar? Thanks.
There is no control in Xamarin Forms, hence you would have to use CustomRenderers and create your own.
However I only found one decent RichTextBox implementation in
UWP RichTextBox
This means that the only way to get any decent RichTextEditor, is to use a WebView, and load a WebBased rich text editor.
But since you want it as read-only, the simplest thing to do, is to scrap the idea of any RichTextBox, and just display the text and image as separate components in your mobile app.
You can use Spans, in a label to implement formatting within the label if needed.
I found the Telerik RichTextEditor for Xamarin a much better Rich Text Editor package for Xamarin Forms after trying out and evaluating a handful of other alternatives.
This is licensed software and you have to pay for using it.
Here's the link, https://docs.telerik.com/devtools/xamarin/controls/richtexteditor/richtexteditor-overview
ScrollView can be used like readonly richtextbox. I added the elements programmatically(label for text and image). It's also read-only so it met my requirements
Syncfusion's brand-new rich text editor control for Xamarin.Forms is available now. Check out the following article for more detail.
https://www.syncfusion.com/blogs/post/introducing-xamarin-forms-rich-text-editor.aspx
How can I open the TimePicker to select new time but from C#? Not by tapping the control.
Is there any simple way to do that?
I had the same problem once. I solved it by forking the Windows Phone Toolkit and making the OpenPickerPage of the control public.
(I assume you mean the Windows Phone Toolkit TimePicker control here.)
From reading the source code of the DateTimePickerBase, it would seem not. Opening the picker page is done by the OpenPickerPage() method, which is private, and is only called from the OnDateButtonClick method, which is also private and handles the Click event on a private Button.
Of course, as the control is open-source, you can take the source code of the control and make your own copy of it with one of these methods exposed. As far as I can tell, it's allowed under the Ms-PL.
I want to custom tabcontrol in windows form like preference of Dropbox.
Please help me, thanks.
You shouldn't use winforms for this, have a look at WPF, you should be able to achieve this through creating your own style.
http://msdn.microsoft.com/en-us/library/ms754130.aspx
http://wpftutorial.net/Styles.html
You can use TabControl.ImageList property. You will be able to add images to each tab. But I'm not sure if you will be able to achieve exactly the same result as your screenshot shows. If not, and the result is not acceptable, you can use panels and picture boxes - you can hide/show each panel when user clicks appropriate picture box.
[Edit] You could also draw tabs on your own but it would require a lot of additional work.
In my wp7 app, I use C# to create user interface. I want to create a round button in C# not in xaml. is it possible to do that only in C# (not with the help of xaml) ? if yes, how to do this? and also please explain how to change a style of a button or any other control by using C# code?
Yes you can but don't know why you'd want to. Much easier to do with styles. Even easier to use one from an existing toolkit.
There is a round button in the Coding4Fun Phone Toolkit.
Get it via NuGet or download it here
How can I put a link in a C# TextBox? I have tried to put HTML tags in the box but instead of showing a link it shows the entire HTML tag. Can this be done with a TextBox?
Use the RichTextBox, no need to build your own, it cames with VS
I would try using an editable div and making it look like a text box. This would allow you to get user input and use links.
To make this easier, try JEditable.
If that is in windows forms and you really can't use the richtextbox, you can create a control with a linklabel inside of textbox.
http://www.codeproject.com/KB/miscctrl/LinkTextBox.aspx
I would think about this a little bit. If you allow executable code in an editable control, the user, the user can execute ANY code. This is generally a bad idea.
The behavior of the C# control is intentional to prevent the exact behavior that you are trying to create. A little creativity (such as parsing out links from the text box and creating a list of links next or below the text box) will provide a much safer application.
To my knowledge not with the standard textbox. You'd have to create your own. One option it the Telerik controls, they're a little pricey for individual development, but very robust and configurable.
For windows application, we can use a webbrowser control. However, for web applications Freetextbox will do the job.This is freely available dll.