Add fullscreen button in RadMap Navigation Bar

3 posts, 0 answers
  1. Evgenia
    Evgenia avatar
    5 posts
    Member since:
    Apr 2010

    Posted 09 Apr 2010 Link to this post


     Adiing buttons in Silverlight Bing Maps Control Navigation Bar is quite easy. But In your map control it's complicated to me. I would like to have button for toggle fullscreen. Could you please lend me a hand with this?
  2. Evgenia
    Evgenia avatar
    5 posts
    Member since:
    Apr 2010

    Posted 13 Apr 2010 Link to this post

    No ideas?
    I can add custom buton over my map but how to make it part of Rad Navigation?
  3. Giuseppe
    Giuseppe avatar
    2363 posts

    Posted 13 Apr 2010 Link to this post

    Hi evgenia,

    The current version of RadMap does not expose API that would allow you to add custom controls to the default command layout but you can achieve the desired effect by setting the RadMap.UseDefaultLayout property to false, and constructing the desired command layout like this:


    <Grid x:Name="LayoutRoot">
        <map:RadMap x:Name="RadMap1" UseDefaultLayout="False" ZoomLevel="7" />
        <Grid HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="5">
                <LinearGradientBrush x:Key="MapDefaultLayoutBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#995B5B5B" Offset="1"/>
                    <GradientStop Color="#66868686"/>
                    <GradientStop Color="#994F4F4F" Offset="0.5"/>
                    <GradientStop Color="#E50E0E0E" Offset="0.51"/>
                <LinearGradientBrush x:Key="MapDefaultLayoutBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF343434" Offset="1"/>
                    <GradientStop Color="#FF6C6C6C"/>
                <LinearGradientBrush x:Key="MapDefaultLayoutOuterBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#998C8C8C" Offset="1"/>
                    <GradientStop Color="#B2FFFFFF"/>
                <CornerRadius x:Key="MapDefaultLayoutCornerRadius">4</CornerRadius>
                <CornerRadius x:Key="MapDefaultLayoutOuterCornerRadius">3</CornerRadius>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            <Border Grid.Row="1" Grid.ColumnSpan="4"
                    BorderBrush="{StaticResource MapDefaultLayoutOuterBorderBrush}"
                    CornerRadius="{StaticResource MapDefaultLayoutOuterCornerRadius}">
                <Border Background="{StaticResource MapDefaultLayoutBackground}"
                        BorderBrush="{StaticResource MapDefaultLayoutBorderBrush}"
                        CornerRadius="{StaticResource MapDefaultLayoutCornerRadius}" />
            <maps:MapCommandBar MapControl="{Binding ElementName=RadMap1}"
                Grid.Row="1" Grid.Column="0" Margin="6,0,6,0" />
            <maps:MapNavigation MapControl="{Binding ElementName=RadMap1}"
                Grid.Column="1" Grid.RowSpan="3" />
            <maps:MapZoomBar MapControl="{Binding ElementName=RadMap1}"
                Grid.Row="1" Grid.Column="2" Margin="6,0,6,0" />
            <controls:RadButton Height="26" VerticalAlignment="Center" Content="Fullscreen"
                Grid.Row="1" Grid.Column="3" Margin="0,0,6,0" />

    Hope this helps.

    Best wishes,
    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.
Back to Top