VCProject::AddRuleDefinition Method (String^, String^, Boolean)
Visual Studio 2015
Adds a rule to the project so that it is available as an IVCRulePropertyStorage.
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
bool AddRuleDefinition( String^ bstrRuleFilePath, String^ bstrContext, bool bPersistInProject )
Parameters
- bstrRuleFilePath
-
Type:
System::String^
The path to a XAML file that contains a rule. May be a full path or relative to the project.
- bstrContext
-
Type:
System::String^
A semicolon-delimited list of contexts in which this rule applies.
- bPersistInProject
-
Type:
System::Boolean
Specify true to add the rule to the project permanently, or false to add the rule only until it is unloaded.
Return Value
Type: System::Booleantrue if the rule was actually added to the project; false if the rule was already defined in the project.
This method adds a PropertyPageSchema item to the project file. No condition is attached to the added item.
To read the rule just added, browse through Rules for any configuration.
Show: