本文整理汇总了C#中AttributeTableBuilder.AddCustomAttributes方法的典型用法代码示例。如果您正苦于以下问题:C# AttributeTableBuilder.AddCustomAttributes方法的具体用法?C# AttributeTableBuilder.AddCustomAttributes怎么用?C# AttributeTableBuilder.AddCustomAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttributeTableBuilder
的用法示例。
在下文中一共展示了AttributeTableBuilder.AddCustomAttributes方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddAttributes
/// <summary>
/// Add design time attributes.
/// </summary>
/// <param name="builder">The assembly attribute table builder.</param>
private static void AddAttributes(AttributeTableBuilder builder)
{
builder.AddCustomAttributes(
typeof(SignInButton),
new Attribute[] {
new DefaultPropertyAttribute("ClientId"),
new DefaultEventAttribute("SessionChanged"),
new ToolboxBrowsableAttribute(true),
new ToolboxCategoryAttribute(LiveServicesCategory),
new ToolboxTabNameAttribute(LiveServicesCategory)});
EditorBrowsableAttribute browsableAlways = new EditorBrowsableAttribute(EditorBrowsableState.Always);
CategoryAttribute categoryLive = new CategoryAttribute(LiveServicesCategory);
DescriptionAttribute description = new DescriptionAttribute(StringResources.DescriptionBrandingType);
builder.AddCustomAttributes(
typeof(SignInButton),
"Branding",
new Attribute[] { browsableAlways, categoryLive, description });
description = new DescriptionAttribute(StringResources.DescriptionClientId);
builder.AddCustomAttributes(
typeof(SignInButton),
"ClientId",
new Attribute[] { browsableAlways, categoryLive, description });
description = new DescriptionAttribute(StringResources.DescriptionRedirectUri);
builder.AddCustomAttributes(
typeof(SignInButton),
"RedirectUri",
new Attribute[] { browsableAlways, categoryLive, description });
description = new DescriptionAttribute(StringResources.DescriptionScopes);
DefaultValueAttribute defaultValue = new DefaultValueAttribute("wl.signin");
builder.AddCustomAttributes(
typeof(SignInButton),
"Scopes",
new Attribute[] { browsableAlways, categoryLive, description, defaultValue });
description = new DescriptionAttribute(StringResources.DescriptionTextType);
builder.AddCustomAttributes(
typeof(SignInButton),
"TextType",
new Attribute[] { browsableAlways, categoryLive, description });
description = new DescriptionAttribute(StringResources.DescriptionSigninText);
builder.AddCustomAttributes(
typeof(SignInButton),
"SignInText",
new Attribute[] { browsableAlways, categoryLive, description });
description = new DescriptionAttribute(StringResources.DescriptionSignoutText);
builder.AddCustomAttributes(
typeof(SignInButton),
"SignOutText",
new Attribute[] { browsableAlways, categoryLive, description });
}
示例2: AddToolboxBrowsableAttributes
private void AddToolboxBrowsableAttributes()
{
var builder = new AttributeTableBuilder();
builder.AddCustomAttributes(typeof(FXMonthViewButton), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(FXMonthViewContainer), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(FXMonthViewHeader), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(FXMonthViewItem), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(FXMonthViewWeekDayHeaderCell), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(FXPopup), ToolboxBrowsableAttribute.No);
MetadataStore.AddAttributeTable(builder.CreateTable());
}
示例3: AddMonthViewDesigners
private void AddMonthViewDesigners()
{
var builder = new AttributeTableBuilder();
builder.AddCustomAttributes(typeof (FXMonthView), new FeatureAttribute(typeof (MonthViewDesignAdorner)));
MetadataStore.AddAttributeTable(builder.CreateTable());
}
示例4: Register
public void Register()
{
AttributeTableBuilder tableBuilder = new AttributeTableBuilder();
tableBuilder.AddCustomAttributes(typeof(PieChart), new FeatureAttribute(typeof(PieChartDesignModeValueProvider)));
MetadataStore.AddAttributeTable(tableBuilder.CreateTable());
}
示例5: VectorMetadata
public VectorMetadata()
{
var builder = new AttributeTableBuilder();
builder.AddCustomAttributes(typeof (Node),
"Position",
PropertyValueEditor.CreateEditorAttribute(typeof (VectorEditor)),
new AlternateContentPropertyAttribute()
);
AttributeTable = builder.CreateTable();
}
示例6: AddPropertyAttributes
private static void AddPropertyAttributes(AttributeTableBuilder builder)
{
/// SerialChart
builder.AddCustomAttributes(typeof(SerialChart), "Graphs",
new CategoryAttribute("Graphs"));
builder.AddCustomAttributes(typeof(SerialChart), "DataSource",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(SerialChart), "CategoryValuePath",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(SerialChart), "ValueFormatString",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(SerialChart), "PresetBrushes",
new CategoryAttribute("Brushes"));
builder.AddCustomAttributes(typeof(SerialChart), "PlotAreaBackground",
new CategoryAttribute("Brushes"));
builder.AddCustomAttributes(typeof(SerialChart), "AxisForeground",
new CategoryAttribute("Brushes"));
builder.AddCustomAttributes(typeof(SerialChart), "MinimumValueGridStep",
new CategoryAttribute("Grid"));
builder.AddCustomAttributes(typeof(SerialChart), "MinimumCategoryGridStep",
new CategoryAttribute("Grid"));
builder.AddCustomAttributes(typeof(SerialChart), "LegendVisibility",
new CategoryAttribute("Appearance"));
/// SerialGraph
builder.AddCustomAttributes(typeof(SerialGraph), "ValueMemberPath",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(SerialGraph), "Title",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(SerialGraph), "Brush",
new CategoryAttribute("Brushes"));
/// LineGraph
builder.AddCustomAttributes(typeof(LineGraph), "StrokeThickness",
new CategoryAttribute("Appearance"));
/// ColumnGraph
builder.AddCustomAttributes(typeof(ColumnGraph), "ColumnWidthAllocation",
new CategoryAttribute("Appearance"));
/// Pie Chart
builder.AddCustomAttributes(typeof(PieChart), "DataSource",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(PieChart), "TitleMemberPath",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(PieChart), "ValueMemberPath",
new CategoryAttribute("Data"));
builder.AddCustomAttributes(typeof(PieChart), "LegendVisibility",
new CategoryAttribute("Appearance"));
}
示例7: AddToolboxBrowsableFalseAttributes
private static void AddToolboxBrowsableFalseAttributes(AttributeTableBuilder builder)
{
builder.AddCustomAttributes(
typeof(SerialGraph),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(LineGraph),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(ColumnGraph),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(AreaGraph),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(CategoryAxis),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(ValueAxis),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(ValueGrid),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(Indicator),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(Legend),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(Slice),
new ToolboxBrowsableAttribute(false)
);
builder.AddCustomAttributes(
typeof(Balloon),
new ToolboxBrowsableAttribute(false)
);
}
示例8: AddDefaultPropertyAttributes
private static void AddDefaultPropertyAttributes(AttributeTableBuilder builder)
{
#if !SILVERLIGHT
builder.AddCustomAttributes(
typeof(SerialChart),
new DefaultPropertyAttribute("Graphs")
);
builder.AddCustomAttributes(
typeof(SerialGraph),
new DefaultPropertyAttribute("ValueMemberPath")
);
#endif
}
示例9: AddNewItemTypesAttributes
private static void AddNewItemTypesAttributes(AttributeTableBuilder builder)
{
builder.AddCustomAttributes(typeof(SerialChart), "Graphs",
new NewItemTypesAttribute(
typeof(LineGraph),
typeof(AreaGraph),
typeof(ColumnGraph)));
builder.AddCustomAttributes(typeof(SerialChart), "PresetBrushes",
new NewItemTypesAttribute(typeof(System.Windows.Media.SolidColorBrush),
typeof(System.Windows.Media.LinearGradientBrush),
typeof(System.Windows.Media.RadialGradientBrush),
typeof(System.Windows.Media.ImageBrush)));
builder.AddCustomAttributes(typeof(PieChart), "Brushes",
new NewItemTypesAttribute(typeof(System.Windows.Media.SolidColorBrush),
typeof(System.Windows.Media.LinearGradientBrush),
typeof(System.Windows.Media.RadialGradientBrush),
typeof(System.Windows.Media.ImageBrush)));
}
示例10: AddToolboxBrowsableAttributes
private void AddToolboxBrowsableAttributes()
{
AttributeTableBuilder builder = new AttributeTableBuilder();
builder.AddCustomAttributes(typeof(DataGridCell), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridCellsPanel), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridCellsPresenter), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridColumnHeader), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridColumnHeadersPresenter), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridDetailsPresenter), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridHeaderBorder), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridRow), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridRowHeader), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DataGridRowsPresenter), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(SelectiveScrollingGrid), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(CalendarButton), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(CalendarDayButton), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(CalendarItem), ToolboxBrowsableAttribute.No);
builder.AddCustomAttributes(typeof(DatePickerTextBox), ToolboxBrowsableAttribute.No);
MetadataStore.AddAttributeTable(builder.CreateTable());
}
示例11: RegisterMetadata
void RegisterMetadata()
{
AttributeTableBuilder builder = new AttributeTableBuilder();
// Register Designers.
builder.AddCustomAttributes(typeof(Sequence),
new DesignerAttribute(typeof(SequenceDesigner)));
// Apply the metadata
MetadataStore.AddAttributeTable(builder.CreateTable());
}
示例12: AddGenerateCodeAttributes
private void AddGenerateCodeAttributes(ref AttributeTableBuilder builder)
{
builder.AddCustomAttributes(
typeof(CanvasSetStateToSourceAction),
new ToolboxCategoryAttribute(Resources.ToolBoxCategory_ControlBindingSupport_OneWayToSource));
builder.AddCustomAttributes(
typeof(CanvasSetStateToSourceAction),
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Description));
builder.AddCustomAttributes(
typeof(CanvasSetStateToSourceAction),
"Property",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Property_Description));
builder.AddCustomAttributes(
typeof(CanvasSetStateToSourceAction),
"Source",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Source_Description));
builder.AddCustomAttributes(
typeof(ControlSetStateToSourceAction),
new ToolboxCategoryAttribute(Resources.ToolBoxCategory_ControlBindingSupport_OneWayToSource));
builder.AddCustomAttributes(
typeof(ControlSetStateToSourceAction),
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Description));
builder.AddCustomAttributes(
typeof(ControlSetStateToSourceAction),
"Property",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Property_Description));
builder.AddCustomAttributes(
typeof(ControlSetStateToSourceAction),
"Source",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Source_Description));
builder.AddCustomAttributes(
typeof(ContentControlSetStateToSourceAction),
new ToolboxCategoryAttribute(Resources.ToolBoxCategory_ControlBindingSupport_OneWayToSource));
builder.AddCustomAttributes(
typeof(ContentControlSetStateToSourceAction),
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Description));
builder.AddCustomAttributes(
typeof(ContentControlSetStateToSourceAction),
"Property",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Property_Description));
builder.AddCustomAttributes(
typeof(ContentControlSetStateToSourceAction),
"Source",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Source_Description));
builder.AddCustomAttributes(
typeof(WindowSetStateToSourceAction),
new ToolboxCategoryAttribute(Resources.ToolBoxCategory_ControlBindingSupport_OneWayToSource));
builder.AddCustomAttributes(
typeof(WindowSetStateToSourceAction),
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Description));
builder.AddCustomAttributes(
typeof(WindowSetStateToSourceAction),
"Property",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Property_Description));
builder.AddCustomAttributes(
typeof(WindowSetStateToSourceAction),
"Source",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Source_Description));
builder.AddCustomAttributes(
typeof(NavigationWindowSetStateToSourceAction),
new ToolboxCategoryAttribute(Resources.ToolBoxCategory_ControlBindingSupport_OneWayToSource));
builder.AddCustomAttributes(
typeof(NavigationWindowSetStateToSourceAction),
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Description));
builder.AddCustomAttributes(
typeof(NavigationWindowSetStateToSourceAction),
"Property",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Property_Description));
builder.AddCustomAttributes(
typeof(NavigationWindowSetStateToSourceAction),
"Source",
new DescriptionAttribute(Resources.ControlBindingSupport_OneWayToSource_Source_Description));
builder.AddCustomAttributes(
typeof(StickyNoteControlSetStateToSourceAction),
//.........这里部分代码省略.........
示例13: AddAttributes
/// <summary>
/// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
/// </summary>
/// <param name="builder">The assembly attribute table builder.</param>
protected virtual void AddAttributes(AttributeTableBuilder builder)
{
// Allow FilterDescriptor.IgnoredValue to be edited as a string
builder.AddCustomAttributes(typeof(FilterDescriptor), "IgnoredValue", new TypeConverterAttribute(typeof(StringConverter)));
// Allow FilterDescriptor.Value to be edited as a string
builder.AddCustomAttributes(typeof(FilterDescriptor), "Value", new TypeConverterAttribute(typeof(StringConverter)));
// Allow Parameter.Value (for QueryParameters) to be edited as a string
builder.AddCustomAttributes(typeof(Parameter), "Value", new TypeConverterAttribute(typeof(StringConverter)));
}
示例14: AddAttributes
/// <summary>
/// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
/// </summary>
/// <param name="builder">The assembly attribute table builder.</param>
protected override void AddAttributes(AttributeTableBuilder builder)
{
builder.AddCustomAttributes(typeof(SSWC.Frame), Extensions.GetMemberName<SSWC.Frame>(x => x.UriMapper), new CategoryAttribute(Properties.Resources.CommonProperties));
builder.AddCustomAttributes(typeof(SSWC.Frame), Extensions.GetMemberName<SSWC.Frame>(x => x.UriMapper), new EditorBrowsableAttribute(EditorBrowsableState.Advanced));
builder.AddCustomAttributes(typeof(SSWC.Frame), Extensions.GetMemberName<SSWC.Frame>(x => x.UriMapper), new TypeConverterAttribute(typeof(ExpandableObjectConverter)));
}