#region Copyright Syncfusion Inc. 2001-2024.
// Copyright Syncfusion Inc. 2001-2024. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using syncfusion.demoscommon.wpf;
using Syncfusion.Windows.Edit;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
namespace syncfusion.syntaxeditordemos.wpf
{
///
/// Represents the view model class for edit control
///
public class CSharpEditorViewModel:NotificationObject
{
///
/// Maintains the document source of the edit control
///
private string documentSource;
///
/// Maintains the language of the content in edit control
///
private Languages language;
///
/// Maintains the font family of the edit control
///
private FontFamily selectedFont;
///
/// Initializes the instance of class
///
public CSharpEditorViewModel()
{
Language = Languages.CSharp;
DocumentSource = @"Data\syntaxeditor\CSharpEditorSource.cs";
SelectedFont = new FontFamily("Verdana");
}
///
/// Gets or sets the font family of the edit contro;
///
public FontFamily SelectedFont
{
get
{
return selectedFont;
}
set
{
selectedFont = value;
RaisePropertyChanged("SelectedFont");
}
}
///
/// Gets or sets the Language of teh content in edit control
///
public Languages Language
{
get
{
return language;
}
set
{
language = value;
RaisePropertyChanged("Language");
}
}
///
/// Gets or sets the document source of the edit control
///
public string DocumentSource
{
get
{
return documentSource;
}
set
{
documentSource = value;
RaisePropertyChanged("DocumentSource");
}
}
}
}