Windows phone 8 如何在windows phone 8中使用双向滑块或范围滑块?
Windows phone 8如何为单滑块使用双调整控件?以下URL是iphon范围滑块示例。我想在wp8()中对此进行说明。没有用于使用滑块指定范围的内置控件。主要组件供应商也没有提供Windows phone 8 如何在windows phone 8中使用双向滑块或范围滑块?,windows-phone-8,Windows Phone 8,Windows phone 8如何为单滑块使用双调整控件?以下URL是iphon范围滑块示例。我想在wp8()中对此进行说明。没有用于使用滑块指定范围的内置控件。主要组件供应商也没有提供 但是,一个第三方控件似乎在执行您在所要执行的操作。如果要在WP8/WP7中使用,请转到“混合”,更改样式,在自定义样式中添加新矩形 <Style x:Key="CustomSlider" TargetType="Slider"> <Setter Property="Bord
但是,一个第三方控件似乎在执行您在所要执行的操作。如果要在WP8/WP7中使用,请转到“混合”,更改样式,在自定义样式中添加新矩形
<Style x:Key="CustomSlider" TargetType="Slider">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Maximum" Value="10"/>
<Setter Property="Minimum" Value="0"/>
<Setter Property="Value" Value="0"/>
<Setter Property="Background" Value="{StaticResource PhoneChromeBrush}"/>
<Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver"/>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HorizontalTrack"/>
<DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VerticalTrack"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="VerticalFill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="HorizontalTemplate" Margin="{StaticResource PhoneHorizontalMargin}">
<Rectangle x:Name="HorizontalTrack" Height="12" IsHitTestVisible="False" Margin="0,22,0,10" Fill="#FF75B3C1"/>
<Rectangle x:Name="HorizontalFill" Height="12" IsHitTestVisible="False" Margin="0,22,0,10" Fill="#FFEE887E">
<Rectangle.Clip>
<RectangleGeometry Rect="0, 0, 6, 12"/>
</Rectangle.Clip>
</Rectangle>
<Rectangle x:Name="HorizontalCenterElement" HorizontalAlignment="Left" Height="24" Margin="0,10,0,0" Width="12" Fill="#FFBAB9C3">
<Rectangle.RenderTransform>
<TranslateTransform/>
</Rectangle.RenderTransform>
</Rectangle>
<Rectangle x:Name="HorizontalCenterElement1" HorizontalAlignment="Left" Height="24" Margin="369,44,0,34" Width="12" Fill="#FFBAB9C3">
<Rectangle.RenderTransform>
<TranslateTransform/>
</Rectangle.RenderTransform>
</Rectangle>
</Grid>
<Grid x:Name="VerticalTemplate" Margin="{StaticResource PhoneVerticalMargin}">
<Rectangle x:Name="VerticalTrack" Fill="{TemplateBinding Background}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12"/>
<Rectangle x:Name="VerticalFill" Fill="{TemplateBinding Foreground}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12">
<Rectangle.Clip>
<RectangleGeometry Rect="0, 0, 12, 6"/>
</Rectangle.Clip>
</Rectangle>
<Rectangle x:Name="VerticalCenterElement" Fill="{StaticResource PhoneForegroundBrush}" Height="12" Margin="12,0,12,0" VerticalAlignment="Top" Width="24">
<Rectangle.RenderTransform>
<TranslateTransform/>
</Rectangle.RenderTransform>
</Rectangle>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
请解释您所说的“两次调整控制”(例如,使用图片或链接)是什么意思。上面提供的链接已过期。你能提供一些其他的参考或逻辑吗?你如何移动添加的元素?