DropDownDisplay doesn't open

11 posts, 0 answers
  1. Zarko Vorkapic
    Zarko Vorkapic avatar
    18 posts
    Member since:
    Sep 2009

    Posted 01 Dec 2009 Link to this post

    Hello I am having an issue with the DropDownDisplay. Button for drop down display is visible but when i click on it  nothing happens. It doesn't show tab items

    Also does this functionality work normal if I add tab items dynamically, because when  I insert tab items dynamically in code behind, buttons for scrolling on TabControl doesn't show so I can't see some of added items ? 

     <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="100" Height="600"
     
     
            <telerikNavigation:RadTabControl  
                                             Margin="0"  
                                             x:Name="MainTabControl" 
                                             Background="#FFEFEFEF" 
                                             DropDownDisplayMode="Visible" 
                                             DropDownDisplayMemberPath="HeaderInfo" 
                                             ScrollMode="Item" 
                                             AllTabsEqualHeight="True"
                 
                <telerikNavigation:RadTabItem Header="Tab 1" DropDownContent="Tab 1" /> 
                <telerikNavigation:RadTabItem Header="Tab 2" DropDownContent="Tab 2" /> 
                <telerikNavigation:RadTabItem Header="Tab 3" DropDownContent="Tab 3" /> 
                <telerikNavigation:RadTabItem Header="Tab 4" DropDownContent="Tab 4" /> 
                 
     
            </telerikNavigation:RadTabControl> 
             
     
        </Grid> 




  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 01 Dec 2009 Link to this post

    Hello Zarko Vorkapic,

    By design this button will  show only overflowed items. In your case there are not items that can't be displayed in the strip line - that is why you don't see any items.

    To display the button only when needed you should set:

    DropDownDisplayMode="WhenNeeded"


    If you are adding items dynamically the dropdown content will be automatically updated.

    Please let us know if you have any other questions.

    Greetings,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Zarko Vorkapic
    Zarko Vorkapic avatar
    18 posts
    Member since:
    Sep 2009

    Posted 01 Dec 2009 Link to this post

    OK, I have modified example. In xaml:

     <telerikNavigation:RadTabControl  
                                             Margin="0"  
                                             x:Name="MainTabControl" 
                                             Background="#FFEFEFEF" 
                                             DropDownDisplayMode="WhenNeeded" 
                                             ScrollMode="Viewport" 
                                             AllTabsEqualHeight="True"
                
     
            </telerikNavigation:RadTabControl> 

    and in code behind:

     public Page() 
            { 
                InitializeComponent(); 
     
                for (int i = 0; i < 30; i++) 
                { 
                    MainTabControl.Items.Add(new RadTabItem() { Header = "Tab " + i.ToString(), DropDownContent = "Tab " + i.ToString() }); 
                } 
     
     
                  
               
            } 
     

    And it still doesn't work. I have also noticed if I dynamically insert tab items out of class constructor then scroll buttons (left, right) doesn't show and I can't scroll tab items.

    Example:
    <telerikNavigation:RadTabControl  
                                             Margin="0"  
                                             x:Name="MainTabControl" 
                                             Background="#FFEFEFEF" 
                                             DropDownDisplayMode="Visible" 
                                             ScrollMode="Viewport" 
                                             AllTabsEqualHeight="True" 
                                            DropDownOpened="MainTabControl_DropDownOpened"
            </telerikNavigation:RadTabControl> 

      public Page() 
            { 
                InitializeComponent(); 
     
            } 
     
            private void MainTabControl_DropDownOpened(object sender, DropDownEventArgs e) 
            { 
                for (int i = 0; i < 30; i++) 
                { 
                    MainTabControl.Items.Add(new RadTabItem() { Header = "Tab " + i.ToString(), DropDownContent = "Tab " + i.ToString() }); 
                } 
            } 
     


  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 01 Dec 2009 Link to this post

    Hi Zarko Vorkapic,

    On a second look, I discovered that you set both a DropDownContent a a DropDownDisplayMemberPath.

    The DropDownContent specifies what should be visible in the drop down for each item.

    The DropDownDisplayMemberPath specifies which property of the header will be displayed in the DropDown. This is mostly useful when the TabControl is bound.

    In your case this property is set to "HeaderInfo" and it cannot be resolved for the current headers which are of type String in this case.

    You can remove the DropDownDisplayMemberPath proeprty and the DropDownConten will be displayed as expected.

    If you want the item header to be displayed in the DropDown, you do not need to set DropDownContent. In this case the header will be reused.

    The modified xaml is:

    <telerikNavigation:RadTabControl Margin="0" x:Name="MainTabControl" Background="#FFEFEFEF"
            DropDownDisplayMode="Visible" ScrollMode="Item">
        <telerikNavigation:RadTabItem Header="Tab 1" />
        <telerikNavigation:RadTabItem Header="Tab 2" />
        <telerikNavigation:RadTabItem Header="Tab 3" />
        <telerikNavigation:RadTabItem Header="Tab 4" />
    </telerikNavigation:RadTabControl>

    As for your second question - Could you give us more details on how to reproduce this. I tried with a simple example where the scroll buttosn appear when needed. (It is attached).

    Kind regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 01 Dec 2009 Link to this post

    Hello Zarko Vorkapic,

    We must have replied at the same time, I noticed your reply after I posted.

    I tried adding the items in the class constructor but the scroll buttons were visible for me:

    http://screencast.com/t/ZWRlYzBhND

    Are you using the 2009.3 1103 version?

    Is there something else that I am missing?

    Regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Zarko Vorkapic
    Zarko Vorkapic avatar
    18 posts
    Member since:
    Sep 2009

    Posted 01 Dec 2009 Link to this post

    When I run your example solution from attached file everything is OK but when I copy code from your example and put in my project it doesn't work. I checked everything (references, namespaces...) and it is OK but it doesn't work.

    When I double click your solution file to open in VisualStudio I get Security Warning message:

    The TabControlScrollItems project file has been customized and could present a security list by executing custom build steps when opened in Microsoft Visual Studio. 

    On More Details: An <Import> of the file "C:\Program Files\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" was found in the project file TabControlScrollItems.csproj. 

    I click OK,  build solution and it works. But again in my project it doesn't work. Do you have any idea how to fix this?



  8. Zarko Vorkapic
    Zarko Vorkapic avatar
    18 posts
    Member since:
    Sep 2009

    Posted 01 Dec 2009 Link to this post

    We are using version : 2009.3 1103
  9. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 01 Dec 2009 Link to this post

    Hi Zarko Vorkapic,

    This is a bit unexpected.

    Can you tell us the version of Silverlight you are using? I have tested this in Silverlight 3 only.

    Also could you paste the xaml around the TabControl in your project? Sometimes ScrollViewers placed in other scrollviewers or Canvas panels may not work as expected.

    Thank you,

    Best wishes,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Zarko Vorkapic
    Zarko Vorkapic avatar
    18 posts
    Member since:
    Sep 2009

    Posted 01 Dec 2009 Link to this post

    We are using Silverlight 3.0

    <UserControl x:Class="iTur4US.Page" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" 
                  xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        
     
        <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Stretch" 
                VerticalAlignment="Stretch" Width="500" Height="600"
     
            <telerikNavigation:RadTabControl x:Name="MainTabControl" Background="#FFEFEFEF" 
                    DropDownDisplayMode="Visible" ScrollMode="Item" AllTabsEqualHeight="True"
     
                <telerikNavigation:RadTabItem Header="Tab 1" /> 
                <telerikNavigation:RadTabItem Header="Tab 2" /> 
                <telerikNavigation:RadTabItem Header="Tab 3" /> 
                <telerikNavigation:RadTabItem Header="Tab 4" /> 
     
            </telerikNavigation:RadTabControl> 
     
            <Button Click="Button_Click" Content="Add Item" VerticalAlignment="Bottom" /> 
     
            </Grid> 
     
    </UserControl>  

  11. Zarko Vorkapic
    Zarko Vorkapic avatar
    18 posts
    Member since:
    Sep 2009

    Posted 01 Dec 2009 Link to this post

    I found where is the problem. When I create new project in visual studio and select "RadControlsSilverlightApplication " then it works perfectly. But when I try to include in existing normal Silverlight project then it doesn't work.

    What is the difference between those two project types? 


  12. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 04 Dec 2009 Link to this post

    Hi Zarko Vorkapic,

    Did you manage to get the DropDown working?

    This project is no different than a standard project, it just references the Telerik assemblies for you.

    Could send us one of the projects that does not work for you? You need to open a support ticket so that you can attach a file.

    Kind regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner