當前位置: 首頁>>代碼示例>>C#>>正文


C# AttributeTableBuilder.AddCustomAttributes方法代碼示例

本文整理匯總了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 });            
        }
開發者ID:harunpehlivan,項目名稱:LiveSDK-for-Windows,代碼行數:61,代碼來源:MetadataBase.cs

示例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());
        }
開發者ID:Jalalx,項目名稱:FarsiLibrary,代碼行數:13,代碼來源:VisualStudioMetadata.cs

示例3: AddMonthViewDesigners

        private void AddMonthViewDesigners()
        {
            var builder = new AttributeTableBuilder();
            builder.AddCustomAttributes(typeof (FXMonthView), new FeatureAttribute(typeof (MonthViewDesignAdorner)));

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
開發者ID:Jalalx,項目名稱:FarsiLibrary,代碼行數:7,代碼來源:VisualStudioMetadata.cs

示例4: Register

		public void Register()
		{
			AttributeTableBuilder tableBuilder = new AttributeTableBuilder();

			tableBuilder.AddCustomAttributes(typeof(PieChart), new FeatureAttribute(typeof(PieChartDesignModeValueProvider)));

			MetadataStore.AddAttributeTable(tableBuilder.CreateTable());
		}
開發者ID:XiBeichuan,項目名稱:hydronumerics,代碼行數:8,代碼來源:Metadata.cs

示例5: VectorMetadata

        public VectorMetadata()
        {
            var builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof (Node),
                                        "Position",
                                        PropertyValueEditor.CreateEditorAttribute(typeof (VectorEditor)),
                                        new AlternateContentPropertyAttribute()
                                        );

            AttributeTable = builder.CreateTable();
        }
開發者ID:Conn,項目名稱:Balder,代碼行數:12,代碼來源:VectorMetadata.cs

示例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"));

        }
開發者ID:robinsedlaczek,項目名稱:amCharts-Quick-Charts,代碼行數:65,代碼來源:QuickChartsMetadata.cs

示例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)
                );
        }
開發者ID:robinsedlaczek,項目名稱:amCharts-Quick-Charts,代碼行數:59,代碼來源:QuickChartsMetadata.cs

示例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
        }
開發者ID:robinsedlaczek,項目名稱:amCharts-Quick-Charts,代碼行數:14,代碼來源:QuickChartsMetadata.cs

示例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)));
        }
開發者ID:robinsedlaczek,項目名稱:amCharts-Quick-Charts,代碼行數:20,代碼來源:QuickChartsMetadata.cs

示例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());
        }
開發者ID:jrwren,項目名稱:wpftoolkit,代碼行數:23,代碼來源:VisualStudioMetadata.cs

示例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());
		}
開發者ID:2594636985,項目名稱:SharpDevelop,代碼行數:11,代碼來源:WorkflowDesignerViewContent.cs

示例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),
//.........這裏部分代碼省略.........
開發者ID:veigr,項目名稱:Livet,代碼行數:101,代碼來源:MetaData.generated.cs

示例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)));
        }
開發者ID:OpenRIAServices,項目名稱:OpenRiaServices,代碼行數:15,代碼來源:MetadataBase.cs

示例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)));
 }
開發者ID:kvervo,項目名稱:HorizontalLoopingSelector,代碼行數:10,代碼來源:Metadata.cs


注:本文中的AttributeTableBuilder.AddCustomAttributes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。