When the view is initially loaded, the RadPanes start out open, and then immediately shut. This is visible and distracting. I really want them to just be closed from the get go.How can I make it so the RadPanes in a RadPaneGroup are initially closed (unpinned)?
How can I make it so the RadPanes in a RadPaneGroup are initially closed (unpinned)?
Code snipet:
| <radDock:RadDocking x:Name="radDocking1" Background="{StaticResource WindowBackgroundBrush}"> |
| <radDock:RadDocking.DocumentHost> |
| <!-- controls here --> |
| </radDock:RadDocking.DocumentHost> |
| <radDock:RadSplitContainer radDock:DockingPanel.InitialSize="300,300" MaxWidth="600" |
| Name="RightContainer" InitialPosition="DockedRight"> |
| <radDock:RadPaneGroup x:Name="_librariesGroup"> |
| <radDock:RadPane x:Name="_requirementsLibraryPane" Header="Requirements Library" |
| CanFloat="False" CanUserClose="False" CanUserPin="True" IsPinned="False"> |
| <my1:RequirementsLibraryDrawerControl x:Name="_requirementsLibraryDrawer" /> |
| </radDock:RadPane> |
| </radDock:RadPaneGroup> |
| </radDock:RadSplitContainer> |
| </radDock:RadDocking> |

I am trying to implement a ContextMenu for a treeview control (WPF) by using your Telerik's online tutorial. However, I often get error message as I copy & paste the tutorial code.
Here is what I have in XAML:
<telerik:RadTreeView Canvas.Left="18" Canvas.Top="136" Height="615" Name="raceTreeView" Width="311" Background="Bisque" IsLineEnabled="True">
<!-- This code segement implements a popup menu on the treeview.-->
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu ItemClick="TreeContextMenu_ItemClick">
<telerik:RadMenuItem Header="Add" />
<telerik:RadMenuItem Header="Delete" />
<telerik:RadMenuItem Header="Edit" />
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
</telerik:RadTreeView>
Here is the relevant segements in C# code-behind:
using Telerik.Windows;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;
....
private void TreeContextMenu_ItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
MenuItem item = (e.OriginalSource as RadMenuItem).DataContext as MenuItem;
switch ( item.Text )
{
case "Add":
....
case "Edit":
....
case "Delete":
....
}
}
}
I get an error message on this line : switch ( item.Text )
'System.Windows.Controls.MenuItem' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'System.Windows.Controls.MenuItem' could be found (are you missing a using directive or an assembly reference?)
How can I solve this problem?
Thanks,
Hamid
Please disregard this post. I found the error.
Thanks,
Hamid
I am in the process of evaluating Telerik controls for WPF. I started by added a RadTabControl
to my main window (window1). I then set up 3 RadTabItems by using the collection editor
under the Items property of the RadTabControl. Dragging other controls from the toolbox
over to specific RadTabItems doesn't appear to work. I manually went into the XAML code
and inserted a calendar control on RadTabItem(2), and it shows up when running the
program, it does not show when in design mode however. I'm further confused by how
you would go about adding multiple controls to a RadTabItem. I am currently using
Visual Studio 2008 Version 9.0.21022.8 .Net Framework 3.5. Here is my current
XAML code. I'm wondering if someone could give me some pointers on what I'm
doing wrong ?
<Window x:Class="Window1" Title="Window1" Height="300" Width="708" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <Grid> <telerik:RadTabControl Margin="39,51,94,45" Name="RadTabControl1" TabOrientation="Vertical" TabStripPlacement="Left"> <telerik:RadTabItem AllowDrop="True" Header="Tab1" Name="RTI1"></telerik:RadTabItem> <telerik:RadTabItem AllowDrop="True" Header="Tab2" Name="RTI2"> <telerik:RadCalendar Name="RadCalendar1" HorizontalAlignment="Left" Width="121" ClipToBounds="True" telerik:StyleManager.Theme="Metro"></telerik:RadCalendar> </telerik:RadTabItem> <telerik:RadTabItem AllowDrop="True" Header="Tab3" Name="RTI3"></telerik:RadTabItem> </telerik:RadTabControl> </Grid></Window>AddHandler _TV.PreviewMouseDown, AddressOf tv_PreviewMouseDown
Private Sub tv_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)This code works perfectly with a Righ Mouse click.
Dim s = TryCast(e.OriginalSource, UIElement)
If s Is Nothing Then Exit Sub
Dim Item = UI.Library.FindVisualParent(Of Telerik.Windows.Controls.RadTreeViewItem)(s)
If Item Is Nothing Then Exit Sub
If Item.IsSelected Then
_TV.SelectedContainer.BeginEdit()
' Item.BeginEdit
End If
End Sub
UI.Library.FindVisualParent is a small function that returns the parent of Type T of an element