• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ViewModelBase

Base class for all ViewModel classes. It provides support for property change notifications and has a DisplayName property. This class is abstract.

Inheritance
System.Object
ViewModelBase
Category
UnifiedColorViewModel
ColorViewModel
Author
MessageListItemViewModelBase
ResponseAction
SuggestedAction
DistinctValueViewModel
FilterDescriptorViewModel
FilteringViewModel
CompositeFilterViewModel
FilterViewModel
SimpleFilterViewModel
FormViewModel
PagerControlsVisibilityModel
FlagEnumEditorViewModel
PropertySetViewModel
Gallery
GalleryItem
LabelContainer.LabelContainerDataContextProxy
GraphSourceBase<TNode, TLink>
ItemViewModelBase
NavigatorItemViewModel
NavigatorViewModel
EditableObjectBase<T>
ExpressionEditorViewModel
DialogViewModel
PivotItemsFilteringControlViewModel
FieldListViewModel
FieldPayload
DropIndicationDetails
FileBrowserGridViewSelectedItemsBindingBehavior
FileSystemInfoWrapper
LayoutConfigurationModel
BookmarkItemViewModel
RadPdfViewerNavigationPaneViewModel
TabItemViewModelBase
DistinctValueViewModel
FieldFilterControlViewModel
FilterDescriptorViewModel
FilteringViewModel
GroupViewModel
SearchViewModel
OperatorValueFilterViewModel
CheckBoxSectionViewModel
DateFormatViewModel
DatePickerSectionViewModel
DropDownListsSectionViewModel
GeneralSectionViewModel
ListItemViewModel
PlainTextSectionViewModel
RepeatingSectionViewModel
SectionColumnDataViewModel
GradientsGalleryItem
ShapesGalleryItem
ShapesOutlineDashTypeViewModel
ShapesOutlineWeightViewModel
GradientDirectionGalleryItem
PresetGradientGalleryItem
SchedulerDialogViewModel
DateSpan
RecurrencePattern
SplashScreenDataContext
ChartControlViewModel
ChartTypeViewModel
MarkerInfo
OutlineInfo
SeriesViewModel
CommentControlViewModel
CommentEntryViewModel
NoteControlViewModel
StyleGalleryContentItemViewModel
HeaderFooterTemplate
CategoryModel
TaskBoardCardModel
PeriodSpan
TimeMarker
TimeRulerViewModel
DistinctValueViewModel
FilterDescriptorViewModel
FilteringViewModel
BaseKeyViewModel
DragVisualDataContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll

Syntax

public abstract class ViewModelBase : INotifyPropertyChanged, IDisposable

Constructors

ViewModelBase()

Initializes a new instance of the ViewModelBase class.

Declaration
protected ViewModelBase()

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.Boolean disposing

true to release both managed and unmanaged resources. false to release only unmanaged resources.

InvokeOnUIThread(Action)

Invokes the specified action on the UI thread.

Declaration
public static void InvokeOnUIThread(Action action)
Parameters
System.Action action

An Action to be invoked on the UI thread.

OnPropertyChanged(String)

Raises this object's PropertyChanged event.

Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
System.String propertyName

The property that has a new value.

OnPropertyChanged<T>(Expression<Func<T>>)

Raises this object's PropertyChanged event.

Declaration
protected virtual void OnPropertyChanged<T>(Expression<Func<T>> propertyExpression)
Parameters
System.Linq.Expressions.Expression<System.Func<T>> propertyExpression

A MemberExpression, containing the property that value changed.

Type Parameters
T

Remarks

Use the following syntax: this.OnPropertyChanged(() => this.MyProperty); instead of: this.OnPropertyChanged("MyProperty");.

VerifyPropertyName(String)

Warns the developer if this object does not have a public property with the specified name. This method does not exist in a Release build.

Declaration
[Conditional("DEBUG")]
protected void VerifyPropertyName(string propertyName)
Parameters
System.String propertyName

Events

PropertyChanged

Raised when a property on this object has a new value.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.