Navigation :
Introduction
FAQ
Setup, deployment & projects
Getting started
Examples
Catel.Core
Catel.MVVM
Catel.Fody
Catel.ReSharper
Tips & tricks
API reference
-
Catel.Cores
--
Catel
---
Catel.Android
---
Catel.ApiCop
---
Catel.Caching
---
Catel.Collections
---
Catel.ComponentModel
---
Catel.Configuration
---
Catel.Core
---
Catel.Data
---
Catel.ExceptionHandling
---
Catel.IO
---
Catel.IoC
---
Catel.Logging
---
Catel.Messaging
---
Catel.Pooling
---
Catel.Reflection
---
Catel.Runtime
---
Catel.Scoping
---
Catel.Services
---- AccelerometerSensorListener
---- AccelerometerService
---- AccelerometerValue
---- AccelerometerValueChangedEventArgs
---- ApplicationClosingEventArgs
---- AutoCompletionService
---- CameraOperationCompletedEventArgs
---- CameraService
---- CameraServiceBase
---- CameraType
---- ContentReadyEventArgs
---- DispatcherService
---- ExportMode
---- FileServiceBase
---- FlashMode
---- IAccelerometerService
---- IAccelerometerValue
---- IAutoCompletionService
---- ICameraService
---- IDispatcherService
---- IDispatcherServiceExtensions
---- IFileSupport
---- ILanguageService
---- ILanguageSource
---- ILocation
---- ILocationService
---- IMessageService
---- INavigationRootService
---- INavigationService
---- IObjectConverterService
---- IObjectConverterServiceExtensions
---- IOpenFileService
---- IPleaseWaitService
---- IPleaseWaitServiceExtensions
---- IProcessService
---- IRollingInMemoryLogService
---- ISaveFileService
---- ISchedulerService
---- ISelectDirectoryService
---- ISensorService
---- IService
---- IStartUpInfoProvider
---- IStartUpInfoProviderExtensions
---- IState
---- IStateService
---- IStateServiceExtensions
---- IUIVisualizerService
---- IUIVisualizerServiceExtensions
---- IVibrateService
---- IViewExportService
---- IViewModelService
---- IViewModelWrapperService
---- IWrapControlService
---- LanguageResourceKey
---- LanguageResourceSource
---- LanguageService
---- LanguageServiceBase
---- Location
---- LocationChangedEventArgs
---- LocationListener
---- LocationService
---- LocationServiceBase
---- MessageButton
---- MessageImage
---- MessageResult
---- MessageService
---- NamingConvention
---- NavigationHelper
---- NavigationRootService
---- NavigationService
---- NavigationServiceBase
---- ObjectConverterService
---- OpenFileService
---- PageNotRegisteredException
---- PleaseWaitService
---- PleaseWaitWorkDelegate
---- ProcessCompletedDelegate
---- ProcessService
---- RollingInMemoryLogService
---- SaveFileService
---- SchedulerService
---- SelectDirectoryService
---- SensorServiceBase
---- ServiceBase
---- Size
---- StartUpInfoProvider
---- StateService
---- UICompletedEventArgs
---- UIVisualizerService
---- VibrateService
---- ViewExportService
---- ViewModelServiceBase
---- ViewModelWrapperService
---- ViewModelWrapperServiceBase
---- WindowNotRegisteredException
---- WrapControlService
---- WrapControlServiceControlNames
---- WrapControlServiceWrapOptions
---- WrapOptions
---
Catel.Test
---
Catel.Text
---
Catel.Threading
--- ApplicationExtensions
--- Argument
--- AsyncEventHandler
--- AsyncEventHandlerExtensions
--- ByteArrayExtensions
--- CatelEnvironment
--- CompositeFilter
--- CompositePredicate
--- CoreModule
--- DesignTimeCodeAttribute
--- DesignTimeHelper
--- DesignTimeInitializer
--- Disposable
--- DisposableToken
--- Enum
--- EnvironmentHelper
--- EventHandlerExtensions
--- ExceptionExtensions
--- ExceptionFactory
--- ExpressionHelper
--- FastDateTime
--- HashHelper
--- IBindableEnum
--- ICommandManagerExtensions
--- ICompositeFilter
--- IDisposableToken
--- IExecute
--- IExecuteWithObject
--- IFluent
--- INotifyPropertyChangedExtensions
--- IUniqueIdentifyable
--- IWeakAction
--- IWeakEventListener
--- IWeakFunc
--- IWeakReference
--- JsonExtensions
--- KnownPlatforms
--- LanguageHelper
--- MVVMModule
--- MustBeImplementedException
--- NotSupportedInPlatformException
--- ObjectHelper
--- ObjectToStringHelper
--- OpenInstanceActionHandler
--- OpenInstanceEventHandler
--- ParallelHelper
--- Platforms
--- ProcessExtensions
--- ProgressContext
--- ResourceHelper
--- SerializationJsonModule
--- StringExtensions
--- StringToObjectHelper
--- SupportedPlatforms
--- TagHelper
--- ThemeHelper
--- ThreadHelper
--- UniqueIdentifierHelper
--- UriExtensions
--- WeakAction
--- WeakActionBase
--- WeakEventListener
--- WeakFunc
--
Systems
-
Catel.MVVMs
-
Catel.Serialization.Jsons
SensorServiceBase
Name
Value
Assembly
Catel.Core
Namespace
Catel.Services
Available on
.NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public abstract class SensorServiceBase<TValueInterface, TEventArgs> : ISensorService<TValueInterface, TEventArgs>, ViewModelServiceBase where TEventArgs : EventArgs
Base types
ViewModelServiceBase
Implements interfaces
ISensorService
Base class for implementing sensor services.
Fields
Constructors
SensorServiceBase(IDispatcherService dispatcherService)
Initializes a new instance of the Missing: <see cref=“T:Catel.Services.SensorServiceBase`2” /> class.
Parameters
Name
Description
dispatcherService
The dispatcher service.
Properties
CurrentValue
Gets the current sensor value. If no value is available,null
will be returned.
This is convenience property that internally calls GetCurrentValue. Note that the services inside Catel do not support, thus you cannot subscribe to changes of this property. Instead, subscribe to the CurrentValueChanged event.
IsSupported
Gets a value indicating whether the device supports the current sensor and thus supports getting values.
TimeBetweenUpdates
Gets or sets the preferred time between updates.
Events
CurrentValueChanged
Occurs when the current sensor value has changed.
Methods
GetCurrentValue()
Gets the current sensor value.
Returns
The current sensor value. If no value is available,null
will be returned.
OnCurrentValueChanged(object sender, TEventArgs e)
Method to invoke the CurrentValueChanged event from derived classes.
Parameters
Name
Description
sender
The sender.
e
The instance containing the event data.
RaiseCurrentValueChanged(TEventArgs e)
Raises the CurrentValueChanged event.
Start()
Starts the sensor service so it’s retrieving data.
Stop()
Stops the sensor service so it’s no longer retrieving data.
Have a question about Catel? Use StackOverflow with the Catel tag!
Discussion
Please enable JavaScript to view the comments powered by Disqus.