Click here to Skip to main content
15,886,026 members
Articles / Programming Languages / Visual Basic

RestrictedUI: A .NET Library for restricting a user interface based on a security policy

Rate me:
Please Sign up or sign in to vote.
4.30/5 (17 votes)
26 May 2010MPL21 min read 26.8K   1.3K   69  
How to control the user interface using a policy established in a declaratively way, based on user roles and application status.
/* * * This file was autogenerated by Styler at 02:02 on 02/15/2003 * * */


/***********************************************************
 *             SCRIPT-SUPPORTING STYLES
 ***********************************************************/

/* Defines the userData cache persistence mechanism. */
.userDataStyle
{
	behavior: url(#default#userData);
}

/* Used to save the scroll bar position when navigating away from a page. */
div.saveHistory
{
	behavior: url(#default#savehistory);
}

/* Formats the expand/collapse images for all collapsible regions. */
img.toggle
{
	border: 0;
	margin-right: 5;
}

/* Formats the Collapse All/Expand All images. */
img#toggleAllImage
{
	margin-left: 0;
	vertical-align: middle;
}

/* Supports XLinks */
MSHelp\:link
{
 	text-decoration: underline;
	color: #0000ff; 
	hoverColor: #3366ff;
	filterString: ;
}


/***********************************************************
 *             CONTENT PRESENTATION STYLES
 ***********************************************************/

body
{
	background:	#FFFFFF;
	color: #000000;
	font-family:	Verdana;
	font-size: medium;
	font-style: normal;
	font-weight: normal;
	margin-top:	0;
	margin-bottom:	0;
	margin-left:	0;
	margin-right:	0;
	width:	100%;
}

dl
{
	margin-top:	15;
	margin-bottom:5;
	padding-left:	1;
}

dl.authored dt {
	font-style:	bold;
	margin-top: 2;
}

dd {
	margin-left:	0;
}

ul
{
	margin-top:0;
	margin-bottom:0;
	margin-left: 17;
	list-style-type: disc;
}

ul ul
{
	margin-bottom: 4;
	margin-left: 17;
	margin-top: 3;
	list-style-type: disc;
}

ol {
	margin-top:0;
	margin-bottom:0;
	margin-left: 28;
	list-style-type: decimal;
}

ol ol {
	margin-bottom: 4;
	margin-left: 28;
	margin-top: 3;
	list-style-type: lower-alpha;
}

li {
	margin-top: 5;
	margin-bottom: 5;
}

p {
	margin-top: 10;
	margin-bottom: 5;
}

a:link {
	color:	#0000FF;
}

a:visited {
	color: #DD7C3B;
}

a:hover {
	color:	#3366FF;
}

code
{
	font-family:	Monospace, Courier New, Courier;
	font-size: 105%;
	color:	#000066;
}

span.parameter {
	font-style: italic;
}

span.italic {
	font-style: italic;
}

span.selflink {
	font-weight: bold;
}

span.nolink {
	font-weight: bold;
}

/***********************************************************
 *             STRUCTURE PRESENTATION STYLES
 ***********************************************************/

/* Applies to everything below the non-scrolling header region. */
div#mainSection
{
	font-size: 62.5%;
	width: 100%;
}
html>body #mainSection
{
	font-size:73%;
	width: 100%;
}

/* Applies to everything below the non-scrolling header region, minus the footer. */
div#mainBody
{
	font-size: 100%;
	margin-left: 15;
	margin-top: 10;
	/*padding-bottom: 20;*/
}

html>body #mainBody
{
	font-size: 93%;
	margin-left: 15;
	margin-top: 10;
	padding-bottom: 20;
}

/* Adds right padding for all blocks in mainBody */
div#mainBody p, div#mainBody ol, div#mainBody ul, div#mainBody dl
{
	padding-right: 5;
}

/*------------------------------ Begin Non-scrolling Header Region Styles -------------------------------*/
/* Applies to the entire non-scrolling header region. */
div#header
{
	background-color: #FFFFFF;
	padding-top:	0;
	padding-bottom:	0;
	padding-left:	0;
	padding-right:	0;
	width:	100%;
}

/* Applies to both tables in the non-scrolling header region. */
div#header table
{
	width:	100%;
}

/* Applies to cells in both tables in the non-scrolling header region. */
div#header table td
{
	color: #0000FF;
	font-size: 70%;
	margin-top:	0;
	margin-bottom:	0;
	padding-right: 20;
}
/* Applies to second row in the upper table of the non-scrolling header region. */
div#header table tr#headerTableRow2 td
{
	padding-left: 13px;
}

/* Applies to the last row in the upper table of the non-scrolling header region. Text 
   in this row includes See Also, Constructors, Methods, and Properties. */
div#header table tr#headerTableRow3 td
{
	padding-top: 2px;
	padding-left: 15;
}

/* Applies to the lower table in the non-scrolling header region. Text in this table
   includes Collapse All/Expand All, Language Filter, and Members Options. */
div#header table#bottomTable
{
	border-top-color: #FFFFFF;
	border-top-style: solid;
	border-top-width: 1;
	text-align: left;
	padding-left: 15;
	padding-top: 5px;
	padding-bottom: 5px;
}

/* Formats the first column--the one that displays icons--in mref list tables (such as Public Constructors, 
   Protected Constructors, Public Properties, Protected Properties, and so on). */
div#mainSection table td.imageCell
{
	white-space: nowrap;
}
/*------------------------------ End General Table Styles -------------------------------*/

/*------------------------------ Begin General Table Styles -------------------------------*/

div#mainBody div.alert, div#mainBody div.code, div#mainBody div.tableSection
{
	width:98.9%;
}

div#mainBody div.section div.alert, div#mainBody div.section div.code,
div#mainBody div.section div.tableSection
{
	width:100%;
}

div#mainBody div.section ul div.alert, div#mainBody div.section ul div.code,
div#mainBody div.section ul div.tableSection, div#mainBody div.section ol div.alert, 
div#mainBody div.section ol div.code, div#mainBody div.section ol div.tableSection
{
	width:100%;
}

div.alert p, div.code p
{
	margin-top:5;
	margin-bottom:8;
}
dd p
{
	margin-top:2;
	margin-bottom:8;
}
div.tableSection p
{
	margin-top:1;
	margin-bottom:4;
}	
li p
{
	margin-top:2;
	margin-bottom:2;
}
div.seeAlsoNoToggleSection dl
{
	margin-top:8;
	margin-bottom:1;
	padding-left:1;
}
div.seeAlsoNoToggleSection dd p
{
	margin-top:2;
	margin-bottom:8;
}
div.section dl
{
	margin-top:8;
	margin-bottom:1;
	padding-left:1;
}
div.section dd p
{
	margin-top:2;
	margin-bottom:8;
}
/*------------------------------ End General Table Styles -------------------------------*/



/*------------------------------ Begin Syntax and Snipper Code Block Styles -------------------------------*/
div.code table
{
	border: 0;
	font-size: 95%;
	margin-bottom: 5;
	margin-top:-.4em;
	width: 100%
}

div.code table th
{	
	background:	#EFEFF7;
	border-bottom-color: #C8CDDE;
	border-bottom-style: solid;
	border-bottom-width: 1;
	color: #000066;
	font-weight: bold;
	padding-left: 5;
	padding-right: 5;
}

div.code table td
{
	background:	#F7F7FF;
	border-top-color: #FFFFFF;
	border-top-style: solid;
	border-top-width: 1;
	padding-left: 5;
	padding-right: 5;
	padding-top: 5;
}
/* Applies to the running header text in the first row of the upper table in the
   non-scrolling header region. */
span#runningHeaderText
{
	color: #8C8C8C;
	font-size: 90%;
	padding-left: 13;
}

/* Applies to the topic title in the second row of the upper table in the
   non-scrolling header region. */
span#nsrTitle
{
	color: #000000;
	font-size: 160%;
	font-weight: 400;
	font-family: arial;
}
/*------------------------------ End Non-scrolling Header Region Styles -------------------------------*/


/* Formats the footer. Currently, the transforms pass in two parameters to the 
   footer SSC, but the default footer SSC doesn't use either parameter.
   TODO: Investigate whether the default footer SSC has any impact on doc spec. */
div#footer
{
	font-size: 80%;
	margin-top:	0;
	margin-bottom:	0;
	margin-left:	0;
	margin-right:	0;
	padding-top:	8;
	padding-bottom:	6;
	padding-left:	1;
	padding-right:	1;
	width:	100%;
}

html>body div#footer
{
	font-size: 80%;
	margin-top:	0;
	margin-bottom:	0;
	margin-left:	0;
	margin-right:	0;
	padding-top:	2;
	padding-bottom:	6;
	padding-left:	1;
	padding-right:	1;
	width:	98%;
}

/* Unable to find this style in the transforms. The default footer SSC adds a plain horizontal rule.
   TODO: Determine whether this style is required by the doc spec. */
/*
hr#footerHR
{
	border-bottom-color: #EEEEFF;
	border-bottom-style: solid;
	border-bottom-width: 1;
	border-top-color: C8CDDE;
	border-top-style: solid;
	border-top-width: 1;
	height: 3;
	color: #D4DFFF;
}
*/

/********************************************************************************************************************
	Collapsible Section Structure

	<h1 class="heading">							// Format of the collapsible section text
		<span onclick="ExpandCollapse(xxxToggle)">	// Defines the onclick procedure for the expand/collapse section
			<img id="xxxToggle">					// Expand/collapse image
			</img>
		</span>
	</h1>

	<div id="xxxSection" class="section">			// The body of the collapsible section; hidden by default
	</div>


	The ExpandCollapse() function is responsible for toggling the expand/collapse image, and for
	displaying/hiding the body of the collapsible section.
********************************************************************************************************************/

/* Applies to the body of a collapsible section */
div.seeAlsoNoToggleSection
{
	margin-left:0;
	padding-top:	2;
	padding-bottom:	2;
	padding-left:	0;
	padding-right:	15;
	width:	100%;
}

div.section
{
	margin-left:0;
	padding-top:	0;
	padding-bottom:	0;
	padding-left:	16;
	padding-right:	15;
	width:	100%;
}
html>body div.section
{
	margin-left:0;
	padding-top:	2;
	padding-bottom:	2;
	padding-left:	16;
	padding-right:	15;
	width:	97%;
}
div.seeSection
{
	margin-left:0;
	padding-top:	0;
	padding-bottom:	2;
	padding-left:	16;
	padding-right:	15;
	width:	100%;
}


/*------------------------------ Begin Heading Styles -------------------------------*/
/* As far as I can tell, only <h1> tags use this class.
   TODO: Decide whether to roll these attributes into the h1.heading style */
.heading
{
	font-weight:	bold;
	margin-top:		18;
	margin-bottom:	8;
}

/* All <h1> headings. */
h1.heading
{
	color: #000000;
	font-size:	130%;
}

/* Applies to table titles and subsection titles. */
.subHeading
{
	font-weight:	bold;
	margin-bottom:	4;
}
.procedureSubHeading
{
	font-weight: bold;
	margin-bottom: 4;
}

/* Formats the titles of author-generated tables. */
h3.subHeading
{
	color:  #000000;
	font-size: 120%;
    font-weight:800;
}

h3.procedureSubHeading
{
	color: #000000;
	font-size: 120%;
}

/* Formats the titles of all subsections. */
h4.subHeading
{
	color: #000000;
	font-size: 110%;
	font-weight:800;
}
span.labelheading, div.labelheading
{
	font-size:100%;
	color:#003399;
}

/*------------------------------ End Heading Styles -------------------------------*/


/*------------------------------ Begin Image Styles -------------------------------*/
img.copyCodeImage
{
	border: 0;
	margin: 1;
	margin-right: 3;
}

img.downloadCodeImage
{
	border: 0;
	margin-right: 3;
}

img.viewCodeImage
{
	border: 0;
	margin-right: 3;
}

img.note
{
	border: 0;
	margin-right: 3;
}
/*------------------------------ End Image Styles -------------------------------*/


/*------------------------------ Begin General Table Styles -------------------------------*/
div#mainSection table
{
	border: 0;
	font-size: 100%;
	width:	98.9%;
	margin-top: 5px;
	margin-bottom: 5px;
}

div#mainSection table tr
{
	vertical-align: top;
}

div#mainSection table th
{
	background-color: #EFEFF7;
	border-bottom: 1px solid #C8CDDE;
	border-left: 1px none #D5D5D3;
	color: #000066;
	padding-left: 5px;
	padding-right: 5px;
	text-align: left;
}

div#mainSection table td
{
	background-color: #F7F7FF;
	border-bottom: 1px solid #D5D5D3;
	border-left: 1px none #D5D5D3;
	padding-left: 5px;
	padding-right: 5px;
}

/* Formats the first column--the one that displays icons--in mref list tables (such as Public Constructors, 
   Protected Constructors, Public Properties, Protected Properties, and so on). */
div#mainSection table td.imageCell
{
	white-space: nowrap;
}
/*------------------------------ End General Table Styles -------------------------------*/


/*------------------------------ Begin Syntax and Snipper Code Block Styles -------------------------------*/
div.code table
{
	border: 0;
	font-size: 95%;
	margin-bottom: 5;
	width: 100%
}

div.code table th
{	
	background:	#EFEFF7;
	border-bottom-color: #C8CDDE;
	border-bottom-style: solid;
	border-bottom-width: 1;
	color: #000066;
	font-weight: bold;
	padding-left: 5;
	padding-right: 5;
}

div.code table td
{
	background:	#F7F7FF;
	border-top-color: #FFFFFF;
	border-top-style: solid;
	border-top-width: 1;
	padding-left: 5;
	padding-right: 5;
	padding-top: 5;
}
/*------------------------------ End Syntax and Snipper Code Block Styles -------------------------------*/


/*------------------------------ Begin Note Styles -------------------------------*/
div.alert table
{
	border: 0;
	font-size: 100%;
	width:	100%;
}

div.alert table th
{
	background:	#EFEFF7;
	border-bottom-width: 0;
	color: #000066;
	padding-left: 5;
	padding-right: 5;
}

div.alert table td
{
	background:	#F7F7FF;
	border-top-color: #FFFFFF;
	border-top-style: solid;
	border-top-width: 1;
	padding-left: 5;
	padding-right: 5;
}


/*------------------------------ End Note Styles -------------------------------*/


/* Applies to the copy code text and image. */
span.copyCode
{
	color: #0000ff;
	font-size: 90%;
	font-weight: normal;
	cursor: pointer;
	float: right;
	display: inline;
	text-align: right;
	text-decoration: underline;
}

span.copyCodeOnHover
{
	color: #E85F17;
	font-size:xx-small;
	font-weight: normal;
	cursor: pointer;
	float: right;
	display: inline;
	text-align: right;
	text-decoration: underline;
}

.downloadCode
{
	color: #0000ff;
	font-size: 90%;
	font-weight: normal;
	cursor: pointer;
}

.viewCode
{
	color: #0000ff;
	font-size: 90%;
	font-weight: normal;
	cursor: pointer;
}

/* Formats the code in syntax and usage blocks, and the code in non-snipper code blocks. */
div.code pre
{
	font-family:	Monospace, Courier New, Courier;
	font-size: 105%;
	color:	#000066;
	word-wrap:	break-word;
	background: #F7F7FF;
}

/* Formats parameter tooltips. */
.tip
{
	color:	#0000FF;
	font-style: italic;
	cursor: pointer;
	text-decoration:underline;
}

/* Applies to text styled as math. This text is passed as a parameter to the italics SSC definition */
.math
{
	font-family: Times New Roman;
	font-size: 125%
}

/* The sourceCodeList class doesn't appear in the transforms.
   TODO: Find out whether this style is needed for the doc spec. */
/*
.sourceCodeList
{
	font-family: Verdana;
	font-size: 90%;	
}
*/

/* The viewCode class doesn't appear in the transforms.
   TODO: Find out whether this style is needed for the doc spec. */
/*
pre.viewCode
{
	width: 100%;
	overflow: auto;
}
*/

/* Dropdown areas */

#devlangsMenu {
	position: absolute;
	visibility: hidden;
	border-style: solid;
	border-width: 1px;
	border-color: #f3cbb5;
	background: #FCECE4;
	padding-top: 4px;
	padding-bottom: 4px;
	padding-left: 4px;
	padding-right:8px;
	font-size: 70%;
}

#memberOptionsMenu {
	position: absolute;
	visibility: hidden;
	border-style: solid;
	border-width: 1px;
	border-color: #f3cbb5;
	background: #FCECE4;
	padding-top: 4px;
	padding-bottom: 4px;
	padding-left: 4px;
	padding-right:8px;
	font-size: 70%;
}

