How to get the SelectedItem of a RadDocking

4 posts, 0 answers
  1. Marcelo
    Marcelo avatar
    28 posts
    Member since:
    Jul 2010

    Posted 09 Mar 2011 Link to this post

    Hi

    First of all, I have RadSplitContainer's and RadPaneGroup's according to the user.

    I Want to get the SelectedItem of the "SelectedRadPaneGroup" (and "selectedRadSplitContainer") to put in another control...

    theres a way to do this? I'm Trying to edit the of both DataTemplate, but is not working...

    My code:

    View:

    Xaml:

    <UserControl.Resources>
            <DataTemplate x:Key="DataTemplate2">
                <telerik:RadPaneGroup SelectedItem="{Binding ControleSelecionado, Mode=TwoWay}" Background="Black" />
            </DataTemplate>
            <DataTemplate x:Key="DataTemplate1">
                <telerik:RadSplitContainer ItemTemplate="{StaticResource DataTemplate2}"/>
            </DataTemplate>
        </UserControl.Resources>

     <Grid x:Name="LayoutRoot" Background="White">
           <telerik:RadDocking x:Name="xMainDock" Visibility="Visible"
                                Grid.Row="1" Height="Auto"
                                Width="Auto" HasDocumentHost="False"
                                ItemTemplate="{StaticResource DataTemplate1}">

            </telerik:RadDocking>

        </Grid>

    .cs:

    public ViewMainPage()
            {
                StyleManager.ApplicationTheme = new Office_BlueTheme();
                InitializeComponent();

                RadSplitContainer spliter = new RadSplitContainer();
                xMainDock.Items.Add(spliter);
               
                group = new RadPaneGroup();
                spliter.Items.Add(group);
            }


    //The method that add pane's
    public void MontaGrid(Controle controle)
            {
               
                RadPane lRadPane = new RadPane();
                lRadPane.ContextMenuTemplate = (DataTemplate)this.Resources.FirstOrDefault(x => x.Key.ToString() == "templateRadPane").Value;
                lRadPane.Tag = controle;

        //--------------
        //A lot of things
        //--------------

            lRadPane.Content = painelControle;
                group.AddItem(lRadPane, DockPosition.Center);
        }



    ViewModel:

      public object ControleSelecionado { get { return _ControleSelecionado; } set { _ControleSelecionado = value; RaisePropertyChanged("ControleSelecionado"); } } object _ControleSelecionado;
           
            public VMMainPage()
            {
                domainControle = new ProwiseDomainControle();
            }
  2. George
    Admin
    George avatar
    1332 posts

    Posted 15 Mar 2011 Link to this post

    Hi Marcelo,

     
    Using the ItemTemplate of the RadDocking control is not supported. Please, refer to our online documentation to see the full list of not supported properties - http://www.telerik.com/help/silverlight/not-supported-properties.html

    Could you please give us more information what you want to achieve? I am glad to assist you further.

    Greetings,
    George
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. Marcelo
    Marcelo avatar
    28 posts
    Member since:
    Jul 2010

    Posted 15 Mar 2011 Link to this post

    Thanks for the first contact George,

    So, I have a PropertyGrid (http://slg40.codeplex.com/), that binds with a object in my ViewModel, and a RadDocking

    Inside the RadDocking has N RadSplitContainer's and N RadPaneGroup's, with N RadPanes (according to what the user wants)

    What I want, it's a way to get the RadPane, that the user is working, get Its content and "publish" in the PropertyGrid

    The best way would be a "Notified" property to bind and know when it gets a new value (to set too in the Propertygrid)

    I'm currently trying something with the RadPane.GotFocus, but isn't working well
  5. George
    Admin
    George avatar
    1332 posts

    Posted 18 Mar 2011 Link to this post

    Hi Marcelo,

    I understand you scenario. What you need is an ActivePane for the whole RadDocking control. Unfortunately, this is not implemented at this stage. We have only a RadPaneGroup.SelectedPane property. This feature (ActivePane and ActivePaneChanged event) is in our to-do list and we will try to implement it until Q2 release. 

    Greetings,
    George
    the Telerik team
Back to Top