This is a migrated thread and some comments may be shown as answers.

How to get the SelectedItem of a RadDocking

3 Answers 184 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Marcelo
Top achievements
Rank 1
Marcelo asked on 09 Mar 2011, 10:25 PM
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();
        }

3 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 15 Mar 2011, 09:28 AM
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!
0
Marcelo
Top achievements
Rank 1
answered on 15 Mar 2011, 12:43 PM
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
0
George
Telerik team
answered on 18 Mar 2011, 11:54 AM
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
Tags
Docking
Asked by
Marcelo
Top achievements
Rank 1
Answers by
George
Telerik team
Marcelo
Top achievements
Rank 1
Share this question
or