RadMenuItem with image on top and text below

3 posts, 0 answers
  1. QuizzBox
    QuizzBox avatar
    92 posts
    Member since:
    Jan 2011

    Posted 15 Mar 2018 Link to this post

    Hello,

    Is it possible to achieve this like on the attached file ?

    Thanks in advance.

    Regards.

  2. QuizzBox
    QuizzBox avatar
    92 posts
    Member since:
    Jan 2011

    Posted 16 Mar 2018 Link to this post

    I've found it by myself,

    For those who are interested here is my code :

    static ressource

    <sys:Double x:Key="HeightAndWidth">150</s

     

    Namespace needed for the static ressource

    xmlns:sys="clr-namespace:System;assembly=mscorlib"

     

    And the radmenu itself

    <telerik:RadMenuItem DropDownPlacement="Right" Height="{StaticResource HeightAndWidth }" IconColumnWidth="{StaticResource HeightAndWidth }" >
                                    <telerik:RadMenuItem.Icon>
                                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"  >
                                            <Image DockPanel.Dock="Top"  Width="48" Height="48" Margin="0,5" Source="./Images/Import.png" HorizontalAlignment="Center"   />
                                            <TextBlock Width="{StaticResource HeightAndWidth }" DockPanel.Dock="Bottom" TextAlignment="Center" Text="Importer une compétition" TextWrapping="WrapWithOverflow" VerticalAlignment="Center" />
                                        </StackPanel>
                                    </telerik:RadMenuItem.Icon>                               
                                </telerik:RadMenuItem>
  3. Dinko
    Admin
    Dinko avatar
    872 posts

    Posted 20 Mar 2018 Link to this post

    Hello Jean-Marc,

    I am happy to hear that you manage to found a solution for your scenario. And thank you for sharing your solution with the community.

    If you have any other questions, you can open a new thread with your questions inside.

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top