Nevron Open Vision Documentation
Nevron.Nov.Dom Namespace / NStyleSheet Class / CreateRule Method
Example


In This Topic
    CreateRule Method
    In This Topic
    Helper method for making a rule which matches the selector built by the specified delegate.
    Syntax
    'Declaration
     
    
    Public Function CreateRule( _
       ByVal buildSelectorDelegate As Nevron.Nov.Function(Of NSelectorBuilder) _
    ) As NRule
    'Usage
     
    
    Dim instance As NStyleSheet
    Dim buildSelectorDelegate As Nevron.Nov.Function(Of NSelectorBuilder)
    Dim value As NRule
     
    value = instance.CreateRule(buildSelectorDelegate)
    public NRule CreateRule( 
       Nevron.Nov.Function<NSelectorBuilder> buildSelectorDelegate
    )

    Parameters

    buildSelectorDelegate
    Remarks
    The method is intended to be used in the following way: // create a rule that matches buttons NRule rule = sheet.CreateRule(delegate(NSelectorBuilder sb) { sb.TypeOf(NButton.NButtonSchema); });
    Example
    // create a rule that matches buttons
    NRule rule = sheet.CreateRule(delegate(NSelectorBuilder sb) { sb.TypeOf(NButton.NButtonSchema); });
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also