#memberFrameworksMenu {
	position: absolute;
	visibility: hidden;
	border-style: solid;
	border-width: 1px;
	border-color: #f3cbb5;
	background: #FCECE4;
	padding-top: 4px;
	padding-bottom: 4px;
	padding-left: 4px;
	padding-right:8px;
	font-size: 70%;
}

/* Applies to the checkbox labels in the filter drop-downs for devlang, member options, and member platforms. */
.checkboxLabel
{
	color:	#0000FF;
	cursor: pointer;
	text-decoration:underline;
	padding-bottom:4;
	font-size:90%;
}

img#devlangsDropdownImage
{
	border: 0;
	margin-left: 0;
	vertical-align: middle;
}

/* Formats the Members Options filter drop-down image. */
img#memberOptionsDropdownImage
{
	border: 0;
	margin-left: 0;
	vertical-align: middle;
}

/* Formats the Members Platforms filter drop-down image. */
img#memberFrameworksDropdownImage
{
	border: 0;
	margin-left: 0;
	vertical-align: middle;
}

/* Line seperating footer from main body */

div.footerLine {
	margin: 0;
	width: 100%;
	padding-top:	8;
	padding-bottom:	6;
	/*padding-left:	5;
	padding-right:	2;*/

}

div.hr1 {
	margin: 0;
	width: 100%;
	height: 1px;
	padding: 0;
	background: #C8CDDE;
	font-size: 1px;
}

