I have gotten code from this thread previously that showed me how to add transparency to the back ground. Which did work, however it only works for a rich text editor that was already created and placed on my window. If I try to add the background color (with a lower then 255 alpha value) at the same time which I create the XamRichTextEditor the background color does not show up transparent, in fact it just stays white.
Regards,
Aaron
Hello Aaron,
Thank you for your post!
I have been looking into your issue. I have created a small sample application in order to test the functionality you have reported and I was not able to reproduce it.
In the sample application I have been testing with I have a button. When the user clicks it a XamRichTextEditor is added to the Window and the background is being set.
I am attaching the above mentioned sample application. Would you please modify it with the functionality you are using, so the issue is reproducible? This way I would be able to further investigate this for you.
Looking forward to hearing from you.
That does work for solid colors yes. however my issue is specifically if the color has transparency in it. Meaning the alpha channel of the ARGB that the color is formed from cannot be 255.
Something like this is what I want to do at start up.
xamRichTextEditor1.Document.RootNode.Settings = new DocumentSettings() { Background = new ColorInfo(/*Colors.Yellow*/Color.FromArgb(100,100,100,100) )};
Thank you for the provided information.
I have modified the sample application with the code snippet, that you have provided.
Using the code xamRichTextEditor1.Document.RootNode.Settings = new DocumentSettings() { Background = new ColorInfo(Color.FromArgb(100,100,100,100)) }; would rise an exception. After further research in our source it seems, that the control is designed to not accept a ColorInfo with value for the Alpha less than 255 through the settings of the Document.
What I can suggest is to create a style for the LayoutTransformer and handle the Loaded event of this element. Then in the handler the Utilities class can be used, in order to find visual elements. Using this class you have to find the XamRichTextEditor, RichDocumentViewPresenter, Grid(TextAreaHostGrid) and the RichDocumentViewTextArea and set their background properties to Transparent.
If you would like to be able to set the a value with Alpha less than 255, through the DocumentSettings you can submit a new Product Idea on our site: http://ideas.infragistics.com.
Steps to create your idea:
1. Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
• Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
• [CASE: “Reference case [case number], FORUMS: “Include a link to this thread”] in your idea so product management will be able to look back at this case.
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.