Converting Telerik DockingManager to RadDock - winforms

DockingManager control has been removed from their suite in Q1 2011, so now I am looking to replace it with their new control called RadDock. I followed update notes here (section "Updating your project") but after completing the conversion I am left with a new blank RadDock object and the original DockingManager object (together with the elements it contained) stuck in behind of it.
I've then tried dragging different elements onto the new RadDock, but none of them will dock.
Has anyone else had similar issues while upgrading this control?

I have tested this scenario and on my the the DockingManager is successfully converted to RadDock and the content of the windows is right in place.

Telerik support sent me a video step by step explaining how to do the conversion. Not sure how long the link will work, but HERE it is.

Related

Visual Studio breaks Visual Inheritance

I have made a FormBase, from which I inherit a FomBaseList and a FormBaseDetail.
All other forms in the project are derived from FormBaseList or FormBaseDetail.
Now it seems that VS has huge problems with that, and my biggest problem is that VS keeps writing property values from the Ancestor form into the designer.cs from the child form.
for example, in FormBaseList I have this property/value :
this.gttDXGridView1.OptionsView.ShowAutoFilterRow = true;
I expect that in a derived form, for example FormClientList, there is no mention for this value in the designer.cs, because it should fetch the value from its parent. In other words, just plain simple basic OOP.
And I also expect that when I change the property in FormClientList to
this.gttDXGridView1.OptionsView.ShowAutoFilterRow = false;
that this is seen as an override from the baseclass.
However, VS keeps overwriting the property in FormClientList.Designer.cs with the value found in FormBaseList.Designer.cs.
This breaks the rules of OOP in my opinion, other tools that support Visual Inheritance like Delphi for example do this correct.
How can I stop VS from doing this ?
The properties are changed using the designer.
All controls are DevExpress controls, or derived from a DevExpress control.
Another example, which works just opposite so its very strange.
For example put a Button on the BaseForm and give it an image.
The button with the image appears on all derived forms.
Now change the image on the button of the BaseForm.
You would expect the image to change on all derived forms also, but that does not happen.
I discovered that again VS has written the property value of the button in all derived designer.cs files, and this time it does not overwrites them.
I created a ticket about this at the DevExpress forum, and they where able to reproduce it.
It is now passed on to their developers.
https://www.devexpress.com/Support/Center/Question/Details/T692940/devexpress-controls-break-visual-inheritance-in-visual-studio
It also seems I was not the first to report a similar problem.
https://www.devexpress.com/Support/Center/Question/Details/T692244/imageoptions-are-serialized-in-a-successor-when-visual-inheritance-is-in-effect

FixedPage and Grid.IsSharedSizeScope

I am trying to save an WPF UI to an XPS file stream.
Everything works as it should but there is one problem with Grid that use Grid.IsSharedSizeScope. Although when WPF UI rendered the column sizing is honored it is ignored when the UI saved to XPS so there is no equal column sizing.
Does anybody know why this could be happening and if there is a workaround ?
I wrote an application that generates various printed reports, which involves programmatically creating XAML controls and adding them to a FlowDocument. I remember hitting an issue where "Auto" widths are ignored, so had to use numeric or "star" values. Rendering the exact same XAML "to screen" worked fine.
Perhaps your shared size scope problem is related to the same problem. I remember reading about this "known issue" way back when I wrote this stuff, but don't have a link sorry.
I've just looked at my reporting code and didn't find anywhere that I've used shared size scopes (which is odd given their tabular nature), so perhaps I hit the same issue at the time.

ToolStripTextBox, ToolStripComboBox not automated

