Icon in RadPane header for office2013 (black and white changes)

3 posts, 0 answers
  1. B
    B avatar
    74 posts
    Member since:
    Jul 2011

    Posted 26 Mar 2015 Link to this post

    Hi,

    I followed the instructions here:

    http://docs.telerik.com/devtools/wpf/controls/raddocking/how-to/add-icon-pane-header

    I do see the icon in the header, but for the Office2013 template I want to change the icon to white when the pane is selected, because black on dark blue doesn't look nice (see screenshot)

    Is there a way to do that? Is there a "SelectedHeaderTemplate" that I could use to specifiy a white icon?

    Regards,

    Bayram
  2. B
    B avatar
    74 posts
    Member since:
    Jul 2011

    Posted 26 Mar 2015 in reply to B Link to this post

    I found a way to do it, by binding the image to the IsSelected of the RadPane:

    <conv:BoolToImageConverter x:Key="CockpitBoolToImageConverter"
                               FalseImage="/PowerBrowser;component/Modules/Images/OutlookBar/Cockpit.png"
                               TrueImage="/PowerBrowser;component/Modules/Images/OutlookBar/White/Cockpit.png"/>
     
     
    <DataTemplate x:Key="CockpitPaneHeaderTemplate">
        <Grid>
            <Image Source="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadPane}, Path=IsSelected,
                        Converter={StaticResource CockpitBoolToImageConverter}}"
                   Width="16"
                   Height="16"
                   x:Name="CockpitImage"
                   Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:DocumentHost},
                        Converter={StaticResource NullToVisibilityConverterInverse}}" />
            <TextBlock Text="{Binding}"
                       Visibility="{Binding ElementName=CockpitImage, Path=Visibility, Converter={StaticResource NotVisibilityConverter}}"/>
        </Grid>
    </DataTemplate>
  3. DevCraft banner
  4. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 30 Mar 2015 Link to this post

    Hello Demir,

    We are glad that you managed to achieve the desired appearance of RadDocking. If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

    Regards,
    Nasko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top