I am looking at the IntraTextAdornmentManager Sample, and I'm tring to make a resizable Tag - I want to add a UserControl inline as a small control and when the user drags the corner (using a Thumb) it should change its size and consequently move the text so it won't run it over...
I made the Size property in the tag as a DependencyProperty (making it a DependencyObject) and then i added binding to the code (myObj is INotifyPropertyChanged and i call PropertyChangedEventHandler with Size):
Binding myBinding = new Binding("Size");
myBinding.Source = myObj;
myBinding.Mode = BindingMode.OneWay;
BindingOperations.SetBinding(tag, IntraTextTag.SizeProperty, myBinding);
after this line runs, the program gets stuck (on the next line that ineracts with the editor).
(if it's any simpler it's supposed to take one complete line so only the height matters...)
Am i doing it wrong?
What is the proper way to make a resizable inline control?