本文整理汇总了C#中AttributeTableBuilder.AddCallback方法的典型用法代码示例。如果您正苦于以下问题:C# AttributeTableBuilder.AddCallback方法的具体用法?C# AttributeTableBuilder.AddCallback怎么用?C# AttributeTableBuilder.AddCallback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttributeTableBuilder
的用法示例。
在下文中一共展示了AttributeTableBuilder.AddCallback方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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.AddCallback(typeof(SSWC.DataGrid), b =>
{
b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true));
b.AddCustomAttributes("Columns",
new NewItemTypesAttribute(typeof(SSWC.DataGridCheckBoxColumn)));
b.AddCustomAttributes("Columns",
new NewItemTypesAttribute(typeof(SSWC.DataGridTemplateColumn)));
b.AddCustomAttributes("Columns",
new NewItemTypesAttribute(typeof(SSWC.DataGridTextColumn)));
});
builder.AddCallback(typeof(SSWC.DataGridCell), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWC.DataGridRow), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWC.DataGridRowGroupHeader), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridCellsPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridColumnHeader), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridColumnHeadersPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridDetailsPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridFrozenGrid), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridRowHeader), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWCP.DataGridRowsPresenter), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Control Parts", false)));
builder.AddCallback(typeof(SSWC.DataPager), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));
}
示例2: 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.AddCallback(typeof(SSWC.DataForm), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));
builder.AddCallback(typeof(SSWC.DataField), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true)));
// Note: everything added here must be duplicated in VisualStudio.Design as well!
builder.AddCallback(typeof(SSWC.DataForm), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.DataForm>(x => x.ItemsSource))));
}
示例3: 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.AddCallback(
typeof(SSWC.AccordionItem),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWC.TransitioningContentControl),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
}
示例4: AddAttributes
protected override void AddAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(
typeof(SSWCDC.AreaDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.BarDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.BubbleDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.ColumnDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.LineDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.PieDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.ScatterDataPoint),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.LegendItem),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCDC.DataPointSeriesDragDropTarget),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
}
示例5: 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.AddCallback(SilverlightTypes.DataGridCell, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridRow, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridCellsPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridColumnHeader, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridColumnHeadersPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridDetailsPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridFrozenGrid, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridRowHeader, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridRowsPresenter, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(SilverlightTypes.DataGridRowGroupHeader, b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
}
示例6: AddBaseDefinitionAttributes
private static void AddBaseDefinitionAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(BaseDefinition),
b =>
{
// BaseDefinition properties
b.AddCustomAttributes("AllowDrop", new BrowsableAttribute(false));
b.AddCustomAttributes("BindingGroup", new BrowsableAttribute(false));
b.AddCustomAttributes("CommandBindings", new BrowsableAttribute(false));
b.AddCustomAttributes("ContextMenu", new BrowsableAttribute(false));
b.AddCustomAttributes("Cursor", new BrowsableAttribute(false));
b.AddCustomAttributes("DataContext", new BrowsableAttribute(false));
b.AddCustomAttributes("FocusVisualStyle", new BrowsableAttribute(false));
b.AddCustomAttributes("Focusable", new BrowsableAttribute(false));
b.AddCustomAttributes("ForceCursor", new BrowsableAttribute(false));
b.AddCustomAttributes("InputScope", new BrowsableAttribute(false));
b.AddCustomAttributes("IsEnabled", new BrowsableAttribute(false));
b.AddCustomAttributes("Language", new BrowsableAttribute(false));
b.AddCustomAttributes("Name", new BrowsableAttribute(false));
b.AddCustomAttributes("OverridesDefaultStyle", new BrowsableAttribute(false));
b.AddCustomAttributes("Resources", new BrowsableAttribute(false));
b.AddCustomAttributes("Style", new BrowsableAttribute(false));
b.AddCustomAttributes("ToolTip", new BrowsableAttribute(false));
});
}
示例7: 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)
{
// duplicated from .Design
builder.AddCallback(
typeof(SSWCP.AccordionButton),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWCP.ExpandableContentControl),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
// .VisualStudio.Design's own stuff
builder.AddCallback(
typeof(SSWC.AccordionItem),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
builder.AddCallback(
typeof(SSWC.TransitioningContentControl),
b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)));
}
示例8: AddDockLayoutAttributes
private static void AddDockLayoutAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(DockLayout),
b =>
{
// DockLayout properties
b.AddCustomAttributes("LastChildFill", new CategoryAttribute("Dock"));
b.AddCustomAttributes("LastChildFill", new DescriptionAttribute("Should last child element fill all remaining space"));
b.AddCustomAttributes("Id", new CategoryAttribute("Dock"));
b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
b.AddCustomAttributes("Tag", new CategoryAttribute("Dock"));
b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
});
}
示例9: AddColumnDefinitionAttributes
private static void AddColumnDefinitionAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(ColumnDefinition),
b =>
{
// ColumnDefinition properties
b.AddCustomAttributes("Height", new BrowsableAttribute(false));
b.AddCustomAttributes("MinWidth", new CategoryAttribute("Column"));
b.AddCustomAttributes("MinWidth", new DescriptionAttribute("Minimum width of the column"));
b.AddCustomAttributes("MaxWidth", new CategoryAttribute("Column"));
b.AddCustomAttributes("MaxWidth", new DescriptionAttribute("Maximum width of the column"));
b.AddCustomAttributes("Tag", new CategoryAttribute("Column"));
b.AddCustomAttributes("Width", new CategoryAttribute("Column"));
});
}
示例10: AddUniformGridLayoutAttributes
private static void AddUniformGridLayoutAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(UniformGridLayout),
b =>
{
// UniformGridLayout properties
b.AddCustomAttributes("Rows", new CategoryAttribute("UniformGrid"));
b.AddCustomAttributes("Rows", new DescriptionAttribute("Number of rows in grid"));
b.AddCustomAttributes("Columns", new CategoryAttribute("UniformGrid"));
b.AddCustomAttributes("Columns", new DescriptionAttribute("Number of columns in grid"));
b.AddCustomAttributes("FirstColumn", new CategoryAttribute("UniformGrid"));
b.AddCustomAttributes("FirstColumn", new DescriptionAttribute("Number of leading blank cells in first row of grid"));
b.AddCustomAttributes("Id", new CategoryAttribute("UniformGrid"));
b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
b.AddCustomAttributes("Tag", new CategoryAttribute("UniformGrid"));
b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
});
}
示例11: AddWrapLayoutAttributes
private static void AddWrapLayoutAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(WrapLayout),
b =>
{
// WrapLayout properties
b.AddCustomAttributes("ItemWidth", new CategoryAttribute("Wrap"));
b.AddCustomAttributes("ItemWidth", new DescriptionAttribute("Width of all child elements"));
b.AddCustomAttributes("ItemHeight", new CategoryAttribute("Wrap"));
b.AddCustomAttributes("ItemHeight", new DescriptionAttribute("Height of all child elements"));
b.AddCustomAttributes("Orientation", new CategoryAttribute("Wrap"));
b.AddCustomAttributes("Orientation", new DescriptionAttribute("Direction in which child elements are arranged"));
b.AddCustomAttributes("Id", new CategoryAttribute("Wrap"));
b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
b.AddCustomAttributes("Tag", new CategoryAttribute("Wrap"));
b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
});
}
示例12: AddRemovePositionAnimateAttributes
private static void AddRemovePositionAnimateAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(RemovePositionAnimate),
b =>
{
// RemovePositionAnimate properties
b.AddCustomAttributes("Location", new CategoryAttribute("Remove Position"));
b.AddCustomAttributes("Location", new DescriptionAttribute("Ending location for a child element being added"));
b.AddCustomAttributes("Size", new CategoryAttribute("Remove Position"));
b.AddCustomAttributes("Size", new DescriptionAttribute("Ending size for a child element being added"));
b.AddCustomAttributes("Id", new CategoryAttribute("Remove Position"));
b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for animate instance"));
b.AddCustomAttributes("Tag", new CategoryAttribute("Remove Position"));
b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
b.AddCustomAttributes("Duration", new CategoryAttribute("Remove Position"));
b.AddCustomAttributes("Duration", new DescriptionAttribute("Easing algorithm is applied over this duration"));
b.AddCustomAttributes("Easing", new CategoryAttribute("Remove Position"));
b.AddCustomAttributes("Easing", new DescriptionAttribute("Algorithm used to get from start to end values"));
});
}
示例13: AddRadialLayoutAttributes
private static void AddRadialLayoutAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(RadialLayout),
b =>
{
// RadialLayout properties
b.AddCustomAttributes("StartAngle", new CategoryAttribute("Radial"));
b.AddCustomAttributes("StartAngle", new DescriptionAttribute("Start positioning child elements at this angle"));
b.AddCustomAttributes("EndAngle", new CategoryAttribute("Radial"));
b.AddCustomAttributes("EndAngle", new DescriptionAttribute("End positioning child elements at this angle"));
b.AddCustomAttributes("Circle", new CategoryAttribute("Radial"));
b.AddCustomAttributes("Circle", new DescriptionAttribute("Should last child element fill all remaining space"));
b.AddCustomAttributes("Id", new CategoryAttribute("Radial"));
b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance"));
b.AddCustomAttributes("Tag", new CategoryAttribute("Radial"));
b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
});
}
示例14: AddNewOpacityAnimateAttributes
private static void AddNewOpacityAnimateAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(NewOpacityAnimate),
b =>
{
// NewOpacityAnimate properties
b.AddCustomAttributes("Start", new CategoryAttribute("New Opacity"));
b.AddCustomAttributes("Start", new DescriptionAttribute("Starting opacity for a child element being added"));
b.AddCustomAttributes("End", new CategoryAttribute("New Opacity"));
b.AddCustomAttributes("End", new DescriptionAttribute("Ending opacity when child element has finished being added"));
b.AddCustomAttributes("Id", new CategoryAttribute("New Opacity"));
b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for animate instance"));
b.AddCustomAttributes("Tag", new CategoryAttribute("New Opacity"));
b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always));
b.AddCustomAttributes("Duration", new CategoryAttribute("New Opacity"));
b.AddCustomAttributes("Duration", new DescriptionAttribute("Easing algorithm is applied over this duration"));
b.AddCustomAttributes("Easing", new CategoryAttribute("New Opacity"));
b.AddCustomAttributes("Easing", new DescriptionAttribute("Algorithm used to get from start to end values"));
});
}
示例15: AddMetaPanelAttributes
private static void AddMetaPanelAttributes(AttributeTableBuilder builder)
{
builder.AddCallback(typeof(MetaPanel),
b =>
{
// MetaPanel class
b.AddCustomAttributes(new FeatureAttribute(typeof(MetaPanelDefaultInitializer)));
b.AddCustomAttributes(new ToolboxCategoryAttribute("Panels", true));
b.AddCustomAttributes(new DescriptionAttribute("Panel that has polymorphic layout/animate strategies."));
// MetaPanel properties
b.AddCustomAttributes("AnimateDefinitions", new CategoryAttribute("MetaPanel"));
b.AddCustomAttributes("AnimateDefinitions", new DescriptionAttribute("Collection of animate definitions"));
b.AddCustomAttributes("AnimateDefinitions", new PropertyOrderAttribute(PropertyOrder.Early));
b.AddCustomAttributes("AnimateDefinitions", new AlternateContentPropertyAttribute());
b.AddCustomAttributes("AnimateDefinitions", new NewItemTypesAttribute(typeof(NewOpacityAnimate), typeof(NewPositionAnimate), typeof(MovePositionAnimate), typeof(RemoveOpacityAnimate), typeof(RemovePositionAnimate)));
b.AddCustomAttributes("AnimateId", new CategoryAttribute("MetaPanel"));
b.AddCustomAttributes("AnimateId", new DescriptionAttribute("Identifier of animate definitions to apply"));
b.AddCustomAttributes("ClipToBounds", new CategoryAttribute("Appearance"));
b.AddCustomAttributes("ClipToBounds", new DescriptionAttribute("Clip child elements to panel area"));
b.AddCustomAttributes("ClipToBounds", new EditorBrowsableAttribute(EditorBrowsableState.Advanced));
b.AddCustomAttributes("DisableOnElementCount", new CategoryAttribute("MetaPanel"));
b.AddCustomAttributes("DisableOnElementCount", new DescriptionAttribute("Disable animation when child element count exceeds value"));
b.AddCustomAttributes("DisableOnElementCount", new PropertyOrderAttribute(PropertyOrder.Late));
b.AddCustomAttributes("IsAnimating", new BrowsableAttribute(false));
b.AddCustomAttributes("LayoutDefinitions", new CategoryAttribute("MetaPanel"));
b.AddCustomAttributes("LayoutDefinitions", new DescriptionAttribute("Collection of Layout Settingss"));
b.AddCustomAttributes("LayoutDefinitions", new PropertyOrderAttribute(PropertyOrder.Early));
b.AddCustomAttributes("LayoutDefinitions", new AlternateContentPropertyAttribute());
b.AddCustomAttributes("LayoutDefinitions", new NewItemTypesAttribute(typeof(CanvasLayout), typeof(DockLayout), typeof(GridLayout), typeof(RadialLayout), typeof(StackLayout), typeof(StretchLayout), typeof(UniformGridLayout), typeof(WrapLayout)));
b.AddCustomAttributes("LayoutId", new CategoryAttribute("MetaPanel"));
b.AddCustomAttributes("LayoutId", new DescriptionAttribute("Identifier of Layout Settingss to apply"));
});
}