Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Buttons > Image not included in the button

Not answered Image not included in the button

Feed from this thread
  • Mayra avatar

    Posted on Oct 22, 2011 (permalink)

    Can someone please help me to understand why the image is not applied to the button?
    
    
    <DataTemplate x:Key="PaneButtonsTitleTemplate">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <ContentPresenter Content="{Binding}"
                              Margin="0,0,75,0" />
                    <StackPanel Grid.Column="1"
                                HorizontalAlignment="Right"
                                Orientation="Horizontal" >
                        <telerik:RadButton Background="{StaticResource FillColor}"
                                           Foreground="{StaticResource TextColor}"                                      
                                           Command="telerik:RadDockingCommands.Floating"
                                           Width="50"
                                           Height="20"
                                           ToolTipService.ToolTip="Pop-out" >
                            <StackPanel Orientation="Horizontal" >
                                <TextBlock Foreground="{StaticResource TextColor}">
                                    Pop-out
                                </TextBlock>
                                <Image Source="Icons/popout.png" Height="15"/>
                            </StackPanel>
                        </telerik:RadButton>
                        <telerik:RadButton Width="20" Height="50">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Margin="11">Button</TextBlock>
                                <Image Source="Icons/strawberry.png" Height="20"></Image>
                            </StackPanel>
                        </telerik:RadButton>
                    </StackPanel>             
                </Grid>
            </DataTemplate>

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Oct 26, 2011 (permalink)

    Hello Mayra,

     We managed to reproduce this issue. It appears that the width of the first RadButton (50) is not enough and there is no space left for the Image on the right of the "Pop-out" TextBlock. Changing the width to 70-80 solved this. Please let us know if this helps you.

    Greetings,
    Petar Mladenov
    the Telerik team

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

    Reply

  • Mayra avatar

    Posted on Oct 26, 2011 (permalink)

    Thanks a lot for the reply.
    Here are some of the things I have also change and still have not been able to see the picture:
    - I have set the with and height to 100 
    - I have change and use other picture
    - I have removed the text

    I an not sure what can be causing the issue. I look forward to hear from you.

    Regards,

    Mayra 

    Reply

  • Zarko Zarko admin's avatar

    Posted on Oct 31, 2011 (permalink)

    Hello Mayra,
    I've created a sample project using your code snippets and when I changed the width of the buttons to 100px everything seemed to work fine - the images are visible. Could you please examine the attached project and see if it helps you to fix your problem and also you may want to check if your image paths are correct.
    If you have more questions feel free to ask.

    Kind regards,
    Zarko
    the Telerik team

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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Buttons > Image not included in the button