using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Windows;
namespace MysherOCRReader
{
class GetPhotoInfoRegionCollection : DependencyObject
{
//public static ObservableCollection<RegionInfo> =
public static ObservableCollection<string> GetRegionList()
{
// return GlobalHelper._uc_ImgPreview._listPhoto[nIndex].ListRegionInfo;
ObservableCollection<string> linew = new ObservableCollection<string>();
linew.Add("1");
linew.Add("2");
linew.Add("3");
return linew;
}
public string RegionType
{
get { return (string)GetValue(RegionTypeProperty); }
set { SetValue(RegionTypeProperty, value); }
}
// Using a DependencyProperty as the backing store for RegionType. This enables animation, styling, binding, etc...
public static readonly DependencyProperty RegionTypeProperty =
DependencyProperty.Register("RegionType", typeof(string), typeof(GetPhotoInfoRegionCollection), new UIPropertyMetadata("1"));
public static string strRegionType = "3";
}
}
自己定义一个依赖属性 Wpf
最新推荐文章于 2024-03-31 14:09:13 发布