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

Hiding Icons, but show a full width seperator

2 Answers 158 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Chris Andrews
Top achievements
Rank 1
Chris Andrews asked on 24 Aug 2010, 06:17 PM
Hello All,

We have a RadMenu which we do not need or want icons on.  I successfully set the IconColumnWidth="0" and this hides the icon column just fine.  However, the <telerik:RadMenuItem IsSeparator="True" /> menu item doesn't seem to respect this.  The separator bar is moved over to the right for the width of the icon column used to be.

Not sure if this is a bug, working as designed, or there is a workaround for this.  Has anyone else run across this behavior?

2 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 25 Aug 2010, 09:45 AM
Hello Chris Andrews,

Thank you for your feedback.

Indeed, there is such a bug. It is easily fixable. Please, follow the two steps below:

1. You need the styles for RadMenu. If you are using a custom theme, edit the theme itself. If not, you will need to generate the RadMenu styles from Expression Blend. You can do that by going to Object> Edit Template > Edit a Copy with the RadMenu control selected.

2. Find the following ControlTemplate:

<ControlTemplate TargetType="telerikNavigation:RadMenuItem" x:Key="SeparatorTemplate">
           <Grid Height="2" Margin="{StaticResource MenuItemSeparatorMargin}">
               <Rectangle Height="1" VerticalAlignment="Top"
                   Fill="{StaticResource MenuItemSeparatorTop}" />
               <Rectangle Height="1" VerticalAlignment="Bottom"
                   Fill="{StaticResource MenuItemSeparatorBottom}" />
           </Grid>
       </ControlTemplate>

And replace it with this:

<ControlTemplate TargetType="telerikNavigation:RadMenuItem" x:Key="SeparatorTemplate">
            <Grid Margin="2">
                <Grid Height="2" Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Menu.IconColumnWidth}">
                    <Rectangle Height="1" VerticalAlignment="Top"
                        Fill="{StaticResource MenuItemSeparatorTop}" />
                    <Rectangle Height="1" VerticalAlignment="Bottom"
                        Fill="{StaticResource MenuItemSeparatorBottom}" />
                </Grid>
            </Grid>            
        </ControlTemplate>

Again, thank you for reporting this. Since your feedback is precious to us, I have updated your Telerik points accordingly.

Please, feel free to contact us again in case you need further help.

Sincerely yours,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Dani
Telerik team
answered on 25 Aug 2010, 09:48 AM
Hello Chris Andrews,

In addition to my previous post, I would like to let you know that this bug will be fixed in the next Latest Internal Build. Once this is done, you can also remove the fix I suggested, since it will not be needed anymore.


Greetings,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Menu
Asked by
Chris Andrews
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or