8 Answers, 1 is accepted
0
Accepted
Hello Per,
Thank you for contacting us. The major benefit of TPF (Telerik Presentation Framework) is its tree of elements, which is freely modifiable by the user. So, you may get a direct access to that tree and insert a RadButtonElement:
Please, find attached a screenshot of what this code produces.
I hope this help. Please, do not hesitate to write back if you need further assistance.
All the best,
Georgi
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for contacting us. The major benefit of TPF (Telerik Presentation Framework) is its tree of elements, which is freely modifiable by the user. So, you may get a direct access to that tree and insert a RadButtonElement:
private void AddButtonToDockTabStrip(DockTabStrip strip) |
{ |
RootRadElement root = strip.RootElement; |
DockLayoutPanel buttonHolder; |
int insertIndex; |
if (strip.DockType == DockType.Document) |
{ |
buttonHolder = root.Children[0].Children[0] as DockLayoutPanel; |
insertIndex = 0; |
} |
else |
{ |
buttonHolder = root.Children[0].Children[0].Children[2] as DockLayoutPanel; |
insertIndex = buttonHolder.Children.Count - 1; |
} |
RadButtonElement el = new RadButtonElement(); |
el.Text = "MyButton"; |
DockLayoutPanel.SetDock(el, Telerik.WinControls.Layouts.Dock.Right); |
buttonHolder.Children.Insert(insertIndex, el); |
} |
Please, find attached a screenshot of what this code produces.
I hope this help. Please, do not hesitate to write back if you need further assistance.
All the best,
Georgi
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Per
Top achievements
Rank 1
answered on 06 Aug 2009, 09:44 AM
Perfect, this is just what I was looking for!
Your function takes a DockTabStrip as argument.
I'm using MDI with AutoDetectMDIChildren enabled so my RadDock is completely empty at design time.
How can I find my DockTabStrip in runtime?
(I only have one dock window)
Regards
Per
Your function takes a DockTabStrip as argument.
I'm using MDI with AutoDetectMDIChildren enabled so my RadDock is completely empty at design time.
How can I find my DockTabStrip in runtime?
(I only have one dock window)
Regards
Per
0
Hi Per,
Each DockWindow has a property DockTabStrip which gives you the current strip in which the window resides. Please, note that this property may return null if the window is not yet parented. Do not hesitate to write back if you have any other questions.
Sincerely yours,
Georgi
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Each DockWindow has a property DockTabStrip which gives you the current strip in which the window resides. Please, note that this property may return null if the window is not yet parented. Do not hesitate to write back if you have any other questions.
Sincerely yours,
Georgi
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Per
Top achievements
Rank 1
answered on 07 Aug 2009, 07:41 AM
Hi and thanks for your reply :)
I got it working using the following code
----------------------
There is probobly a better way but I just couldnt figure out how.
Anyway, it's working perfect now.
Thanks for your help!
Regards
Per
I got it working using the following code
----------------------
AddButtonToDockTabStrip
(CType
(DocumentContainer1.Controls(0), Telerik.WinControls.UI.Docking.DockTabStrip))
----------------------
There is probobly a better way but I just couldnt figure out how.
Anyway, it's working perfect now.
Thanks for your help!
Regards
Per
0

Andrew Stanford
Top achievements
Rank 1
answered on 16 Aug 2009, 11:00 AM
Hi,
Just what I was looking for, but I wonder if it is possible to perform this task in the designer?
Just what I was looking for, but I wonder if it is possible to perform this task in the designer?
0
Hi Andrew Stanford,
Currently this is not a supported feature at design-time and the given solution is only valid for run-time.
Sincerely yours,
Julian Benkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Currently this is not a supported feature at design-time and the given solution is only valid for run-time.
Sincerely yours,
Julian Benkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Andrew Stanford
Top achievements
Rank 1
answered on 18 Aug 2009, 11:23 AM
Thanks for the reply. I added the new buttons in code, but now the "docking" features seem to have been lost. i.e. if I click and drag the tool window I normally get the dock positioning indicators dosplayed and I can dock the window in a new location or make it "float".
With the buttons added at runtime I no longer have this function?
With the buttons added at runtime I no longer have this function?
0
Hi Andrew Stanford,
Please view the answer to your question in your last support ticket.
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please view the answer to your question in your last support ticket.
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.