本文整理匯總了C#中System.Property.SetValue方法的典型用法代碼示例。如果您正苦於以下問題:C# Property.SetValue方法的具體用法?C# Property.SetValue怎麽用?C# Property.SetValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Property
的用法示例。
在下文中一共展示了Property.SetValue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Add
/// <summary>
/// Adds a new property row.
/// </summary>
/// <param name="label">Property name.</param>
/// <param name="prop">Property control.</param>
/// <param name="value">Initial value.</param>
/// <returns>Newly created row.</returns>
public PropertyRow Add(String label, Property.Control prop, String value="")
{
PropertyRow row = new PropertyRow(this, prop);
row.Dock = Pos.Top;
row.Label = label;
row.ValueChanged += OnRowValueChanged;
prop.SetValue(value, true);
m_SplitterBar.BringToFront();
return row;
}
示例2: AddCategories
private IList<string> AddCategories()
{
var categories = _Properties.GetMany<string>("CATEGORIES");
categories.Add("Work");
categories.Add("Personal");
var property = new Property();
property.Group = "CATEGORIES";
property.SetValue(new string[] { "A", "Few", "More" });
_Properties.Add(property);
return categories;
}
示例3: Read
private static void Read(XmlReader reader, Property element)
{
if (!reader.IsStartElement()) return;
if (reader.IsEmptyElement) return;
if (reader.Name != element.LocalName) return;
if (!reader.Read()) return;
string value = reader.Value;
element.SetValue(value);
reader.Read();
}