div.hr2 {
	margin: 0;
	width: 100%;
	height: 1px;
	padding: 0;
	background: #D4DFFF;
	font-size: 1px;
}

div.hr3 {
	margin: 0;
	width: 100%;
	height: 1px;
	padding: 0;
	background: #EEEEFF;
	font-size: 1px;
}

span.cs {
	display: none;
}

span.vb {
	display: none;
}

span.cpp {
	display: none;
}

span.nu {
	display: inline;
}

span.code {
	font-family:	Monospace, Courier New, Courier;
	font-size: 105%;
	color:	#000066; 
}
span.ui {
	font-weight: bold;
}
span.math {
	font-style: italic;
}
span.input {
	font-weight: bold;
}
span.term {
	font-style: italic;
}
span.label 
{
	font-weight: bold;
}
span.foreignPhrase {
	font-style: italic;
}
span.placeholder {
	font-style: italic;
}
span.keyword 
{
	font-weight: bold;
}
span.typeparameter
{
	font-style:italic;
}

div.caption
{
	font-weight: bold;
	font-size:100%;
	color:#003399;
}

/* syntax styles */

div.code span.identifier 
{
	/*font-weight: bold;*/
}

div.code span.keyword 
{
	/*color: green;*/
	color: #871F78;
}

div.code span.parameter 
{
	font-style: italic;
	/*color: purple;*/
}

