using MECF.Framework.Common.RecipeCenter;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace CyberX8_Themes.UserControls
{
///
/// RecipeFileLoadControl.xaml 的交互逻辑
///
public partial class RecipeFileLoadControl : UserControl
{
#region 属性
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(string), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata("Recipe", FrameworkPropertyMetadataOptions.AffectsRender));
///
/// 标题
///
public string Title
{
get
{
return (string)this.GetValue(TitleProperty);
}
set
{
this.SetValue(TitleProperty, value);
}
}
public static readonly DependencyProperty RecipeLocationProperty = DependencyProperty.Register("RecipeLocation", typeof(string), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
public string RecipeLocation
{
get { return (string)this.GetValue(RecipeLocationProperty); }
set { this.SetValue(RecipeLocationProperty, value); }
}
public static readonly DependencyProperty RecipeFileNameProperty = DependencyProperty.Register("RecipeFileName", typeof(string), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
public string RecipeFileName
{
get { return (string)this.GetValue(RecipeFileNameProperty); }
set { this.SetValue(RecipeFileNameProperty, value); }
}
public static readonly DependencyProperty RecipeNodesProperty = DependencyProperty.Register("RecipeNodes", typeof(ObservableCollection),typeof(RecipeFileLoadControl));
public ObservableCollection RecipeNodes
{
get { return (ObservableCollection)this.GetValue(RecipeNodesProperty); }
set { this.SetValue(RecipeNodesProperty, value); }
}
public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("OperationCommand", typeof(ICommand), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public ICommand OperationCommand
{
get
{
return (ICommand)this.GetValue(CommandProperty);
}
set
{
this.SetValue(CommandProperty, value);
}
}
public static readonly DependencyProperty CreateCommandProperty = DependencyProperty.Register("CreateCommand", typeof(ICommand), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public ICommand CreateCommand
{
get
{
return (ICommand)this.GetValue(CreateCommandProperty);
}
set
{
this.SetValue(CreateCommandProperty, value);
}
}
public static readonly DependencyProperty EditCommandProperty = DependencyProperty.Register("EditCommand", typeof(ICommand), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public ICommand EditCommand
{
get
{
return (ICommand)this.GetValue(EditCommandProperty);
}
set
{
this.SetValue(EditCommandProperty, value);
}
}
public static readonly DependencyProperty CreateEnableProperty = DependencyProperty.Register("CreateEnable", typeof(bool), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
public bool CreateEnable
{
get
{
return (bool)this.GetValue(CreateEnableProperty);
}
set
{
this.SetValue(CreateEnableProperty, value);
}
}
public static readonly DependencyProperty EditEnableProperty = DependencyProperty.Register("EditEnable", typeof(bool), typeof(RecipeFileLoadControl),
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
public bool EditEnable
{
get
{
return (bool)this.GetValue(EditEnableProperty);
}
set
{
this.SetValue(EditEnableProperty, value);
}
}
#endregion
///
/// 构造函数
///
public RecipeFileLoadControl()
{
InitializeComponent();
}
}
}