本文整理匯總了C#中ColumnDefinition.Property方法的典型用法代碼示例。如果您正苦於以下問題:C# ColumnDefinition.Property方法的具體用法?C# ColumnDefinition.Property怎麽用?C# ColumnDefinition.Property使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ColumnDefinition
的用法示例。
在下文中一共展示了ColumnDefinition.Property方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: will_not_write_a_null_property_because_that_wigs_out_at_runtime
public void will_not_write_a_null_property_because_that_wigs_out_at_runtime()
{
var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection);
column.Property("something", null);
// just wanna see it not blow up
writeColumn(column);
}
示例2: alteration_delegates
public void alteration_delegates()
{
var column = new ColumnDefinition<GridDefinition_selecting_editors_specs.GridDefTarget, String>(
x => x.Name, new Projection<GridDefinition_selecting_editors_specs.GridDefTarget>());
var rule = new LambdaColumnRule(a => a.PropertyType == typeof(string),
c => c.Properties["foo"] = "bar");
rule.Alter(column);
column.Property("foo").ShouldEqual("bar");
}
示例3: apply_any_rules
public void apply_any_rules()
{
var column = new ColumnDefinition<ColumnDefTarget, string>(x => x.Name, theProjection);
var column2 = new ColumnDefinition<ColumnDefTarget, bool>(x => x.IsCool, theProjection);
var grid = MockRepository.GenerateMock<IGridDefinition>();
var policies = new ColumnPolicies();
policies.If(a => a.Name == "Name").SetProperty("foo", 1).SetProperty("bar", 2);
column.SelectFormatterAndEditor(grid, policies);
column.Property("foo", 1);
column.Property("bar", 2);
column2.SelectFormatterAndEditor(grid, policies);
column2.Property("foo").ShouldBeNull();
column2.Property("bar").ShouldBeNull();
}