Questions tagged [inlineuicontainer]
17 questions
7
votes
1 answer
How can I copy WPF FlowDocument InlineUIContainer contents?
I have a WPF FlowDocument that has a few InlineUIContainers, these are simple InlineUIContainers, that contain a styled button with some text in the Button.Content. When I copy the text and InlineUIContainer containing the button from the…

Luke
- 6,195
- 11
- 57
- 85
6
votes
1 answer
WPF. How to align text in InlineUIContainer content with outer text in RichTextBox
The task: Make the text content of the InlineUIContainer to be inline with the outer text
The standard behaviour of the InlineUIContainer content is when the bottom edge is inline with the outer text.
It is possible to shift the content of…

Vadim Loboda
- 2,431
- 27
- 44
3
votes
2 answers
Silverlight. How to align text in InlineUIContainer content with outer text in RichTextBox
The task: Make the text content of the InlineUIContainer to be inline with the outer text.
The standard behaviour of the InlineUIContainer content is when the bottom edge is inline with the outer text.
It is possible to shift the position of…

Vadim Loboda
- 2,431
- 27
- 44
3
votes
0 answers
Receiving EditingCommands on derived InlineUIContainer
I have a class that derives from InlineUIContainer. I want to take an action when an editing command (like ToggleBold) is performed on a FlowDocument selection that includes an instance of this class. I've tried registering for this command but it…

dmo
- 3,993
- 6
- 35
- 39
2
votes
2 answers
Silverlight InlineCollection.Add(InlineUIContainer) missing?
I'm having difficulty adding the inline of specific type InlineUIContainer into the InlineCollection (Content property) of a TextBlock. It appears the .Add() method of InlineCollection doesn't accept this type, however you can clearly set it through…

Sprague
- 1,610
- 10
- 22
2
votes
3 answers
How to detach from the Visual Tree in WPF
I'm trying to correctly remove a UIElement from an InlineUIContainer in order to use it in another Panel but the program keeps crashing with this message "Specified Visual is already a child of another Visual or the root of a CompositionTarget.".…

Prince Owen
- 1,225
- 12
- 20
1
vote
1 answer
Prevent delete/backspace of InlineUIContainers in RichTextBox (WPF)
I have a RichTextBox that allows the user to type and edit and insert some complex UIElements that are wrapped in InlineUIContainer. The problem is when the user tries to delete/backspace one of the InlineUIContainers. I would like to disable…

rulestein
- 409
- 3
- 12
1
vote
1 answer
Removing InlineUIContainer from WPF RichTextBox
I have an RTB with InlineUIContainer's. I store them in a List, so I can access them directly. How can I remove them from my RTB in C#?
Code example:
// for some TextPointer textPointer in my RTB
TextBlock tb = new TextBlock();
tb.Text = "hello…

JessMcintosh
- 460
- 2
- 6
- 21
1
vote
0 answers
WPF richtexbox inlineuicontainer disappears when moving
In my WPF application, I have a RichTextBox. I can add a simple control such as TextBlock using this code:
TextPointer tp = myRichTextBox.CaretPosition.GetInsertionPosition(LogicalDirection.Forward);
InlineUIContainer myInlineUIContainer = new…

David
- 261
- 1
- 17
0
votes
2 answers
Set size of InlineUIContainer?
I wrapped a TextBlock in an InlineUIContainer inside a RichTextBox, its content is bound to an external multi-line TextBox that the user updates on the spot.
What happens is the InlineUIContainer's size doesn't expand or shrink as needed, it's a…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632
0
votes
1 answer
System.StackOverflowException on InlineUIContainer deletion
So, I have a RichTextBox which can contain one or more InlineUIContainer containing a small UserControl.
When one of them is deleted, a StackOverflowException is directly thrown (none of my code run between the Backspace press and the…

Simon Dubois
- 39
- 3
0
votes
1 answer
Need suggestions for work around for programming error "Cannot serialize non-public type MS.Internal.NamedObject"?
Error occurs saving wpf RichtextBox contents; and also on line to remove the InlineUIContainer containing the button before recreating with new content. The save action works fine so long as the content of a button has not been modified. The line…

user3501495
- 23
- 5
0
votes
1 answer
InlineUIElement not respecting clipping area of TextBlock
I have a TextBlock that contains some text in some Run elements, and which is set to CharacterEllipsis textclipping mode. However I also have a few InlineUIElements that contains some custom buttons.
The problem is the buttons are showing up outside…

devios1
- 36,899
- 45
- 162
- 260
0
votes
2 answers
InlineUIContainer delete event in RichTextBox
Is there a way, to get notified when an InlineUIContainer gets deleted in a RichTextBox? Currently I am using the Unload event, which is a problem because the event is also called when I switch between tabs.
My code:
Creating the…

BendEg
- 20,098
- 17
- 57
- 131
0
votes
1 answer
Problem with InlineUIContainer
I have an Windows.Documents.InlineUIContainerin a RichTextBox, and sometimes it's font size of alignment change when I hit key combination such as Ctrl+Space. I couldn't find any place to handle these events and block them somehow. I don't want to…

paradisonoir
- 2,892
- 9
- 30
- 41