I am developing a sample text box in Silverlight 4. I want to have a watermark in the textbox. I used tags but it didn't work. Please can any one help how to add a watermark to text boxes in Silver light 4.0.
You may find samples (or idea of how to implement it yourself) in the following links:
http://joyfulwpf.blogspot.com/2009/02/creating-wpf-watermarked-textbox-using.html
http://timheuer.com/blog/archive/2008/10/22/silverlight-watermark-text-box-control.aspx
Related
Is it possible to access the TextBlock Template to change the border and make it curved?
I tried editing the Template through Blend but with no success.
I'm trying to achieve something like this (couldn't get that given solution working):
Curve TextBlock in Windows 8
I'm trying to do this in C#/XAML - WINRT (Windows 8.1)
I don't think a TextBlock has a template you could modify. It's probably just some parameters used to tell DirectWrite what text to render and with what properties. The easiest way to solve it is when your text is constant to just break it apart into multiple single letter TextBlocks and lay them out on a path using Blend or Illustrator. If don't control what text can show up on the path - you'd have to code up the layout algorithm. Chris's link seems like a good place to start.
There isn't a clean way to do this directly in Xaml. Like Filip says, you can approach it by breaking the letters apart. That can work well for long sentences with small letters, but can be pretty chunky with large or connected letters. If you need smoother rendering then you can interop to Direct2D.
MSDN has a Direct2D animated text on a path sample which you could combine with the XAML SurfaceImageSource DirectX interop sample
I am using Windows application for development. In that i have functionality where there is a control in which user can type anything then edit them like bold, italic, underline, fore colour,back colour, insert image, edit size of font, change font type etc. Its like MS Word.
At present i am using RTF ( Rich text box) control for the same. but its to complex to use. Now i want other way to do that.
can any one suggest me any third party control which can full fill my requirement or any other way to do it? I am ready by third party control like MS Word functionality.
Thanks in Advance.
Try controls from http://www.devexpress.com or http://www.telerik.com
I am building a website that will make heavy use of the content editor webparts to allow for content to be added. The drawback to this is that by default the content editor provides a "Rich Text Editor" which is good for adding data but bad because it has the potential to break styling. I have two solutions :
First is to do some coding to somehow have predefined css styles added to the styles menu of the Rich text editor.
Second which should be quicker is to simply disable the Rich text editor i.e disabling the fonts, styles, etc from the Rich Text editor so that users can only enter data and not mess around with the styling.
For soultion two, is this possble and what would be the quickest way to achieve this?
Any assistance is greatly appreciated!
Thanks in advance
The whole point of the rich text editor is to allow the user to enter styled content as they see fit. If you don't want any styling to be applied through the RTE either create style rules in your CSS to overrride anything the user enters or else use content fields based on multiple lines of text rather than rich text.
Core Technology Systems has recently released a how to video on content management on SharePoint 2010. I have included a link to the website which has the link to the video and their YouTube channel.
http://coregb.com/blog/archive/2011/12/01/content-organiser-in-sharepoint2010.aspx
I want to get the height necessary to display the full text in my RichTextBox (when the text extends beyond the set height of the control).
Reminder: Silverlight has no handy TextRenderer.MeasureText like WPF does, nor any other apparent way to measure text.
Doesn't seem like there's any way to do this. I've seen mention of people measuring text of a single font (not mixed as in my RichTextBox) by creating a TextBlock and getting it's Width. Even this doesn't work - it's perfect for some fonts and inconsistent for others.
My app is occasionally connected, so I can't call the server.
As you say, I don't think there's a good way to do this in Silverlight today. There are some functions available in the Document Toolkit by First Floor Software, however those are geared towards working with XPS documents. I'm not sure what you're trying to do, however in Silverlight 5 the RichTextBox does come with the ability to "overflow" text into multiple other RichTextBoxes when the first one cannot display all of the data. This allows you to more easily create a multi-column text layout.
Document Toolkit: http://firstfloorsoftware.com/documenttoolkit
SL5 Video: http://www.silverlight.net/learn/videos/all/silverlight-5-multi-column-linked-text/
SL5 Blog Post: http://10rem.net/blog/2011/04/13/silverlight-5-advancements-in-text
My ipad application has a custom look. It uses text labels extensively for displaying partly colored/shadowed/bold texts. Larger pieces of text may contain numbered lists and embedded Images. There could be couple rich text regions on a single page.
I am not sure that UIWebView is the right tool for displaying strings like:
MyApp title
Hello rich text world
List item
List item
Writing my own text rendering engine looks more sufficient to me than using UIWebView.
Any ideas for lightweight rich text renderer ? c library or custom control ?
I would recommend using TTStyledLabel from the Three20 library. It provides the desired functionally and would save you the time of writing your own.