In UI Automation, when automating the toolstrip items we are facing an issue which is described below
I am adding toolstrip items as follows
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripButton2,
this.toolStripComboBox1,
this.toolStripButton3});
When running the UI Automation(System.Windows.Automation), UI automation finds the controls till toolStripButton2 (i.e) controls on the left side of toolstripcombobox is getting recognized but on the controls on the right side.(If i make the combobox to go the right most control everything works fine)
Note: In Inspect.exe tool from windows kits, all the controls are shown but when trying to access the last toolStripButton3 returns null.
Here i have attached the simplified code, the buttonCollection is expected to get 3 buttons but it gets only two in my case.
AutomationElement toolstrip = viewTab.FindFirst(TreeScope.Children,
new PropertyCondition(AutomationElement.AutomationIdProperty, "toolStrip1"));
AutomationElementCollection buttonCollection = toolstrip.FindAll(TreeScope.Children,
new PropertyCondition(AutomationElement.LocalizedControlTypeProperty, "button"));
Both ToolStripTextBox and ToolStripComboBox are showing the same behavior.
I would like know what is going wrong my approach.
I've posted one approach which would allow you to access all the buttons, in response to your question at https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/2363de9f-3bf0-48dc-a914-1eef5bcf1482/toolstriptextbox-toolstripcombobox-not-automated?forum=windowsaccessibilityandautomation.
Thanks,
Guy

How do you load and save content from a Silverlight 4 RichTextBox control?

I've been reviewing the features of the RichTextBox control in Silverlight 4.
What I've yet to find is any examples of Loading and Saving content in the RichTextBox.
Anyone come across any or can shed some light on it?
The control has a BlocksCollection in which I guess one could use the XamlReader to load a bunch of markup assuming that markup has a single top level node of type Block. Then add that block to the Blocks collection. Seems a shame that the RichTextBox bothers to have a "collection" in this case, why not simply a top-level Block item?
Never-the-less that still leaves saving the content of a RichTextBox, I have no idea where to begin with that one?
I'm sure I must be missing the obvious here but unless loading and saving data in to and from RichTextBox is at least possible if not easy I can't see how we can actually put it to use.
Edit
Thanks to DaveB's answer I found discussion of something called the DocumentPersister. However no reference to this class can be found in the MSDN documentation nor can I find it in the installed dlls via object browser search. Anyone, anyone at all?
Check out this tutorial
on the RichTextArea control. Persisting content is described in exercise 2, task 3. The code for the tutorial includes a helper class.
Edit:
The question was raised about the DocumentPersister class referenced in the tutorial. It is found in the source code download for the tutorial. I think the author created it. By looking at the code you will get an idea as to persisting your data. The only downside was that if your data contained images, the helper class did not support them. Here is the link to the download.
http://ecn.channel9.msdn.com/o9/learn/Silverlight4/Labs/TextEditor/Source.zip
Just to update the link in the accepted answer, it's moved to here:
http://channel9.msdn.com/learn/courses/Silverlight4/NewFeatures/RichTextBox/Introduction/
Be wary of investing too much in the Silverlight 4 RichTextArea until it's confirmed that it will support full RichEdit functionality like bullet points/lists etc which it currently does in SL Beta 1... although I'm sure it will in RTM?
I have a sample from Microsoft to persist the contents which I have to find which I will do tomorrow. I got this sample in october when beta 4 was not even announces due to which there were no tutorials available. Since that project I have not worked on silverlight so I don't know how many tutorials are available now.
ok I have found it. Where should I upload it?
One option for loading text into RichTextBox is to use XamlReader. Dependent on the text which you are planning to load, you might need to add tag around it
public class TextToXamlConverter
{
private const String ParaHead = "<Paragraph xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">";
private const String ParaTail = "</Paragraph>";
static public Paragraph Convert(string text)
{
String formattedText = ParaHead + text + ParaTail;
Paragraph p = (Paragraph)XamlReader.Load(formattedText);
return p;
}
}

tcl/tk widget combobox loses focus

The tcl/tk widget iwidgets::combobox with a terrible flaw: when the list goes away, the focus goes away from the gui so you can't type in entry boxes unless you move the mouse out of the gui and back in.
This problem has been noted in other places, but I have not seen any solution.
a. is there a way to re-gain focus before exiting the command (-command option)?
b. is there a better combobox widget available? I have tried BWidgets' ComboBox but can't get that to work.... I don't want to have to build my own.
As of Tcl/Tk 8.5, there is a combobox widget built into the core language as part of the Tile set of widgets. The command is ttk::combobox. You can download a prebuilt version of Tcl/Tk from ActiveState, at:
http://www.activestate.com/activetcl/
For more information, see the documentation here:
http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/ttk_combobox.htm
HTH,
Eric Melski

Resources