/// <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))); }
public static void RegisterTabControlAttributeTable(ITypeResolver typeResolver) { Type runtimeType1 = typeResolver.ResolveType(ProjectNeutralTypes.TabControl).RuntimeType; if (runtimeType1 == (Type)null) { return; } AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder(); Type tabItemType = typeResolver.ResolveType(ProjectNeutralTypes.TabItem).RuntimeType; attributeTableBuilder.AddCallback(runtimeType1, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new StyleTypedPropertyAttribute() { Property = "ItemContainerStyle", StyleTargetType = tabItemType }); builder.AddCustomAttributes("SelectedIndex", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("SelectedItem", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("TabStripPlacement", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); })); Type runtimeType2 = typeResolver.ResolveType(ProjectNeutralTypes.TabItem).RuntimeType; attributeTableBuilder.AddCallback(runtimeType2, (AttributeCallback)(builder => { builder.AddCustomAttributes("Header", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("IsSelected", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); })); MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable()); }
/// <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)))); }
/// <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)))); }
/// <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) { // We need to provide empty string for Frame to appear under main "Controls" category: builder.AddCallback(typeof(SSWC.Frame), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("", true))); // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback(typeof(SSWC.Page), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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) { // We need to provide empty string for Frame to appear under main "Controls" category: builder.AddCallback(typeof(SSWC.Frame), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("", true))); // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback(typeof(SSWC.Page), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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) { string labelName = "System.Windows.Controls.Label" + this.AssemblyFullName; builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true))); builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Basic Controls", false))); builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Basic Controls", false))); }
/// <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))); }
/// <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))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWC.Primitives.TabPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.ChildWindow), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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 string labelName = "System.Windows.Controls.Label" + this.AssemblyFullName; builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute("Target"))); builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.DescriptionViewer>(x => x.Target)))); builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.ValidationSummary>(x => x.Target)))); }
/// <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 string labelName = "System.Windows.Controls.Label" + this.AssemblyFullName; builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute("Target"))); builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName <SSWC.DescriptionViewer>(x => x.Target)))); builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName <SSWC.ValidationSummary>(x => x.Target)))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWC.Primitives.TabPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.ChildWindow), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
public static void RegisterWPFToolboxDifferenceAttributeTable(ITypeResolver typeResolver) { AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder(); Type runtimeType1 = typeResolver.ResolveType(ProjectNeutralTypes.DataGrid).RuntimeType; if (runtimeType1 != (Type)null) { attributeTableBuilder.AddCallback(runtimeType1, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new ToolboxCategoryAttribute("Data", true)); builder.AddCustomAttributes((Attribute) new DescriptionAttribute(StringTable.DataGridTypeDescription)); })); } Type runtimeType2 = typeResolver.ResolveType(ProjectNeutralTypes.Calendar).RuntimeType; if (runtimeType2 != (Type)null) { attributeTableBuilder.AddCallback(runtimeType2, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new ToolboxCategoryAttribute("", true)); builder.AddCustomAttributes((Attribute) new DescriptionAttribute(StringTable.CalendarTypeDescription)); })); } Type runtimeType3 = typeResolver.ResolveType(ProjectNeutralTypes.CalendarButton).RuntimeType; if (runtimeType3 != (Type)null) { attributeTableBuilder.AddCallback(runtimeType3, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new ToolboxCategoryAttribute("Control Parts", false)); builder.AddCustomAttributes((Attribute) new DescriptionAttribute(StringTable.CalendarButtonTypeDescription)); })); } Type runtimeType4 = typeResolver.ResolveType(ProjectNeutralTypes.CalendarDayButton).RuntimeType; if (runtimeType4 != (Type)null) { attributeTableBuilder.AddCallback(runtimeType4, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new ToolboxCategoryAttribute("Control Parts", false)); builder.AddCustomAttributes((Attribute) new DescriptionAttribute(StringTable.CalendarDayButtonTypeDescription)); })); } Type runtimeType5 = typeResolver.ResolveType(ProjectNeutralTypes.CalendarItem).RuntimeType; if (runtimeType5 != (Type)null) { attributeTableBuilder.AddCallback(runtimeType5, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new ToolboxCategoryAttribute("Control Parts", false)); builder.AddCustomAttributes((Attribute) new DescriptionAttribute(StringTable.CalendarItemTypeDescription)); })); } MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable()); }
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))); }
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))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCP.AccordionButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.ExpandableContentControl), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCP.AccordionButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.ExpandableContentControl), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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.ButtonSpinner), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.RatingItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TimePickerPopup), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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.ButtonSpinner), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.RatingItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TimePickerPopup), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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))); }
/// <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))); }
/// <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.ChildWindow), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TreeViewItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.CalendarButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.CalendarDayButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.CalendarItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.DatePickerTextBox), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TabItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); // duplicated from Design builder.AddCallback( typeof(SSWCP.TabPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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.ChildWindow), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TreeViewItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.CalendarButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.CalendarDayButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.CalendarItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.DatePickerTextBox), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TabItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); // duplicated from Design builder.AddCallback( typeof(SSWCP.TabPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
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")); }); }
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)); }); }
public static void RegisterTreeViewAttributeTable(ITypeResolver typeResolver) { Type runtimeType = typeResolver.ResolveType(ProjectNeutralTypes.TreeView).RuntimeType; if (runtimeType == (Type)null) { return; } AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder(); Type treeViewItemType = typeResolver.ResolveType(ProjectNeutralTypes.TreeViewItem).RuntimeType; attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new StyleTypedPropertyAttribute() { Property = "ItemContainerStyle", StyleTargetType = treeViewItemType }); builder.AddCustomAttributes("SelectedValue", (Attribute) new DataContextValueSourceAttribute("SelectedValuePath", false)); builder.AddCustomAttributes("SelectedValue", (Attribute) new DualDataContextAttribute(true)); builder.AddCustomAttributes("SelectedValuePath", (Attribute) new DataContextPathExtensionAttribute("ItemsSource", true)); builder.AddCustomAttributes("SelectedItem", (Attribute) new DataContextValueSourceAttribute("ItemsSource", true)); builder.AddCustomAttributes("SelectedItem", (Attribute) new DualDataContextAttribute(false)); })); MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable()); }
public static void RegisterDatePickerAttributeTable(ITypeResolver typeResolver) { Type runtimeType = typeResolver.ResolveType(ProjectNeutralTypes.DatePicker).RuntimeType; if (runtimeType == (Type)null) { return; } AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder(); Type calendarType = typeResolver.ResolveType(ProjectNeutralTypes.Calendar).RuntimeType; attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder => { builder.AddCustomAttributes((Attribute) new StyleTypedPropertyAttribute() { Property = "CalendarStyle", StyleTargetType = calendarType }); builder.AddCustomAttributes("BlackoutDates", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("DisplayDate", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("DisplayDateEnd", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("DisplayDateStart", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("FirstDayOfWeek", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("IsDropDownOpen", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("IsTodayHighlighted", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("SelectedDateFormat", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("Text", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes((Attribute) new ToolboxCategoryAttribute("", true)); })); MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable()); }
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)); }); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCP.LinearClipper), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCP.LinearClipper), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
public static void RegisterDragDropTargetAttributeTable(ITypeResolver typeResolver) { AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder(); ITypeId[] typeIdArray = new ITypeId[3] { ProjectNeutralTypes.DataGridDragDropTarget, ProjectNeutralTypes.ListBoxDragDropTarget, ProjectNeutralTypes.TreeViewDragDropTarget }; foreach (ITypeId typeId in typeIdArray) { Type runtimeType = typeResolver.ResolveType(typeId).RuntimeType; if (runtimeType != (Type)null) { attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder => { builder.AddCustomAttributes("AllowedSourceEffects", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("AllowedSourceEffects", (Attribute) new DescriptionAttribute(StringTable.DragDropTargetTypeDescription)); builder.AddCustomAttributes("AllowDrop", (Attribute) new EditorBrowsableAttribute(EditorBrowsableState.Always)); })); } } MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable()); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCDC.AxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.DateTimeAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCP.EdgePanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.NumericAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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.LinearClipper), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); // .VisualStudio.Design's own stuff builder.AddCallback( typeof(SSWC.ButtonSpinner), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.RatingItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TimePickerPopup), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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.LinearClipper), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); // .VisualStudio.Design's own stuff builder.AddCallback( typeof(SSWC.ButtonSpinner), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.RatingItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TimePickerPopup), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
private static void AddMeasureElementAttributes(AttributeTableBuilder builder) { builder.AddCallback(typeof(MeasureElement), b => { // MeasureElement class b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)); b.AddCustomAttributes(new DefaultPropertyAttribute("LayoutDefinitions")); b.AddCustomAttributes(new DefaultEventAttribute("IsAnimatingChanged")); // MeasureElement properties b.AddCustomAttributes("AllowDrop", new BrowsableAttribute(false)); b.AddCustomAttributes("BindingGroup", new BrowsableAttribute(false)); b.AddCustomAttributes("CacheMode", new BrowsableAttribute(false)); b.AddCustomAttributes("Clip", new BrowsableAttribute(false)); b.AddCustomAttributes("ClipToBounds", new BrowsableAttribute(false)); b.AddCustomAttributes("ContextMenu", new BrowsableAttribute(false)); b.AddCustomAttributes("Cursor", new BrowsableAttribute(false)); b.AddCustomAttributes("DataContext", new BrowsableAttribute(false)); b.AddCustomAttributes("Effect", new BrowsableAttribute(false)); b.AddCustomAttributes("Focusable", new BrowsableAttribute(false)); b.AddCustomAttributes("FocusVisualStyle", new BrowsableAttribute(false)); b.AddCustomAttributes("ForceCursor", new BrowsableAttribute(false)); b.AddCustomAttributes("FlowDirection", new BrowsableAttribute(false)); b.AddCustomAttributes("Height", new BrowsableAttribute(false)); b.AddCustomAttributes("HorizontalAlignment", new BrowsableAttribute(false)); b.AddCustomAttributes("InputScope", new BrowsableAttribute(false)); b.AddCustomAttributes("IsEnabled", new BrowsableAttribute(false)); b.AddCustomAttributes("IsHitTestVisible", new BrowsableAttribute(false)); b.AddCustomAttributes("ItemHeight", new BrowsableAttribute(false)); b.AddCustomAttributes("ItemWidth", new BrowsableAttribute(false)); b.AddCustomAttributes("LayoutTransform", new BrowsableAttribute(false)); b.AddCustomAttributes("Margin", new BrowsableAttribute(false)); b.AddCustomAttributes("MaxHeight", new BrowsableAttribute(false)); b.AddCustomAttributes("MaxWidth", new BrowsableAttribute(false)); b.AddCustomAttributes("MinHeight", new BrowsableAttribute(false)); b.AddCustomAttributes("MinWidth", new BrowsableAttribute(false)); b.AddCustomAttributes("Opacity", new BrowsableAttribute(false)); b.AddCustomAttributes("OpacityMask", new BrowsableAttribute(false)); b.AddCustomAttributes("OverridesDefaultStyle", new BrowsableAttribute(false)); b.AddCustomAttributes("Projection", new BrowsableAttribute(false)); b.AddCustomAttributes("RenderTransform", new BrowsableAttribute(false)); b.AddCustomAttributes("RenderTransformOrigin", new BrowsableAttribute(false)); b.AddCustomAttributes("Resources", new BrowsableAttribute(false)); b.AddCustomAttributes("SnapsToDevicePixels", new BrowsableAttribute(false)); b.AddCustomAttributes("Style", new BrowsableAttribute(false)); b.AddCustomAttributes("ToolTip", new BrowsableAttribute(false)); b.AddCustomAttributes("Uid", new BrowsableAttribute(false)); b.AddCustomAttributes("UseLayoutRounding", new BrowsableAttribute(false)); b.AddCustomAttributes("VerticalRounding", new BrowsableAttribute(false)); b.AddCustomAttributes("VerticalAlignment", new BrowsableAttribute(false)); b.AddCustomAttributes("Visibility", new BrowsableAttribute(false)); b.AddCustomAttributes("Width", new BrowsableAttribute(false)); b.AddCustomAttributes("ZIndex", new BrowsableAttribute(false)); }); }
/// <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))); }
/// <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))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCD.Interpolator), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.AxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.DateTimeAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCP.EdgePanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.NumericAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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.Primitives.TabPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true))); builder.AddCallback( typeof(SSWC.TabControl), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(String.Empty))); builder.AddCallback( typeof(SSWC.TreeView), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName <SSWC.TreeView>(x => x.ItemsSource)))); builder.AddCallback( typeof(SSWC.TreeViewItem), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName <SSWC.TreeViewItem>(x => x.ItemsSource)))); builder.AddCallback( typeof(SSWC.HeaderedItemsControl), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName <SSWC.HeaderedItemsControl>(x => x.Items)))); }
/// <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.Primitives.TabPanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true))); builder.AddCallback( typeof(SSWC.TabControl), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(String.Empty))); builder.AddCallback( typeof(SSWC.TreeView), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName<SSWC.TreeView>(x => x.ItemsSource)))); builder.AddCallback( typeof(SSWC.TreeViewItem), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName<SSWC.TreeViewItem>(x => x.ItemsSource)))); builder.AddCallback( typeof(SSWC.HeaderedItemsControl), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName<SSWC.HeaderedItemsControl>(x => x.Items)))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCD.Interpolator), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.AxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.DateTimeAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCP.EdgePanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.NumericAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); ////builder.AddCallback( //// typeof(SSWCDCP.DelegatingListBox), //// b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.AreaSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.BarSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.ColumnSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.LineSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.ScatterSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
private static void AddStackLayoutAttributes(AttributeTableBuilder builder) { builder.AddCallback(typeof(StackLayout), b => { // StackLayout properties b.AddCustomAttributes("Orientation", new CategoryAttribute("Stack")); b.AddCustomAttributes("Orientation", new DescriptionAttribute("Direction in which child elements are arranged")); b.AddCustomAttributes("Id", new CategoryAttribute("Stack")); b.AddCustomAttributes("Id", new DescriptionAttribute("Identifier for layout instance")); b.AddCustomAttributes("Tag", new CategoryAttribute("Stack")); b.AddCustomAttributes("Tag", new EditorBrowsableAttribute(EditorBrowsableState.Always)); }); }
/// <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.AutoCompleteBox), b => { b.AddCustomAttributes(new DefaultPropertyAttribute( Extensions.GetMemberName<SSWC.AutoCompleteBox>(x => x.Text))); b.AddCustomAttributes(new DefaultEventAttribute("SelectionChanged")); b.AddCustomAttributes(new ComplexBindingPropertiesAttribute( Extensions.GetMemberName<SSWC.AutoCompleteBox>(x => x.ItemsSource), Extensions.GetMemberName<SSWC.AutoCompleteBox>(x => x.ValueMemberPath))); }); }
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)); }); }
/// <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.AutoCompleteBox), b => { b.AddCustomAttributes(new DefaultPropertyAttribute( Extensions.GetMemberName <SSWC.AutoCompleteBox>(x => x.Text))); b.AddCustomAttributes(new DefaultEventAttribute("SelectionChanged")); b.AddCustomAttributes(new ComplexBindingPropertiesAttribute( Extensions.GetMemberName <SSWC.AutoCompleteBox>(x => x.ItemsSource), Extensions.GetMemberName <SSWC.AutoCompleteBox>(x => x.ValueMemberPath))); }); }
public static void RegisterNumericUpDownAttributeTable(ITypeResolver typeResolver) { AttributeTableBuilder attributeTableBuilder = new AttributeTableBuilder(); Type runtimeType = typeResolver.ResolveType(ProjectNeutralTypes.NumericUpDown).RuntimeType; if (runtimeType != (Type)null) { attributeTableBuilder.AddCallback(runtimeType, (AttributeCallback)(builder => { builder.AddCustomAttributes("DecimalPlaces", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); builder.AddCustomAttributes("Increment", (Attribute) new CategoryAttribute(PresentationFrameworkStringTable.Category_Common_Properties)); })); } MetadataStore.AddAttributeTable(attributeTableBuilder.CreateTable()); }
private static void AddRowDefinitionAttributes(AttributeTableBuilder builder) { builder.AddCallback(typeof(RowDefinition), b => { // RowDefinition properties b.AddCustomAttributes("Height", new CategoryAttribute("Row")); b.AddCustomAttributes("MinHeight", new CategoryAttribute("Row")); b.AddCustomAttributes("MinHeight", new DescriptionAttribute("Minimum height of the column")); b.AddCustomAttributes("MaxHeight", new CategoryAttribute("Row")); b.AddCustomAttributes("MaxHeight", new DescriptionAttribute("Maximum height of the column")); b.AddCustomAttributes("Tag", new CategoryAttribute("Row")); b.AddCustomAttributes("Width", new BrowsableAttribute(false)); }); }
/// <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) { string labelName = "System.Windows.Controls.Label" + this.AssemblyFullName; builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data", true))); builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Basic Controls", false))); builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new ToolboxCategoryAttribute("Data/Basic Controls", false))); // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback(Type.GetType(labelName), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute("Target"))); builder.AddCallback(typeof(SSWC.DescriptionViewer), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.DescriptionViewer>(x => x.Target)))); builder.AddCallback(typeof(SSWC.ValidationSummary), b => b.AddCustomAttributes(new DefaultBindingPropertyAttribute(Extensions.GetMemberName<SSWC.ValidationSummary>(x => x.Target)))); }
/// <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) { // Note: everything added here must be duplicated in VisualStudio.Design as well! builder.AddCallback( typeof(SSWCD.Interpolator), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.AxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.DateTimeAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCP.EdgePanel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDC.NumericAxisLabel), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); ////builder.AddCallback( //// typeof(SSWCDCP.DelegatingListBox), //// b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.AreaSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.BarSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.ColumnSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.LineSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCDCC.ScatterSeries), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
/// <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(SSWCP.GlobalCalendarButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.GlobalCalendarDayButton), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWCP.GlobalCalendarItem), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TreeViewItemCheckBox), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.ListBoxDragDropTarget), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); builder.AddCallback( typeof(SSWC.TreeViewDragDropTarget), b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(false))); }
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")); }); }
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)); }); }
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")); }); }
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)); }); }
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)); }); }
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")); }); }
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)); }); }
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")); }); }
private static void AddMeasureElementAttributes(AttributeTableBuilder builder) { builder.AddCallback(typeof(MeasureElement), b => { // MeasureElement class b.AddCustomAttributes(new ToolboxBrowsableAttribute(false)); b.AddCustomAttributes(new DefaultPropertyAttribute("LayoutDefinitions")); b.AddCustomAttributes(new DefaultEventAttribute("IsAnimatingChanged")); // MeasureElement properties b.AddCustomAttributes("AllowDrop", new BrowsableAttribute(false)); b.AddCustomAttributes("BindingGroup", new BrowsableAttribute(false)); b.AddCustomAttributes("CacheMode", new BrowsableAttribute(false)); b.AddCustomAttributes("Clip", new BrowsableAttribute(false)); b.AddCustomAttributes("ClipToBounds", new BrowsableAttribute(false)); b.AddCustomAttributes("ContextMenu", new BrowsableAttribute(false)); b.AddCustomAttributes("Cursor", new BrowsableAttribute(false)); b.AddCustomAttributes("DataContext", new BrowsableAttribute(false)); b.AddCustomAttributes("Effect", new BrowsableAttribute(false)); b.AddCustomAttributes("Focusable", new BrowsableAttribute(false)); b.AddCustomAttributes("FocusVisualStyle", new BrowsableAttribute(false)); b.AddCustomAttributes("ForceCursor", new BrowsableAttribute(false)); b.AddCustomAttributes("FlowDirection", new BrowsableAttribute(false)); b.AddCustomAttributes("Height", new BrowsableAttribute(false)); b.AddCustomAttributes("HorizontalAlignment", new BrowsableAttribute(false)); b.AddCustomAttributes("InputScope", new BrowsableAttribute(false)); b.AddCustomAttributes("IsEnabled", new BrowsableAttribute(false)); b.AddCustomAttributes("IsHitTestVisible", new BrowsableAttribute(false)); b.AddCustomAttributes("ItemHeight", new BrowsableAttribute(false)); b.AddCustomAttributes("ItemWidth", new BrowsableAttribute(false)); b.AddCustomAttributes("LayoutTransform", new BrowsableAttribute(false)); b.AddCustomAttributes("Margin", new BrowsableAttribute(false)); b.AddCustomAttributes("MaxHeight", new BrowsableAttribute(false)); b.AddCustomAttributes("MaxWidth", new BrowsableAttribute(false)); b.AddCustomAttributes("MinHeight", new BrowsableAttribute(false)); b.AddCustomAttributes("MinWidth", new BrowsableAttribute(false)); b.AddCustomAttributes("Opacity", new BrowsableAttribute(false)); b.AddCustomAttributes("OpacityMask", new BrowsableAttribute(false)); b.AddCustomAttributes("OverridesDefaultStyle", new BrowsableAttribute(false)); b.AddCustomAttributes("Projection", new BrowsableAttribute(false)); b.AddCustomAttributes("RenderTransform", new BrowsableAttribute(false)); b.AddCustomAttributes("RenderTransformOrigin", new BrowsableAttribute(false)); b.AddCustomAttributes("Resources", new BrowsableAttribute(false)); b.AddCustomAttributes("SnapsToDevicePixels", new BrowsableAttribute(false)); b.AddCustomAttributes("Style", new BrowsableAttribute(false)); b.AddCustomAttributes("ToolTip", new BrowsableAttribute(false)); b.AddCustomAttributes("Uid", new BrowsableAttribute(false)); b.AddCustomAttributes("UseLayoutRounding", new BrowsableAttribute(false)); b.AddCustomAttributes("VerticalRounding", new BrowsableAttribute(false)); b.AddCustomAttributes("VerticalAlignment", new BrowsableAttribute(false)); b.AddCustomAttributes("Visibility", new BrowsableAttribute(false)); b.AddCustomAttributes("Width", new BrowsableAttribute(false)); b.AddCustomAttributes("ZIndex", new BrowsableAttribute(false)); }); }