Good evening,
This may be a bit of a noob question but how does one interact with RadDocumentPane from a main window?
Let me detail my Situation.
My main window contains a RadDockingControl. The RadDockingControl has an area for a DocumentHost.
In Code Behind I programmatically add RadDocumentPanes to the DocumentHost whenever a button is pressed.
The RadDocumentPanes being added are a modified UseControl which now inherits the RadDocumentPane.
Each RadDocumentPane hosts a Grid (actually there are nested Grids which have been cut out for this example) that contain a RadRichTextBox.
Going back to my Main Window that contains the main RadDocking control, I have a Ribbon menu containing several buttons (see the attached image).
How do I interact with the programatically added RadDocumentPanes and their respective RichTextBox's when pressing a button in the Ribbon menu?
For example, suppose that the ribbon bar contains a "Paste" button. How do I make the "Paste" command associate itself with the RichTextBox of the current DocumentPane in view?
I would attach samples of my code but it won't let me add them, only images.
Thank you for your time,
All help is appreciated.
This may be a bit of a noob question but how does one interact with RadDocumentPane from a main window?
Let me detail my Situation.
My main window contains a RadDockingControl. The RadDockingControl has an area for a DocumentHost.
<telerikDocking:RadDocking.DocumentHost> <telerikDocking:RadSplitContainer> <telerikDocking:RadPaneGroup x:Name="radDockingDocumentHost" /> </telerikDocking:RadSplitContainer></telerikDocking:RadDocking.DocumentHost>In Code Behind I programmatically add RadDocumentPanes to the DocumentHost whenever a button is pressed.
private void btnBlankNewOrder_Click(object sender, RoutedEventArgs e){ //ADD NEW DOCUMENT PANE _ RadRichTextBox var pane = new RadRichTextBoxAutoComplete(products); pane.Title = "Rob's Test Pane"; radDockingDocumentHost.Items.Add(pane);}The RadDocumentPanes being added are a modified UseControl which now inherits the RadDocumentPane.
<telerik:RadDocumentPane x:Class="TAS2.RadRichTextBoxAutoComplete" xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d">.................MY CONTROL CONTENT HERE (Cut Out for this Example) ...................</telerik:RadDocumentPane>Each RadDocumentPane hosts a Grid (actually there are nested Grids which have been cut out for this example) that contain a RadRichTextBox.
<telerik:RadDocumentPane x:Class="TAS2.RadRichTextBoxAutoComplete" ..... > <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <!-- RichTextBox --> <telerik:RadRichTextBox x:Name="radRichTextBox" AcceptsReturn="True" Width="800" Margin="10" Padding="10" Grid.Column="0" FontSize="14" IsSpellCheckingEnabled="False" DocumentInheritsDefaultStyleSettings="True" /> </Grid></telerik:RadDocumentPane>Going back to my Main Window that contains the main RadDocking control, I have a Ribbon menu containing several buttons (see the attached image).
How do I interact with the programatically added RadDocumentPanes and their respective RichTextBox's when pressing a button in the Ribbon menu?
For example, suppose that the ribbon bar contains a "Paste" button. How do I make the "Paste" command associate itself with the RichTextBox of the current DocumentPane in view?
I would attach samples of my code but it won't let me add them, only images.
Thank you for your time,
All help is appreciated.