简体   繁体   中英

The property 'TickFrequency' was not found in type 'Slider'

I have the following XAML on Windows Phone 8:

 <Slider x:Name="slider" TickFrequency="1" SmallChange="1" LargeChange="1"  Minimum="0" Maximum="10" HorizontalAlignment="Left" Margin="26,208,0,0" VerticalAlignment="Top" Width="195" ValueChanged="Slider_ValueChanged"/>

And errors are:

1) The property 'TickFrequency' was not found in type 'Slider'

2) The property 'TickFrequency' does not exist on the type 'Slider' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.

3) The member "TickFrequency" is not recognized or is not accessible.

This sounds like you have to have TickPlacement set to something other than 'None' for the tick marks to show. Not sure if this would make that error.

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.slider.tickfrequency

The drawing of tick marks on a slider depends on both the TickFrequency and TickPlacement properties. In order for tick marks to be shown, you must set the TickFrequency property to a value greater than 0, and the TickPlacement property to a value other than None.

  xmlns:uc="clr-namespace:System.Windows.Controls"

You can try this for xamarin forms slider, for android and iOS apps. It does not require a custom renderer as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM