Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7421293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:23:02+00:00 2026-05-29T08:23:02+00:00

Some controls in Windows Phone 7 have touchable area around, if you touch not

  • 0

Some controls in Windows Phone 7 have touchable area around, if you touch not exactly in control, but in this area, the event is still raising from the control (I don’t know how to name this area correctly, but can show it in screenshot). I have a custom slider with range selection ability, but it’s too hard to touch to the slider thumb and move it. Increasing a thumb is undesireable. How can I add touchable area to slider thumbs to ease positioning of them? Here is a XAML of slider:

<Style TargetType="local:RangeSlider">
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Black" />
    <Setter Property="Background" Value="Black" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="local:RangeSlider">
                <Border Padding="{TemplateBinding Padding}"
                        >
                    <Grid>
                        <Rectangle Fill="#FFCCCCCC" VerticalAlignment="Center" Margin="2.5,0,2.5,0" Height="12" StrokeThickness="0" />
                        <Border x:Name="SelectedRangeBorder"
                                Margin="0" Height="12">
                            <Grid>
                                <Grid.Resources>
                                    <Style x:Key="EndThumbStyle" TargetType="Thumb">
                                        <Setter Property="Background" Value="Black"/>
                                        <Setter Property="BorderThickness" Value="1"/>
                                        <Setter Property="IsTabStop" Value="False"/>
                                        <Setter Property="BorderBrush">
                                            <Setter.Value>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFCD0000" Offset="0"/>
                                                    <GradientStop Color="#FFCD0000" Offset="0.375"/>
                                                    <GradientStop Color="#FFCD0000" Offset="0.375"/>
                                                    <GradientStop Color="#FFCD0000" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Setter.Value>
                                        </Setter>
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="Thumb">
                                                    <Grid Background="Black" Width="12" Height="12" Margin="-3,-4,-5,-4">
                                                        <VisualStateManager.VisualStateGroups>
                                                            <VisualStateGroup x:Name="CommonStates">
                                                                <VisualState x:Name="Normal"/>
                                                                <VisualState x:Name="MouseOver">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </VisualState>
                                                                <VisualState x:Name="Pressed">
                                                                    <Storyboard>
                                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                            <SplineColorKeyFrame KeyTime="0" Value="Red"/>
                                                                        </ColorAnimationUsingKeyFrames>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </VisualState>
                                                                <VisualState x:Name="Disabled">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </VisualState>
                                                            </VisualStateGroup>
                                                            <VisualStateGroup x:Name="FocusStates">
                                                                <VisualState x:Name="Focused">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </VisualState>
                                                                <VisualState x:Name="Unfocused"/>
                                                            </VisualStateGroup>
                                                        </VisualStateManager.VisualStateGroups>
                                                        <Border x:Name="Background" Background="#FFCCCCCC" BorderBrush="{TemplateBinding BorderBrush}" Width="12" Height="12">
                                                            <Grid Margin="0" Width="12" Height="12" d:IsHidden="True">
                                                                <Border x:Name="BackgroundAnimation" Opacity="0" Background="Black"/>
                                                                <Rectangle x:Name="BackgroundGradient" StrokeThickness="0" Fill="Black"/>
                                                            </Grid>
                                                        </Border>
                                                        <Rectangle x:Name="DisabledVisualElement" Fill="Black" IsHitTestVisible="false" Opacity="0" Margin="0" StrokeThickness="0" Width="12" Height="12"/>
                                                        <Rectangle x:Name="FocusVisualElement" Stroke="#FFCCCCCC" StrokeThickness="0" Margin="0" IsHitTestVisible="false" Opacity="0" Width="12" Height="12"/>
                                                        <StackPanel Orientation="Horizontal" Margin="0" MaxHeight="10" Width="12" Height="12">
                                                            <Rectangle Width="12" Fill="Black" Height="12" StrokeThickness="0" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                                                            <Rectangle Fill="Black" Width="12" Margin="1,-5,0,0" Height="12" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                                                        </StackPanel>
                                                    </Grid>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Grid.Resources>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Thumb x:Name="RangeCenterThumb"
                                       Grid.Column="1"
                                       Cursor="Hand"
                                       Margin="0"
                                       BorderThickness="0" Width="Auto" Height="12" Foreground="#FFCD0000" Background="#FFCD0000"
                                       >
                                    <Thumb.Style>
                                        <Style TargetType="Thumb">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="Thumb">
                                                        <Grid Background="#FFCD0000" Height="12">
                                                            <Border BorderBrush="{TemplateBinding BorderBrush}"
                                                                BorderThickness="{TemplateBinding BorderThickness}"
                                                                Background="{TemplateBinding Background}"
                                                                />
                                                        </Grid>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </Thumb.Style>
                                </Thumb>
                                <Thumb x:Name="RangeStartThumb" 
                                       Cursor="SizeWE"
                                       Width="12"
                                       Style="{StaticResource EndThumbStyle}"
                                       BorderThickness="{TemplateBinding BorderThickness}" Height="12" Foreground="Black" Background="Black" BorderBrush="Black"
                                       />
                                <Thumb x:Name="RangeEndThumb"
                                       Grid.Column="2" 
                                       Cursor="SizeWE"
                                       Width="12"
                                       Style="{StaticResource EndThumbStyle}"
                                       BorderBrush="Black" Height="12" Foreground="Black" BorderThickness="0"
                                       />
                            </Grid>
                        </Border>
                    </Grid>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:23:03+00:00Added an answer on May 29, 2026 at 8:23 am

    There is nothing ‘magic’ about the touchable area of the various framework controls. They just have elements that occupy a reasonable amount of screen real-estate and handle touch events they they receive. You can increase your hit-test area by changing the template of your Thumb to increase its size, but only make a small portion of the template visible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some controls on the page which are Invisible on page load. But
I have a Windows Phone 7 Application. I have one stackpanel control that hosts
I have a windows phone 7 app with some xaml that looks like: <Grid
I engaged a problem with inherited Controls in Windows Forms and need some advice
Some of the controls I've created seem to default to the old Windows 95
I am trying to control some LEDs wired to the parallel port on Windows
I am using a third-party Windows Forms control that performs some actions delayed using
Some Windows applications add buttons to the control box, which apparently is the name
I'm using a winforms webbrowser control to display some content in a windows forms
I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.