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

Issue with dropdown in RadTabcontrol

3 Answers 142 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Robs
Top achievements
Rank 1
Robs asked on 26 Sep 2011, 04:09 PM
Hi,

I'd like to know how to get rid of the space shown in the Dropdown Menu of the RadTabcontrol.

DropdownMenuSpace

i initially thought it was just a property to set to false but can't seem to find anything as such.
 
Please Download the above project and let me know how i can clear this space.

Would appreciate a speedy response (approaching the deadline).

Thanks,
Robs

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 29 Sep 2011, 03:58 PM
Hi Robs,

 Please examine the attached modified solution where I changed the default Style of the DropDownMenu and played with the "GlyphPanel" Path ( I commented it). However, I highly suggest you to use the ItemDropDownContentTemplate of the RadTabControl and define Template for the DropDownContent fo the RadTabItem. So much work in code behind is far away from a typical Silverlight Application. On the other hand, using this Template will probably solve your arrangement issue.  Please let us know if you need further assistance.

Best wishes,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Robs
Top achievements
Rank 1
answered on 04 Oct 2011, 01:18 PM
Thanks for the reply.

But unfortunately I'm facing another issue with the Tab Panel we need to change the color of it.

This is how i'm doing it.

<Style x:Key="RadTabControlStyle" TargetType="{x:Type  telerik:RadTabControl}" >
       <Setter Property="FocusVisualStyle" Value="{x:Null}" />
       <Setter Property="SnapsToDevicePixels" Value="true"/>
       <Setter Property="BorderThickness" Value="1,0,1,1"/>
       <Setter Property="DropDownButtonStyle" Value="{StaticResource DropDownHeaderTriangle}"/>
   </Style>


<Grid x:Name="LayoutRoot" Background="{StaticResource ControlPanel_Background}" >
    <telerik:RadTabControl x:Name="tabControl" >
        <telerik:RadTabControl.ItemsPanel>
            <ItemsPanelTemplate>
                <TabPanel Background="{StaticResource ControlPanel_Background}"/>
            </ItemsPanelTemplate>
        </telerik:RadTabControl.ItemsPanel>
    </telerik:RadTabControl>


Please let me know what it is that i'm doing wrong ?

I tried various stuff but nothing seems to work. The implementation is similar the the previously attached project.

Please let me know ASAP.

Thanks,
Robs
0
Tina Stancheva
Telerik team
answered on 07 Oct 2011, 10:13 AM
Hi Robs,

In order to change the indicated background color, you'll need to edit the ControlTemplate of the RadTabControl. Basically the template contains a border - HeaderBackground, that sets the background color of the upper part of the RadTabControl. However, the ItemsPanel hosting the RadTabItems doesn't take up the entire space of this upper part and this is why setting its Background won't have the effect you're looking for.

I modified the sample project to change the Background color of the HeaderBackground element of the RadTabControl.ControlTemplate. Please have a look at it and let me know if it works for you.

Also, based on your scenario we decided to add a property HeaderBackground that will allow an easier customization of the RadTabControl upper part background. You can vote for this feature here. I also updated your Telerik account as your requirements brought us to adding this new feature in the control.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TabControl
Asked by
Robs
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Robs
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or