div.code span.literal 
{
	/*color: purple;*/
	color:#8B0000;
}

div.code span.comment 
{
	/*color: red;*/
	color: #006400;
}

span.syntaxLabel
{
	color:#0481DA;
	font-weight:bold;
}
span.introStyle
{
	color:DarkGray;
}

div.seeAlsoStyle
{
	padding-top:5px;

}

td.nsrBottom
{
	height: 0.6em;
	width: 100%;
}

/* end of syntax styles */

/* Glossary */
SPAN.clsGlossary {cursor: default; color: #509950; font-weight: bold;}
DIV.clsTooltip {border: 1px solid black; padding: 2px; position: absolute; top: 0; left: 0; display: none; background-color: #FFFFAA; color: black; font-size: 8pt; font-family: Arial;}


/* FB STYLES */
span.feedbackcss
{
    font-size: 110%;
    width:100%;
    margin-left: 15px;
/*
    border-width: 1px 1px 1px 1px;
    border-style: solid;
    border-color:#C8CDDE;
*/
}

div#feedbackarea table
{
    margin-bottom:0px;
    margin-top:0px;
    margin-left: 0;
    width:300;
    border-width: 0px 0px 0px 0px;
}

div#feedbackarea table td
{
    /*background-color: #D4DFFF;*/
    font-family:Verdana;
    font-size:100%;
    text-align:center;
    /*color: #003399;*/
    border-bottom:0px;
}
 
div#feedbackarea p
{
    font-size:100%;
    /*background-color: #D4DFFF;*/
    width: 100%;
    margin-bottom:  0;
    margin-top:	    0;
    margin-left:    6;
    margin-right:   5;
}
div#feedbackarea H5
{
margin-top:0px;
    margin-bottom:0.7em;
	font-size:10pt;
    margin-left: 6;
}
p.feedbackarea
{
    width:expression(document.body.clientWidth-27);
    font-size:100%;
    background-color: #D4DFFF;
}

input#submitFeedback
{
    font-size:100%; 
    text-align:center;
    /*background-color:#D4DFFF; */
}
 
span#feedbackarea 
{
/*	
	background-color: #D4DFFF;
	color: #003399;
   	border-color:#C8CDDE;
*/
	width:100%;
}
div#feedbackarea
{
	/*background-color: #D4DFFF;
	color: #003399;*/
	width:100%;
}
span.filterOnHover
{
 	color: #E85F17;
}
span.filter
{
	color: #0000FF;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Mozilla Public License 1.1 (MPL 1.1)


Written By
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions