From 36bb22dd81eeadb2a5f47dcf46b3e5a7a86d2e91 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 3 Aug 2026 08:52:46 -0700 Subject: [PATCH 1/6] Delete or upgrade 3 remaining .NET Fx projects (#12925) --- .../Overview/customissuertokenresolver.cs | 70 --- .../Overview/properties/assemblyinfo.cs | 36 -- .../SecurityToken/Overview/simplewebtoken.cs | 201 ------- .../Overview/simplewebtoken.csproj | 62 -- .../Overview/simplewebtokenconstants.cs | 30 - .../Overview/simplewebtokenhandler.cs | 546 ------------------ .../simplewebtokenkeyidentifierclause.cs | 55 -- .../Overview/Configuration/AssemblyInfo.cs | 29 - .../Configuration/Resources.Designer.cs | 63 -- .../Overview/Configuration/Resources.resx | 117 ---- .../Overview/Configuration/Settings.cs | 42 -- .../Overview/Form1.Designer.cs | 245 -------- .../Overview/Form1.cs | 342 ----------- .../Overview/Form1.resx | 123 ---- .../Overview/HtmlWindowProjectCSharp.csproj | 79 --- .../Overview/Program.cs | 19 - .../Overview/app.config | 3 - .../Overview/snippets.5000.json | 3 - .../System/Decimal/Parse/Default.aspx.cs | 24 +- .../System/Decimal/Parse/parsemethod.csproj | 47 +- .../Overview/Form1.Designer.vb | 236 -------- .../Overview/Form1.resx | 117 ---- .../Overview/Form1.vb | 333 ----------- .../Overview/HtmlWindowProject.vbproj | 9 - .../Overview/My Project/MyEvents.vb | 15 - .../Overview/My Project/MyResources.resx | 117 ---- .../Overview/My Project/MyResources.vb | 61 -- .../Overview/My Project/MySettings.settings | 7 - .../Overview/My Project/MySettings.vb | 38 -- .../Overview/app.config | 25 - .../SecurityToken.xml | 46 -- .../HtmlElementErrorEventArgs.xml | 25 +- xml/System.Windows.Forms/HtmlWindow.xml | 128 +--- .../HtmlWindowCollection.xml | 8 - 34 files changed, 26 insertions(+), 3275 deletions(-) delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/customissuertokenresolver.cs delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/properties/assemblyinfo.cs delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.csproj delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenhandler.cs delete mode 100644 snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenkeyidentifierclause.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/AssemblyInfo.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.Designer.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.resx delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Settings.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProjectCSharp.csproj delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Program.cs delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config delete mode 100644 snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/snippets.5000.json delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProject.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyEvents.vb delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.resx delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.vb delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.settings delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.vb delete mode 100644 snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/customissuertokenresolver.cs b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/customissuertokenresolver.cs deleted file mode 100644 index 10616558129..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/customissuertokenresolver.cs +++ /dev/null @@ -1,70 +0,0 @@ -//----------------------------------------------------------------------------- -// -// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -// PARTICULAR PURPOSE. -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// -//----------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.IdentityModel.Tokens; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml; - -namespace SimpleWebToken -{ - public class CustomIssuerTokenResolver : IssuerTokenResolver - { - private Dictionary _keys; - - public CustomIssuerTokenResolver() - { - _keys = new Dictionary(); - } - - public void AddAudienceKeyPair(string audience, string symmetricKey) - { - _keys.Add(audience, symmetricKey); - } - - public override void LoadCustomConfiguration(System.Xml.XmlNodeList nodelist) - { - foreach (XmlNode node in nodelist) - { - XmlDictionaryReader rdr = XmlDictionaryReader.CreateDictionaryReader(new XmlTextReader(new StringReader(node.OuterXml))); - rdr.MoveToContent(); - - string symmetricKey = rdr.GetAttribute("symmetricKey"); - string audience = rdr.GetAttribute("audience"); - - this.AddAudienceKeyPair(audience, symmetricKey); - } - } - - protected override bool TryResolveSecurityKeyCore(SecurityKeyIdentifierClause keyIdentifierClause, out SecurityKey key) - { - key = null; - SimpleWebTokenKeyIdentifierClause keyClause = keyIdentifierClause as SimpleWebTokenKeyIdentifierClause; - if (keyClause != null) - { - string base64Key = null; - _keys.TryGetValue(keyClause.Audience, out base64Key); - if (!string.IsNullOrEmpty(base64Key)) - { - key = new InMemorySymmetricSecurityKey(Encoding.UTF8.GetBytes(base64Key)); - return true; - } - } - - return false; - } - } -} diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/properties/assemblyinfo.cs b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/properties/assemblyinfo.cs deleted file mode 100644 index 1e8514c1a34..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/properties/assemblyinfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SimpleWebToken")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("SimpleWebToken")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("84f7a631-7291-4e81-8b37-cbd03eae1ae8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs deleted file mode 100644 index 340538d6c93..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs +++ /dev/null @@ -1,201 +0,0 @@ -//----------------------------------------------------------------------------- -// -// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -// PARTICULAR PURPOSE. -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// -//----------------------------------------------------------------------------- -// -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.IdentityModel.Tokens; - -namespace SimpleWebToken -{ - /// - /// This class represents the token format for the SimpleWebToken. - /// - public class SimpleWebToken : SecurityToken - { - // - public static DateTime SwtBaseTime = new DateTime( 1970, 1, 1, 0, 0, 0, 0 ); // per SWT psec - - NameValueCollection _properties; - // - string _serializedToken; - - /// - /// Initializes a new instance of the class. - /// This is an internal constructor that is only called from the when reading a token received from the wire. - /// - /// The collection representing all the key value pairs in the token. - /// The serialized form of the token. - internal SimpleWebToken( NameValueCollection properties, string serializedToken ) - : this(properties) - { - _serializedToken = serializedToken; - } - - /// - /// Initializes a new instance of the class. - /// - /// The collection representing all the key value pairs in the token. - public SimpleWebToken( NameValueCollection properties ) - { - if ( properties == null ) - { - throw new ArgumentNullException( "properties" ); - } - - _properties = properties; - } - - // - /// - /// Gets the Id of the token. - /// - /// The Id of the token. - public override string Id - { - get - { - return _properties[SimpleWebTokenConstants.Id]; - } - } - // - - // - /// - /// Gets the keys associated with this token. - /// - /// The keys associated with this token. - public override ReadOnlyCollection SecurityKeys - { - get - { - return new ReadOnlyCollection( new List() ); - } - } - // - - // - /// - /// Gets the time from when the token is valid. - /// - /// The time from when the token is valid. - public override DateTime ValidFrom - { - get - { - string validFrom = _properties[SimpleWebTokenConstants.ValidFrom]; - return GetTimeAsDateTime( String.IsNullOrEmpty( validFrom ) ? "0" : validFrom ); - } - } - // - - // - /// - /// Gets the time when the token expires. - /// - /// The time up to which the token is valid. - public override DateTime ValidTo - { - get - { - string expiryTime = _properties[SimpleWebTokenConstants.ExpiresOn]; - return GetTimeAsDateTime( String.IsNullOrEmpty( expiryTime ) ? "0" : expiryTime ); - } - } - // - - /// - /// Gets the Audience for the token. - /// - /// The audience of the token. - public string Audience - { - get - { - return _properties[SimpleWebTokenConstants.Audience]; - } - } - - /// - /// Gets the Issuer for the token. - /// - /// The issuer for the token. - public string Issuer - { - get - { - return _properties[SimpleWebTokenConstants.Issuer]; - } - } - - /// - /// Gets the signature for the token. - /// - /// The signature for the token. - public string Signature - { - get - { - return _properties[SimpleWebTokenConstants.Signature]; - } - } - - /// - /// Gets the serialized form of the token if the token was created from its serialized form by the token handler. - /// - /// The serialized form of the token. - public string SerializedToken - { - get - { - return _serializedToken; - } - } - - /// - /// Creates a copy of all key value pairs of the token. - /// - /// A copy of all the key value pairs in the token. - public NameValueCollection GetAllProperties() - { - return new NameValueCollection( _properties ); - } - - // - /// - /// Converts the time in seconds to a object based on the base time - /// defined by the Simple Web Token. - /// - /// The time in seconds. - /// The time as a object. - protected virtual DateTime GetTimeAsDateTime( string expiryTime ) - { - long totalSeconds = 0; - if ( !long.TryParse( expiryTime, out totalSeconds ) ) - { - throw new SecurityTokenException("Invalid expiry time. Expected the time to be in seconds passed from 1 January 1970."); - } - - long maxSeconds = (long)( DateTime.MaxValue - SwtBaseTime ).TotalSeconds - 1; - if ( totalSeconds > maxSeconds ) - { - totalSeconds = maxSeconds; - } - - return SwtBaseTime.AddSeconds( totalSeconds ); - } - // - } -} - -// diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.csproj b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.csproj deleted file mode 100644 index e85fd32f9b2..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.csproj +++ /dev/null @@ -1,62 +0,0 @@ - - - - - Debug - AnyCPU - {6F39A351-52CC-42DB-B67C-C88EDA7B6ED2} - Library - Properties - SimpleWebToken - SimpleWebToken - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs deleted file mode 100644 index 3ba84bc105e..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs +++ /dev/null @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// -// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -// PARTICULAR PURPOSE. -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// -//----------------------------------------------------------------------------- - -namespace SimpleWebToken -{ - // - /// - /// Defines the set of constants for the Simple Web Token. - /// - public static class SimpleWebTokenConstants - { - public const string Audience = "Audience"; - public const string ExpiresOn = "ExpiresOn"; - public const string Id = "Id"; - public const string Issuer = "Issuer"; - public const string Signature = "HMACSHA256"; - public const string ValidFrom = "ValidFrom"; - public const string ValueTypeUri = "http://schemas.xmlsoap.org/ws/2009/11/swt-token-profile-1.0"; - } - // -} diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenhandler.cs b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenhandler.cs deleted file mode 100644 index 4ac5a7f2e1c..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenhandler.cs +++ /dev/null @@ -1,546 +0,0 @@ -//----------------------------------------------------------------------------- -// -// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -// PARTICULAR PURPOSE. -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// -//----------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; -using System.Configuration; -using System.Globalization; -using System.IdentityModel.Selectors; -using System.IdentityModel.Tokens; -using System.Security.Claims; -using System.Security.Cryptography; -using System.Text; -using System.Web; -using System.Xml; - -namespace SimpleWebToken -{ - /// - /// This class can parse and validate a Simple Web Token received on the incoming request. - /// - public class SimpleWebTokenHandler : SecurityTokenHandler - { - public const string SimpleWebTokenTypeUri = "http://schemas.xmlsoap.org/ws/2009/11/swt-token-profile-1.0"; - - const string Base64EncodingType = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"; - const string EncodingType = "EncodingType"; - const string DefaultNameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"; - const string AcsNameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"; - const char ParameterSeparator = '&'; - const string BinarySecurityToken = "binarySecurityToken"; - const string ValueType = "valueType"; - - /// - /// Initializes a new instance of the class. - /// - public SimpleWebTokenHandler() - { - } - - /// - /// Gets the System.Type of the SecurityToken is supported by ththis handler. - /// - /// The System.Type of the SecurityToken is supported by ththis handler. - public override Type TokenType - { - get - { - return typeof( SimpleWebToken ); - } - } - - /// - /// Indicates whether the current XML element can be read as a token of the type handled by this instance. - /// - /// An XML reader positioned at a start element. The reader should not be advanced. - /// True if the ReadToken method can the element. - public override bool CanReadToken( XmlReader reader ) - { - bool canRead = false; - - if ( reader != null ) - { - if ( reader.IsStartElement( BinarySecurityToken) - && ( reader.GetAttribute( ValueType ) == SimpleWebTokenConstants.ValueTypeUri ) ) - { - canRead = true; - } - } - - return canRead; - } - - /// - /// Gets a value indicating whether this handler can validate tokens of type . - /// - /// True if this handler can validate the token of type . - public override bool CanValidateToken - { - get - { - return true; - } - } - - /// - /// Gets a value indicating whether the SecurityTokenHandler can Serialize Tokens. Return true by default. - /// - /// True is the handler can serialize tokens of type . - public override bool CanWriteToken - { - get - { - return true; - } - } - - public override SecurityToken CreateToken(SecurityTokenDescriptor tokenDescriptor) - { - if (tokenDescriptor == null) - { - throw new ArgumentNullException("tokenDescriptor"); - } - - NameValueCollection properties = new NameValueCollection(); - properties.Add(SimpleWebTokenConstants.Id, Guid.NewGuid().ToString()); - properties.Add(SimpleWebTokenConstants.Issuer, tokenDescriptor.TokenIssuerName); - properties.Add(SimpleWebTokenConstants.Audience, tokenDescriptor.AppliesToAddress); - properties.Add(SimpleWebTokenConstants.ExpiresOn, SecondsFromSwtBaseTime(tokenDescriptor.Lifetime.Expires)); - properties.Add(SimpleWebTokenConstants.ValidFrom, SecondsFromSwtBaseTime(tokenDescriptor.Lifetime.Created)); - - foreach (Claim claim in tokenDescriptor.Subject.Claims) - { - properties.Add(claim.Type, claim.Value); - } - - SimpleWebToken token = new SimpleWebToken(properties); - return token; - } - - private string SecondsFromSwtBaseTime(DateTime? time) - { - DateTime date = time ?? SimpleWebToken.SwtBaseTime; - TimeSpan t1 = date.Subtract(SimpleWebToken.SwtBaseTime); - string seconds = ((long)t1.TotalSeconds).ToString(); - - return seconds; - } - - public override SecurityKeyIdentifierClause CreateSecurityTokenReference(SecurityToken token, bool attached) - { - return token.CreateKeyIdentifierClause(); - } - - /// - /// Returns the simple web token's token type that is supported by this handler. - /// - /// A list of supported token type identifiers. - public override string[] GetTokenTypeIdentifiers() - { - return new string[] { SimpleWebTokenTypeUri }; - } - - /// - /// Reads a serialized token and converts it into a . - /// - /// An XML reader positioned at the token's start element. - /// The parsed form of the token. - public override SecurityToken ReadToken( XmlReader reader ) - { - if ( reader == null ) - { - throw new ArgumentNullException( "reader" ); - } - - XmlDictionaryReader dictionaryReader = XmlDictionaryReader.CreateDictionaryReader(reader); - - byte[] binaryData; - string encoding = dictionaryReader.GetAttribute( EncodingType ); - if ( encoding == null || encoding == Base64EncodingType ) - { - dictionaryReader.Read(); - binaryData = dictionaryReader.ReadContentAsBase64(); - } - else - { - throw new SecurityTokenException( - "Cannot read SecurityToken as its encoding is" + encoding + ". Expected a BinarySecurityToken with base64 encoding."); - } - - string serializedToken = Encoding.UTF8.GetString(binaryData); - - return ReadSecurityTokenFromString(serializedToken); - } - - /// - /// Parse the string token and generates a . - /// - /// The serialized form of the token received. - /// The parsed form of the token. - protected SecurityToken ReadSecurityTokenFromString( string serializedToken ) - { - if (String.IsNullOrEmpty(serializedToken)) - { - throw new ArgumentException("The parameter 'serializedToken' cannot be null or empty string."); - } - - // Create a collection of SWT name value pairs - NameValueCollection properties = ParseToken( serializedToken ); - SimpleWebToken swt = new SimpleWebToken( properties, serializedToken ); - - return swt; - } - - /// - /// This methos validates the Simple Web Token. - /// - /// A simple web token. - /// A Claims Collection which contains all the claims from the token. - public override ReadOnlyCollection ValidateToken(SecurityToken token) - { - if ( token == null ) - { - throw new ArgumentNullException( "token" ); - } - - SimpleWebToken simpleWebToken = token as SimpleWebToken; - if ( simpleWebToken == null ) - { - throw new ArgumentException("The token provided must be of type SimpleWebToken."); - } - - if ( DateTime.Compare( simpleWebToken.ValidTo.Add( Configuration.MaxClockSkew ), DateTime.UtcNow ) <= 0 ) - { - throw new SecurityTokenExpiredException("The incoming token has expired. Get a new access token from the Authorization Server."); - } - - ValidateSignature( simpleWebToken ); - - ValidateAudience( simpleWebToken.Audience ); - - ClaimsIdentity claimsIdentity = CreateClaims( simpleWebToken ); - - if (this.Configuration.SaveBootstrapContext) - { - claimsIdentity.BootstrapContext = new BootstrapContext(simpleWebToken.SerializedToken); - } - - List claimCollection = new List(new ClaimsIdentity[] { claimsIdentity }); - return claimCollection.AsReadOnly(); - } - - /// - /// Serializes the given SecurityToken to the XmlWriter. - /// - /// XmlWriter into which the token is serialized. - /// SecurityToken to be serialized. - public override void WriteToken( XmlWriter writer, SecurityToken token ) - { - SimpleWebToken simpleWebToken = token as SimpleWebToken; - if ( simpleWebToken == null ) - { - throw new SecurityTokenException("The given token is not of the expected type 'SimpleWebToken'."); - } - - string signedToken = null; - - if ( String.IsNullOrEmpty( simpleWebToken.SerializedToken ) ) - { - StringBuilder strBuilder = new StringBuilder(); - - bool skipDelimiter = true; - NameValueCollection tokenProperties = simpleWebToken.GetAllProperties(); - - // remove the signature if present - if ( String.IsNullOrEmpty( tokenProperties[SimpleWebTokenConstants.Signature] ) ) - { - tokenProperties.Remove( SimpleWebTokenConstants.Signature ); - } - - foreach ( string key in tokenProperties.Keys ) - { - if ( tokenProperties[key] != null ) - { - if ( !skipDelimiter ) - { - strBuilder.Append( ParameterSeparator ); - } - - strBuilder.Append( String.Format( - CultureInfo.InvariantCulture, - "{0}={1}", - HttpUtility.UrlEncode( key ), - HttpUtility.UrlEncode( tokenProperties[key] ) ) ); - - skipDelimiter = false; - } - } - - string serializedToken = strBuilder.ToString(); - - SimpleWebTokenKeyIdentifierClause clause = new SimpleWebTokenKeyIdentifierClause(simpleWebToken.Audience); - InMemorySymmetricSecurityKey securityKey = null; - try - { - securityKey = (InMemorySymmetricSecurityKey)this.Configuration.IssuerTokenResolver.ResolveSecurityKey(clause); - } - catch (InvalidOperationException) - { - throw new SecurityTokenValidationException("A Symmetric key was not found for the given key identifier clause."); - } - - // append the signature - string signature = GenerateSignature( serializedToken, securityKey.GetSymmetricKey() ); - strBuilder.Append( String.Format( - CultureInfo.InvariantCulture, - "{0}{1}={2}", - ParameterSeparator, - HttpUtility.UrlEncode( SimpleWebTokenConstants.Signature ), - HttpUtility.UrlEncode( signature ) ) ); - - signedToken = strBuilder.ToString(); - } - else - { - // reuse the stored serialized token if present - signedToken = simpleWebToken.SerializedToken; - } - - string encodedToken = Convert.ToBase64String( Encoding.UTF8.GetBytes( signedToken ) ); - writer.WriteStartElement(BinarySecurityToken); - writer.WriteAttributeString("Id", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", token.Id); - writer.WriteAttributeString( ValueType, SimpleWebTokenConstants.ValueTypeUri ); - writer.WriteAttributeString( EncodingType, Base64EncodingType ); - writer.WriteString( encodedToken ); - writer.WriteEndElement(); - } - - /// - /// Generates an HMACSHA256 signature for a given string and key. - /// - /// The token to be signed. - /// The key used to generate the signature. - /// The generated signature. - protected static string GenerateSignature(string unsignedToken, byte[] signingKey) - { - using (HMACSHA256 hmac = new HMACSHA256(signingKey)) - { - byte[] signatureBytes = hmac.ComputeHash(Encoding.ASCII.GetBytes(unsignedToken)); - string signature = HttpUtility.UrlEncode(Convert.ToBase64String(signatureBytes)); - - return signature; - } - } - - /// - /// Validates the signature on the incoming token. - /// - /// The incoming . - protected virtual void ValidateSignature( SimpleWebToken simpleWebToken ) - { - if ( simpleWebToken == null ) - { - throw new ArgumentNullException( "simpleWebToken" ); - } - - if ( String.IsNullOrEmpty( simpleWebToken.SerializedToken ) || String.IsNullOrEmpty( simpleWebToken.Signature ) ) - { - throw new SecurityTokenValidationException( "The token does not have a signature to verify" ); - } - - string serializedToken = simpleWebToken.SerializedToken; - string unsignedToken = null; - - // Find the last parameter. The signature must be last per SWT specification. - int lastSeparator = serializedToken.LastIndexOf( ParameterSeparator ); - - // Check whether the last parameter is an hmac. - if ( lastSeparator > 0 ) - { - string lastParamStart = ParameterSeparator + SimpleWebTokenConstants.Signature + "="; - string lastParam = serializedToken.Substring( lastSeparator ); - - // Strip the trailing hmac to obtain the original unsigned string for later hmac verification. - if ( lastParam.StartsWith( lastParamStart, StringComparison.Ordinal ) ) - { - unsignedToken = serializedToken.Substring( 0, lastSeparator ); - } - } - - SimpleWebTokenKeyIdentifierClause clause = new SimpleWebTokenKeyIdentifierClause(simpleWebToken.Audience); - InMemorySymmetricSecurityKey securityKey = null; - try - { - securityKey = (InMemorySymmetricSecurityKey)this.Configuration.IssuerTokenResolver.ResolveSecurityKey(clause); - } - catch (InvalidOperationException) - { - throw new SecurityTokenValidationException( "A Symmetric key was not found for the given key identifier clause."); - } - - string generatedSignature = GenerateSignature( unsignedToken, securityKey.GetSymmetricKey() ); - - if ( string.CompareOrdinal( generatedSignature, simpleWebToken.Signature ) != 0 ) - { - throw new SecurityTokenValidationException( "The signature on the incoming token is invalid.") ; - } - } - - /// - /// Validates the audience of the incoming token with those specified in configuration. - /// - /// The audience of the incoming token. - protected virtual void ValidateAudience( string tokenAudience ) - { - if ( Configuration.AudienceRestriction.AudienceMode != AudienceUriMode.Never ) - { - if ( String.IsNullOrEmpty( tokenAudience ) ) - { - throw new SecurityTokenValidationException("The incoming token does not have a valid audience Uri and the Audience Restriction is not set to 'None'."); - } - - if ( Configuration.AudienceRestriction.AllowedAudienceUris.Count == 0 ) - { - throw new InvalidOperationException( " Audience Restriction is not set to 'None' but no valid audience URI's are configured." ); - } - - IList allowedAudienceUris = Configuration.AudienceRestriction.AllowedAudienceUris; - - Uri audienceUri = null; - - Uri.TryCreate(tokenAudience, UriKind.RelativeOrAbsolute, out audienceUri); - - // Strip off any query string or fragment. - Uri audienceLeftPart; - - if ( audienceUri.IsAbsoluteUri ) - { - audienceLeftPart = new Uri( audienceUri.GetLeftPart( UriPartial.Path ) ); - } - else - { - Uri baseUri = new Uri( "http://www.example.com" ); - Uri resolved = new Uri( baseUri, tokenAudience ); - audienceLeftPart = baseUri.MakeRelativeUri( new Uri( resolved.GetLeftPart( UriPartial.Path ) ) ); - } - - if ( !allowedAudienceUris.Contains( audienceLeftPart ) ) - { - throw new AudienceUriValidationFailedException( - "The Audience Uri of the incoming token is not present in the list of permitted Audience Uri's."); - } - } - } - - /// - /// Parses the token into a collection. - /// - /// The serialized token. - /// A colleciton of all name-value pairs from the token. - NameValueCollection ParseToken( string encodedToken ) - { - if ( String.IsNullOrEmpty( encodedToken ) ) - { - throw new ArgumentException( "The parameter 'encodedToken' cannot be null or empty string."); - } - - NameValueCollection keyValuePairs = new NameValueCollection(); - foreach ( string nameValue in encodedToken.Split( ParameterSeparator ) ) - { - string[] keyValueArray = nameValue.Split( '=' ); - - if ( ( keyValueArray.Length < 2 ) || String.IsNullOrEmpty( keyValueArray[0] ) ) - { - throw new SecurityTokenException("The incoming token was not in an expected format."); - } - - // Names must be decoded for the claim type case - string key = HttpUtility.UrlDecode( keyValueArray[0].Trim() ); - - // remove any unwanted " - string value = HttpUtility.UrlDecode( keyValueArray[1].Trim().Trim( '"' ) ); - keyValuePairs.Add( key, value ); - } - - return keyValuePairs; - } - - /// Creates 's from the incoming token. - /// - /// The incoming . - /// A created from the token. - protected virtual ClaimsIdentity CreateClaims( SimpleWebToken simpleWebToken ) - { - if ( simpleWebToken == null ) - { - throw new ArgumentNullException( "simpleWebToken" ); - } - - NameValueCollection tokenProperties = simpleWebToken.GetAllProperties(); - if ( tokenProperties == null ) - { - throw new SecurityTokenValidationException( "No claims can be created from this Simple Web Token." ); - } - - if ( Configuration.IssuerNameRegistry == null ) - { - throw new InvalidOperationException( "The Configuration.IssuerNameRegistry property of this SecurityTokenHandler is set to null. Tokens cannot be validated in this state." ); - } - - string normalizedIssuer = Configuration.IssuerNameRegistry.GetIssuerName( simpleWebToken ); - - ClaimsIdentity identity = new ClaimsIdentity(AuthenticationTypes.Federation); - - foreach ( string key in tokenProperties.Keys ) - { - if ( ! IsReservedKeyName(key) && !string.IsNullOrEmpty( tokenProperties[key] ) ) - { - identity.AddClaim( new Claim( key, tokenProperties[key], ClaimValueTypes.String, normalizedIssuer ) ); - if ( key == AcsNameClaimType ) - { - // add a default name claim from the Name identifier claim. - identity.AddClaim( new Claim( DefaultNameClaimType, tokenProperties[key], ClaimValueTypes.String, normalizedIssuer ) ); - } - } - } - - return identity; - } - - /// - /// Used to determine whether the parameter claim type is one of the reserved - /// SimpleWebToken claim types: Audience, HMACSHA256, ExpiresOn or Issuer. - /// - /// The key name to be compared. - /// True if the key is a reserved key name. - protected virtual bool IsReservedKeyName( string keyName ) - { - if ( String.IsNullOrEmpty( keyName ) ) - { - throw new ArgumentNullException( "keyName" ); - } - - switch ( keyName ) - { - case SimpleWebTokenConstants.Audience: - case SimpleWebTokenConstants.ExpiresOn: - case SimpleWebTokenConstants.Id: - case SimpleWebTokenConstants.Issuer: - case SimpleWebTokenConstants.ValidFrom: - case SimpleWebTokenConstants.Signature: return true; - default: return false; - } - } - } -} diff --git a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenkeyidentifierclause.cs b/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenkeyidentifierclause.cs deleted file mode 100644 index 6ba170b5d18..00000000000 --- a/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenkeyidentifierclause.cs +++ /dev/null @@ -1,55 +0,0 @@ -//----------------------------------------------------------------------------- -// -// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -// PARTICULAR PURPOSE. -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// -//----------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.IdentityModel.Tokens; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SimpleWebToken -{ - public class SimpleWebTokenKeyIdentifierClause : SecurityKeyIdentifierClause - { - const string localId="SimpleWebToken"; - private string _audience; - - public SimpleWebTokenKeyIdentifierClause(string audience ) - :base (localId) - { - if (audience == null) - { - throw new ArgumentNullException("audience"); - } - _audience = audience; - } - - public string Audience - { - get - { - return _audience; - } - } - - public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) - { - if (keyIdentifierClause is SimpleWebTokenKeyIdentifierClause) - { - return true; - } - - return false; - } - } -} diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/AssemblyInfo.cs b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/AssemblyInfo.cs deleted file mode 100644 index 84aa55ed67a..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HtmlWindowProjectCSharp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("MS")] -[assembly: AssemblyProduct("HtmlWindowProjectCSharp")] -[assembly: AssemblyCopyright("Copyright @ MS 2004")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -/// Setting ComVisible to false makes the types in this assembly not visible -/// to COM componenets. If you need to access a type in this assembly from -/// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.Designer.cs b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.Designer.cs deleted file mode 100644 index f41ebafa5aa..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace HtmlWindowProjectCSharp.Configuration { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HtmlWindowProjectCSharp.Configuration.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.resx b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.resx deleted file mode 100644 index 3e18af958a2..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Settings.cs b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Settings.cs deleted file mode 100644 index 36898c4e614..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Configuration/Settings.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.40930.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace HtmlWindowProjectCSharp.Configuration -{ - public partial class Settings : System.Configuration.ApplicationSettingsBase - { - private static Settings m_Value; - - private static object m_SyncObject = new object(); - - public static Settings Value - { - get - { - if ((Settings.m_Value == null)) - { - System.Threading.Monitor.Enter(Settings.m_SyncObject); - if ((Settings.m_Value == null)) - { - try - { - Settings.m_Value = new Settings(); - } - finally - { - System.Threading.Monitor.Exit(Settings.m_SyncObject); - } - } - } - return Settings.m_Value; - } - } - } -} diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.cs b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.cs deleted file mode 100644 index d6d6e946704..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System; - -namespace HtmlWindowProjectCSharp -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.getLinksFromFramesButton = new System.Windows.Forms.Button(); - this.ShowModalDialogButton = new System.Windows.Forms.Button(); - this.OpenNewWindowOverBrowserButton = new System.Windows.Forms.Button(); - this.SetWindowStatusButton = new System.Windows.Forms.Button(); - this.resetFramesButton = new System.Windows.Forms.Button(); - this.balanceWindowButton = new System.Windows.Forms.Button(); - this.LoadOrderFormButton = new System.Windows.Forms.Button(); - this.OpenThreeWindowsButton = new System.Windows.Forms.Button(); - this.displayFirstUrlButton = new System.Windows.Forms.Button(); - this.displaySecondUrlButton = new System.Windows.Forms.Button(); - this.enableClickScrollButton = new System.Windows.Forms.Button(); - this.ResizeWindowButton = new System.Windows.Forms.Button(); - this.suppressScriptErrorButton = new System.Windows.Forms.Button(); - this.webBrowser1 = new System.Windows.Forms.WebBrowser(); - this.windowTimeout = new System.Windows.Forms.Timer(this.components); - this.button1 = new System.Windows.Forms.Button(); - this.flowLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.getLinksFromFramesButton); - this.flowLayoutPanel1.Controls.Add(this.ShowModalDialogButton); - this.flowLayoutPanel1.Controls.Add(this.OpenNewWindowOverBrowserButton); - this.flowLayoutPanel1.Controls.Add(this.SetWindowStatusButton); - this.flowLayoutPanel1.Controls.Add(this.resetFramesButton); - this.flowLayoutPanel1.Controls.Add(this.balanceWindowButton); - this.flowLayoutPanel1.Controls.Add(this.LoadOrderFormButton); - this.flowLayoutPanel1.Controls.Add(this.OpenThreeWindowsButton); - this.flowLayoutPanel1.Controls.Add(this.displayFirstUrlButton); - this.flowLayoutPanel1.Controls.Add(this.displaySecondUrlButton); - this.flowLayoutPanel1.Controls.Add(this.enableClickScrollButton); - this.flowLayoutPanel1.Controls.Add(this.ResizeWindowButton); - this.flowLayoutPanel1.Controls.Add(this.suppressScriptErrorButton); - this.flowLayoutPanel1.Controls.Add(this.button1); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(896, 182); - this.flowLayoutPanel1.TabIndex = 0; - // - // getLinksFromFramesButton - // - this.getLinksFromFramesButton.Location = new System.Drawing.Point(3, 3); - this.getLinksFromFramesButton.Name = "getLinksFromFramesButton"; - this.getLinksFromFramesButton.Size = new System.Drawing.Size(166, 23); - this.getLinksFromFramesButton.TabIndex = 0; - this.getLinksFromFramesButton.Text = "Get Links From Frames"; - this.getLinksFromFramesButton.Click += new System.EventHandler(this.getLinksFromFramesButton_Click); - // - // ShowModalDialogButton - // - this.ShowModalDialogButton.Location = new System.Drawing.Point(175, 3); - this.ShowModalDialogButton.Name = "ShowModalDialogButton"; - this.ShowModalDialogButton.Size = new System.Drawing.Size(193, 23); - this.ShowModalDialogButton.TabIndex = 1; - this.ShowModalDialogButton.Text = "Show Modal Dialog"; - this.ShowModalDialogButton.Click += new System.EventHandler(this.ShowModalDialogButton_Click); - // - // OpenNewWindowOverBrowserButton - // - this.OpenNewWindowOverBrowserButton.Location = new System.Drawing.Point(374, 3); - this.OpenNewWindowOverBrowserButton.Name = "OpenNewWindowOverBrowserButton"; - this.OpenNewWindowOverBrowserButton.Size = new System.Drawing.Size(229, 23); - this.OpenNewWindowOverBrowserButton.TabIndex = 2; - this.OpenNewWindowOverBrowserButton.Text = "Open New Window Over Browser"; - this.OpenNewWindowOverBrowserButton.Click += new System.EventHandler(this.OpenNewWindowOverBrowserButton_Click); - // - // SetWindowStatusButton - // - this.SetWindowStatusButton.Location = new System.Drawing.Point(609, 3); - this.SetWindowStatusButton.Name = "SetWindowStatusButton"; - this.SetWindowStatusButton.Size = new System.Drawing.Size(164, 23); - this.SetWindowStatusButton.TabIndex = 3; - this.SetWindowStatusButton.Text = "Set Window Status"; - this.SetWindowStatusButton.Click += new System.EventHandler(this.SetWindowStatusButton_Click); - // - // resetFramesButton - // - this.resetFramesButton.Location = new System.Drawing.Point(3, 32); - this.resetFramesButton.Name = "resetFramesButton"; - this.resetFramesButton.Size = new System.Drawing.Size(142, 23); - this.resetFramesButton.TabIndex = 4; - this.resetFramesButton.Text = "Reset Frames"; - this.resetFramesButton.Click += new System.EventHandler(this.resetFramesButton_Click); - // - // balanceWindowButton - // - this.balanceWindowButton.Location = new System.Drawing.Point(151, 32); - this.balanceWindowButton.Name = "balanceWindowButton"; - this.balanceWindowButton.Size = new System.Drawing.Size(190, 23); - this.balanceWindowButton.TabIndex = 5; - this.balanceWindowButton.Text = "Balance Window"; - this.balanceWindowButton.Click += new System.EventHandler(this.balanceWindowButton_Click); - // - // LoadOrderFormButton - // - this.LoadOrderFormButton.Location = new System.Drawing.Point(347, 32); - this.LoadOrderFormButton.Name = "LoadOrderFormButton"; - this.LoadOrderFormButton.Size = new System.Drawing.Size(175, 23); - this.LoadOrderFormButton.TabIndex = 6; - this.LoadOrderFormButton.Text = "Load Order Form"; - this.LoadOrderFormButton.Click += new System.EventHandler(this.LoadOrderFormButton_Click); - // - // OpenThreeWindowsButton - // - this.OpenThreeWindowsButton.Location = new System.Drawing.Point(528, 32); - this.OpenThreeWindowsButton.Name = "OpenThreeWindowsButton"; - this.OpenThreeWindowsButton.Size = new System.Drawing.Size(168, 23); - this.OpenThreeWindowsButton.TabIndex = 7; - this.OpenThreeWindowsButton.Text = "Open Three Windows"; - this.OpenThreeWindowsButton.Click += new System.EventHandler(this.OpenThreeWindowsButton_Click); - // - // displayFirstUrlButton - // - this.displayFirstUrlButton.Location = new System.Drawing.Point(702, 32); - this.displayFirstUrlButton.Name = "displayFirstUrlButton"; - this.displayFirstUrlButton.Size = new System.Drawing.Size(141, 23); - this.displayFirstUrlButton.TabIndex = 8; - this.displayFirstUrlButton.Text = "Display First URL"; - this.displayFirstUrlButton.Click += new System.EventHandler(this.displayFirstUrlButton_Click); - // - // displaySecondUrlButton - // - this.displaySecondUrlButton.Location = new System.Drawing.Point(3, 61); - this.displaySecondUrlButton.Name = "displaySecondUrlButton"; - this.displaySecondUrlButton.Size = new System.Drawing.Size(166, 23); - this.displaySecondUrlButton.TabIndex = 9; - this.displaySecondUrlButton.Text = "Display Second URL"; - this.displaySecondUrlButton.Click += new System.EventHandler(this.displaySecondUrlButton_Click); - // - // enableClickScrollButton - // - this.enableClickScrollButton.Location = new System.Drawing.Point(175, 61); - this.enableClickScrollButton.Name = "enableClickScrollButton"; - this.enableClickScrollButton.Size = new System.Drawing.Size(166, 23); - this.enableClickScrollButton.TabIndex = 10; - this.enableClickScrollButton.Text = "Enable Click Scroll"; - this.enableClickScrollButton.Click += new System.EventHandler(this.enableClickScrollButton_Click); - // - // ResizeWindowButton - // - this.ResizeWindowButton.Location = new System.Drawing.Point(347, 61); - this.ResizeWindowButton.Name = "ResizeWindowButton"; - this.ResizeWindowButton.Size = new System.Drawing.Size(152, 23); - this.ResizeWindowButton.TabIndex = 11; - this.ResizeWindowButton.Text = "Resize Window"; - this.ResizeWindowButton.Click += new System.EventHandler(this.ResizeWindowButton_Click); - // - // suppressScriptErrorButton - // - this.suppressScriptErrorButton.Location = new System.Drawing.Point(505, 61); - this.suppressScriptErrorButton.Name = "suppressScriptErrorButton"; - this.suppressScriptErrorButton.Size = new System.Drawing.Size(191, 23); - this.suppressScriptErrorButton.TabIndex = 12; - this.suppressScriptErrorButton.Text = "Suppress Script Error"; - this.suppressScriptErrorButton.Click += new System.EventHandler(this.suppressScriptErrorButton_Click); - // - // webBrowser1 - // - this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; - this.webBrowser1.Location = new System.Drawing.Point(0, 182); - this.webBrowser1.Name = "webBrowser1"; - this.webBrowser1.Size = new System.Drawing.Size(896, 361); - this.webBrowser1.TabIndex = 1; - this.webBrowser1.Url = new System.Uri("file://C:\\\\testStatusBarText.htm", System.UriKind.Absolute); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(702, 61); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(141, 23); - this.button1.TabIndex = 13; - this.button1.Text = "Surf to error"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // Form1 - // - this.ClientSize = new System.Drawing.Size(896, 543); - this.Controls.Add(this.webBrowser1); - this.Controls.Add(this.flowLayoutPanel1); - this.Name = "Form1"; - this.Text = "Form1"; - this.flowLayoutPanel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Button getLinksFromFramesButton; - private System.Windows.Forms.WebBrowser webBrowser1; - private System.Windows.Forms.Button ShowModalDialogButton; - private System.Windows.Forms.Button OpenNewWindowOverBrowserButton; - private System.Windows.Forms.Button SetWindowStatusButton; - private System.Windows.Forms.Button resetFramesButton; - private System.Windows.Forms.Button balanceWindowButton; - private System.Windows.Forms.Timer windowTimeout; - private System.Windows.Forms.Button LoadOrderFormButton; - private System.Windows.Forms.Button OpenThreeWindowsButton; - private System.Windows.Forms.Button displayFirstUrlButton; - private System.Windows.Forms.Button displaySecondUrlButton; - private System.Windows.Forms.Button enableClickScrollButton; - private System.Windows.Forms.Button ResizeWindowButton; - private System.Windows.Forms.Button suppressScriptErrorButton; - private System.Windows.Forms.Button button1; - } -} - diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs deleted file mode 100644 index 9583814b652..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs +++ /dev/null @@ -1,342 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Windows.Forms; -using System.Collections; - -namespace HtmlWindowProjectCSharp -{ - partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - - private void getLinksFromFramesButton_Click(object sender, EventArgs e) - { - GetLinksFromFrames(); - } - - // - private void GetLinksFromFrames() - { - Hashtable linksTable = new Hashtable(); - string frameUrl; - - if (!(webBrowser1.Document == null)) - { - HtmlWindow currentWindow = webBrowser1.Document.Window; - if (currentWindow.Frames.Count > 0) - { - foreach (HtmlWindow frame in currentWindow.Frames) - { - frameUrl = frame.Url.ToString(); - Hashtable frameLinksHash = new Hashtable(); - - linksTable.Add(frameUrl, frameLinksHash); - foreach (HtmlElement hrefElement in frame.Document.Links) - { - frameLinksHash.Add(hrefElement.GetAttribute("HREF"), "Url"); - } - } - } - else - { - Hashtable docLinksHash = new Hashtable(); - linksTable.Add(webBrowser1.Document.Url.ToString(), docLinksHash); - - foreach (HtmlElement hrefElement in webBrowser1.Document.Links) - { - docLinksHash.Add(hrefElement.GetAttribute("HREF"), "Url"); - } - } - } - } - // - - private void ShowModalDialogButton_Click(object sender, EventArgs e) - { - ShowModalDialog(); - } - - // - private void ShowModalDialog() - { - if (!(webBrowser1.Document == null)) - { - HtmlWindow frame = webBrowser1.Document.Window; - - String dialogArguments = "dialogHeight: 250px; dialogWidth: 300px; dialogTop: 300px;" + - "dialogLeft: 300px; edge: Sunken; center: Yes; help: Yes; resizable: No; status: No;"; - - // Show the dialog. - mshtml.IHTMLWindow2 rawWindow = (mshtml.IHTMLWindow2)frame.DomWindow; - Object o = new Object(); - Object args = (Object)dialogArguments; - rawWindow.showModalDialog("http://www.adatum.com/dialogWindow.htm", ref o, ref args); - } - } - // - - private void OpenNewWindowOverBrowserButton_Click(object sender, EventArgs e) - { - OpenNewWindowOverBrowser(); - } - - // - private void OpenNewWindowOverBrowser() - { - if (webBrowser1.Document != null) - { - HtmlWindow docWindow = webBrowser1.Document.Window; - HtmlWindow newWindow = docWindow.OpenNew(new Uri("http://www.adatum.com/popup.htm"), "left=" + docWindow.Position.X + ",top=" + docWindow.Position.Y + ",width=" + webBrowser1.Width + ",height=" + webBrowser1.Height); - } - } - // - - private void SetWindowStatusButton_Click(object sender, EventArgs e) - { - SetWindowStatus(); - } - - // - HtmlWindow popWindow = null; - - private void SetWindowStatus() - { - if (webBrowser1.Document != null) - { - HtmlWindow docWindow = webBrowser1.Document.Window; - popWindow = docWindow.OpenNew(new Uri("file://C:\\testStatusBarText.htm"), ""); - popWindow.Load += new HtmlElementEventHandler(popWindow_Load); - } - } - - void popWindow_Load(object sender, HtmlElementEventArgs e) - { - MessageBox.Show("Loaded!"); - } - // - - private void resetFramesButton_Click(object sender, EventArgs e) - { - } - - // - private void ResetFrames() - { - if (!(webBrowser1.Document == null)) - { - HtmlElement frameElement = null; - HtmlWindow docWindow = webBrowser1.Document.Window; - - foreach (HtmlWindow frameWindow in docWindow.Frames) - { - frameElement = frameWindow.WindowFrameElement; - String originalUrl = frameElement.GetAttribute("SRC"); - - if (!originalUrl.Equals(frameWindow.Url.ToString())) - { - frameWindow.Navigate(new Uri(originalUrl)); - } - } - } - } - // - - // - HtmlWindow balanceWindow; - - private void balanceWindowButton_Click(object sender, EventArgs e) - { - if (!(webBrowser1.Document == null)) - { - balanceWindow = webBrowser1.Document.Window.OpenNew(new Uri("http://www.adatum.com/viewBalances.aspx"), "dialogHeight: 250px; dialogWidth: 300px; " + - " dialogTop: 300px; dialogLeft: 300px; edge: Sunken; center: Yes; help: Yes; " + - "resizable: No; status: No;"); - - //Listen for activity on the document. - webBrowser1.Document.Click += new HtmlElementEventHandler(Document_Click); - - windowTimeout.Interval = 300000; - windowTimeout.Start(); - } - } - - private void Document_Click(object sender, HtmlElementEventArgs e) - { - windowTimeout.Stop(); - windowTimeout.Start(); - } - - private void windowTimeout_Tick(object sender, EventArgs e) - { - if (!balanceWindow.IsClosed) - { - balanceWindow.Close(); - windowTimeout.Stop(); - } - } - // - - private void LoadOrderFormButton_Click(object sender, EventArgs e) - { - LoadOrderForm(); - } - - // - HtmlWindow orderWindow; - HtmlElement formElement; - - private void LoadOrderForm() - { - if (!(webBrowser1.Document == null)) - { - HtmlDocument doc = webBrowser1.Document; - orderWindow = doc.Window.OpenNew(new Uri("file://C:\\orderForm.htm"), ""); - - //!TODO: Perform this in the load event handler! - // Get order form. - HtmlElementCollection elemCollection = doc.All.GetElementsByName("NewOrderForm"); - if (elemCollection.Count == 1) - { - formElement = elemCollection[0]; - //!TODO: Awaiting DCR - //formElement.AttachEventHandler("onsubmit", new HtmlElementEventHandler(Form_Submit)); - } - } - } - - private void Form_Submit(object sender, HtmlElementEventArgs e) - { - bool doOrder = orderWindow.Confirm("Once you transmit this order, you cannot cancel it. Submit?"); - if (!doOrder) - { - //Cancel the submit. - e.ReturnValue = false; - orderWindow.Alert("Submit cancelled."); - } - } - // - - private void OpenThreeWindowsButton_Click(object sender, EventArgs e) - { - } - - // - private void DisplayFirstUrl() - { - if (webBrowser1.Document != null) - { - //If this is called first, the window will only have a status bar. - webBrowser1.Document.Window.Open(new Uri("http://www.microsoft.com/"), "displayWindow", "status=yes,width=200,height=400", false); - } - } - - private void DisplaySecondUrl() - { - if (webBrowser1.Document != null) - { - // If this is called first, the window will only have an Address bar. - webBrowser1.Document.Window.Open(new Uri("http://msdn.microsoft.com/"), "displayWindow", "width=400,height=200,location=yes", false); - } - } - // - - private void displayFirstUrlButton_Click(object sender, EventArgs e) - { - DisplayFirstUrl(); - } - - private void displaySecondUrlButton_Click(object sender, EventArgs e) - { - DisplaySecondUrl(); - } - - private void enableClickScrollButton_Click(object sender, EventArgs e) - { - EnableClickScroll(); - } - - // - private void EnableClickScroll() - { - if (webBrowser1.Document != null) - { - webBrowser1.Document.Click += new HtmlElementEventHandler(Doc_Click); - } - } - - private void Doc_Click(object sender, HtmlElementEventArgs e) - { - HtmlWindow docWindow = webBrowser1.Document.Window; - docWindow.ScrollTo(e.MousePosition.X, e.MousePosition.Y); - } - // - - private void ResizeWindowButton_Click(object sender, EventArgs e) - { - ResizeWindow(); - } - - // - HtmlWindow resizableWindow = null; - - private void ResizeWindow() - { - if (webBrowser1.Document != null) - { - resizableWindow = webBrowser1.Document.Window.OpenNew(new Uri("http://www.microsoft.com/"), ""); - resizableWindow.ResizeTo(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); - } - } - // - - private void suppressScriptErrorButton_Click(object sender, EventArgs e) - { - SuppressScriptErrors(); - } - - // - private void SuppressScriptErrors() - { - if (webBrowser1.Document != null) - { - webBrowser1.Document.Window.Error += new HtmlElementErrorEventHandler(scriptWindow_Error); - } - } - - private void scriptWindow_Error(object sender, HtmlElementErrorEventArgs e) - { - MessageBox.Show("Suppressed error!"); - e.Handled = true; - } - // - - // - HtmlWindow restrictedWindow; - - private void OpenRestrictedWindow() - { - if (webBrowser1.Document != null) - { - restrictedWindow = webBrowser1.Document.Window.OpenNew(new Uri("http://www.adatum.com/"), "width=300,height=300,resizable=yes"); - // restrictedWindow.ResizeStart += new HtmlElementEventHandler(restrictedWindow_ResizeStart); - } - } - - private void restrictedWindow_ResizeStart(object sender, HtmlElementEventArgs e) - { - e.ReturnValue = true; - } - - private void button1_Click(object sender, EventArgs e) - { - webBrowser1.Document.Window.Navigate(new Uri("file://C:\\testError.htm")); - } - // - } -} diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx deleted file mode 100644 index 29aa8d8e609..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProjectCSharp.csproj b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProjectCSharp.csproj deleted file mode 100644 index c1f242d0dcc..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProjectCSharp.csproj +++ /dev/null @@ -1,79 +0,0 @@ - - - Debug - AnyCPU - 8.0.41129 - 2.0 - {CD35278B-CFFA-4756-A63C-43333D49493A} - WinExe - HtmlWindowProjectCSharp - HtmlWindowProjectCSharp - 4 - - - - - 2.0 - v4.8 - - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - pdbonly - true - .\bin\Release\ - TRACE - false - - - - - - - - - - - - - True - True - Resources.resx - - - Form - - - Form1.cs - - - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - Form1.cs - Designer - - - - SettingsSingleFileGenerator - Settings.cs - - - True - Settings.settings - True - - - - \ No newline at end of file diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Program.cs b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Program.cs deleted file mode 100644 index c8c19dcee6c..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Program.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace HtmlWindowProjectCSharp -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.Run(new Form1()); - } - } -} \ No newline at end of file diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config deleted file mode 100644 index 3e0e37cfc8c..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/snippets.5000.json b/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/snippets.5000.json deleted file mode 100644 index da9ebf8da2f..00000000000 --- a/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/snippets.5000.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "host": "visualstudio" -} diff --git a/snippets/csharp/System/Decimal/Parse/Default.aspx.cs b/snippets/csharp/System/Decimal/Parse/Default.aspx.cs index 77846da8358..8cc7d6ecd98 100644 --- a/snippets/csharp/System/Decimal/Parse/Default.aspx.cs +++ b/snippets/csharp/System/Decimal/Parse/Default.aspx.cs @@ -1,12 +1,26 @@ using System; using System.Globalization; -using System.Web.UI.WebControls; -public partial class Default2 : System.Web.UI.Page +public partial class Default2 { - // controls on web form - TextBox inputNumber; - Label outputNumber; + private sealed class TextBox + { + public string Text { get; set; } = String.Empty; + } + + private sealed class Label + { + public string Text { get; set; } = String.Empty; + } + + private sealed class RequestContext + { + public string[] UserLanguages { get; } = [CultureInfo.CurrentCulture.Name]; + } + + private readonly TextBox inputNumber = new(); + private readonly Label outputNumber = new(); + private RequestContext Request { get; } = new(); // protected void OkToSingle_Click(object sender, EventArgs e) diff --git a/snippets/csharp/System/Decimal/Parse/parsemethod.csproj b/snippets/csharp/System/Decimal/Parse/parsemethod.csproj index 705285b7338..1eddf5e00ac 100644 --- a/snippets/csharp/System/Decimal/Parse/parsemethod.csproj +++ b/snippets/csharp/System/Decimal/Parse/parsemethod.csproj @@ -1,47 +1,6 @@ - - + - Release - AnyCPU - 9.0.30729 - 2.0 - {E775BC68-D15B-4888-9246-42A0F2541934} Library - CSClassLibrary - CSClassLibrary - v4.8 - 512 - - - - - 3.5 - + net10.0 - - none - false - . - prompt - 4 - false - - - - - - - - - ASPXCodeBehind - - - - - \ No newline at end of file + diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.vb b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.vb deleted file mode 100644 index 076afa8087c..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.Designer.vb +++ /dev/null @@ -1,236 +0,0 @@ -Partial Public Class Form1 - Inherits System.Windows.Forms.Form - - _ - Public Sub New() - MyBase.New() - - 'This call is required by the Windows Form Designer. - InitializeComponent() - - End Sub - - 'Form overrides dispose to clean up the component list. - _ - Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - MyBase.Dispose(disposing) - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ - Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container - Me.FlowLayoutPanel1 = New System.Windows.Forms.FlowLayoutPanel - Me.GetLinksFromFramesButton = New System.Windows.Forms.Button - Me.ShowModalDialogButton = New System.Windows.Forms.Button - Me.OpenNewWindowOverBrowserButton = New System.Windows.Forms.Button - Me.SetWindowStatusButton = New System.Windows.Forms.Button - Me.ResetFramesButton = New System.Windows.Forms.Button - Me.BalanceWindowButton = New System.Windows.Forms.Button - Me.NewOrderButton = New System.Windows.Forms.Button - Me.OpenThreeWindowsButton = New System.Windows.Forms.Button - Me.WindowOpenOnExeButton = New System.Windows.Forms.Button - Me.DisplayWindow1Button = New System.Windows.Forms.Button - Me.DisplayWindow2Button = New System.Windows.Forms.Button - Me.EnableClickScrollButton = New System.Windows.Forms.Button - Me.WebBrowser1 = New System.Windows.Forms.WebBrowser - Me.WindowTimeout = New System.Windows.Forms.Timer(Me.components) - Me.ResizeWindowButton = New System.Windows.Forms.Button - Me.SuppressScriptErrorsButton = New System.Windows.Forms.Button - Me.OpenRestrictedWindowButton = New System.Windows.Forms.Button - Me.FlowLayoutPanel1.SuspendLayout() - Me.SuspendLayout() - ' - 'FlowLayoutPanel1 - ' - Me.FlowLayoutPanel1.Controls.Add(Me.GetLinksFromFramesButton) - Me.FlowLayoutPanel1.Controls.Add(Me.ShowModalDialogButton) - Me.FlowLayoutPanel1.Controls.Add(Me.OpenNewWindowOverBrowserButton) - Me.FlowLayoutPanel1.Controls.Add(Me.SetWindowStatusButton) - Me.FlowLayoutPanel1.Controls.Add(Me.ResetFramesButton) - Me.FlowLayoutPanel1.Controls.Add(Me.BalanceWindowButton) - Me.FlowLayoutPanel1.Controls.Add(Me.NewOrderButton) - Me.FlowLayoutPanel1.Controls.Add(Me.OpenThreeWindowsButton) - Me.FlowLayoutPanel1.Controls.Add(Me.WindowOpenOnExeButton) - Me.FlowLayoutPanel1.Controls.Add(Me.DisplayWindow1Button) - Me.FlowLayoutPanel1.Controls.Add(Me.DisplayWindow2Button) - Me.FlowLayoutPanel1.Controls.Add(Me.EnableClickScrollButton) - Me.FlowLayoutPanel1.Controls.Add(Me.ResizeWindowButton) - Me.FlowLayoutPanel1.Controls.Add(Me.SuppressScriptErrorsButton) - Me.FlowLayoutPanel1.Controls.Add(Me.OpenRestrictedWindowButton) - Me.FlowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top - Me.FlowLayoutPanel1.Location = New System.Drawing.Point(0, 0) - Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1" - Me.FlowLayoutPanel1.Size = New System.Drawing.Size(919, 133) - Me.FlowLayoutPanel1.TabIndex = 0 - ' - 'GetLinksFromFramesButton - ' - Me.GetLinksFromFramesButton.Location = New System.Drawing.Point(3, 3) - Me.GetLinksFromFramesButton.Name = "GetLinksFromFramesButton" - Me.GetLinksFromFramesButton.Size = New System.Drawing.Size(202, 23) - Me.GetLinksFromFramesButton.TabIndex = 0 - Me.GetLinksFromFramesButton.Text = "Get Links From Frames" - ' - 'ShowModalDialogButton - ' - Me.ShowModalDialogButton.Location = New System.Drawing.Point(211, 3) - Me.ShowModalDialogButton.Name = "ShowModalDialogButton" - Me.ShowModalDialogButton.Size = New System.Drawing.Size(170, 23) - Me.ShowModalDialogButton.TabIndex = 1 - Me.ShowModalDialogButton.Text = "Show Modal Dialog" - ' - 'OpenNewWindowOverBrowserButton - ' - Me.OpenNewWindowOverBrowserButton.Location = New System.Drawing.Point(387, 3) - Me.OpenNewWindowOverBrowserButton.Name = "OpenNewWindowOverBrowserButton" - Me.OpenNewWindowOverBrowserButton.Size = New System.Drawing.Size(207, 23) - Me.OpenNewWindowOverBrowserButton.TabIndex = 2 - Me.OpenNewWindowOverBrowserButton.Text = "Open New Window Over Browser" - ' - 'SetWindowStatusButton - ' - Me.SetWindowStatusButton.Location = New System.Drawing.Point(600, 3) - Me.SetWindowStatusButton.Name = "SetWindowStatusButton" - Me.SetWindowStatusButton.Size = New System.Drawing.Size(170, 23) - Me.SetWindowStatusButton.TabIndex = 3 - Me.SetWindowStatusButton.Text = "Set Window Status" - ' - 'ResetFramesButton - ' - Me.ResetFramesButton.Location = New System.Drawing.Point(3, 32) - Me.ResetFramesButton.Name = "ResetFramesButton" - Me.ResetFramesButton.Size = New System.Drawing.Size(165, 23) - Me.ResetFramesButton.TabIndex = 4 - Me.ResetFramesButton.Text = "Reset Frames" - ' - 'BalanceWindowButton - ' - Me.BalanceWindowButton.Location = New System.Drawing.Point(174, 32) - Me.BalanceWindowButton.Name = "BalanceWindowButton" - Me.BalanceWindowButton.Size = New System.Drawing.Size(152, 23) - Me.BalanceWindowButton.TabIndex = 5 - Me.BalanceWindowButton.Text = "Balance Window" - ' - 'NewOrderButton - ' - Me.NewOrderButton.Location = New System.Drawing.Point(332, 32) - Me.NewOrderButton.Name = "NewOrderButton" - Me.NewOrderButton.Size = New System.Drawing.Size(188, 23) - Me.NewOrderButton.TabIndex = 6 - Me.NewOrderButton.Text = "New Order" - ' - 'OpenThreeWindowsButton - ' - Me.OpenThreeWindowsButton.Location = New System.Drawing.Point(526, 32) - Me.OpenThreeWindowsButton.Name = "OpenThreeWindowsButton" - Me.OpenThreeWindowsButton.Size = New System.Drawing.Size(190, 23) - Me.OpenThreeWindowsButton.TabIndex = 7 - Me.OpenThreeWindowsButton.Text = "Open Three Windows" - ' - 'WindowOpenOnExeButton - ' - Me.WindowOpenOnExeButton.Location = New System.Drawing.Point(722, 32) - Me.WindowOpenOnExeButton.Name = "WindowOpenOnExeButton" - Me.WindowOpenOnExeButton.Size = New System.Drawing.Size(185, 23) - Me.WindowOpenOnExeButton.TabIndex = 8 - Me.WindowOpenOnExeButton.Text = "Window Open on EXE" - ' - 'DisplayWindow1Button - ' - Me.DisplayWindow1Button.Location = New System.Drawing.Point(3, 61) - Me.DisplayWindow1Button.Name = "DisplayWindow1Button" - Me.DisplayWindow1Button.Size = New System.Drawing.Size(125, 23) - Me.DisplayWindow1Button.TabIndex = 9 - Me.DisplayWindow1Button.Text = "Display Window 1" - ' - 'DisplayWindow2Button - ' - Me.DisplayWindow2Button.Location = New System.Drawing.Point(134, 61) - Me.DisplayWindow2Button.Name = "DisplayWindow2Button" - Me.DisplayWindow2Button.Size = New System.Drawing.Size(141, 23) - Me.DisplayWindow2Button.TabIndex = 10 - Me.DisplayWindow2Button.Text = "Display Window 2" - ' - 'EnableClickScrollButton - ' - Me.EnableClickScrollButton.Location = New System.Drawing.Point(281, 61) - Me.EnableClickScrollButton.Name = "EnableClickScrollButton" - Me.EnableClickScrollButton.Size = New System.Drawing.Size(150, 23) - Me.EnableClickScrollButton.TabIndex = 11 - Me.EnableClickScrollButton.Text = "Enable Click Scroll" - ' - 'WebBrowser1 - ' - Me.WebBrowser1.Dock = System.Windows.Forms.DockStyle.Fill - Me.WebBrowser1.Location = New System.Drawing.Point(0, 133) - Me.WebBrowser1.Name = "WebBrowser1" - Me.WebBrowser1.Size = New System.Drawing.Size(919, 421) - Me.WebBrowser1.TabIndex = 1 - ' - 'WindowTimeout - ' - ' - 'ResizeWindowButton - ' - Me.ResizeWindowButton.Location = New System.Drawing.Point(437, 61) - Me.ResizeWindowButton.Name = "ResizeWindowButton" - Me.ResizeWindowButton.Size = New System.Drawing.Size(174, 23) - Me.ResizeWindowButton.TabIndex = 12 - Me.ResizeWindowButton.Text = "Resize Window" - ' - 'SuppressScriptErrorsButton - ' - Me.SuppressScriptErrorsButton.Location = New System.Drawing.Point(617, 61) - Me.SuppressScriptErrorsButton.Name = "SuppressScriptErrorsButton" - Me.SuppressScriptErrorsButton.Size = New System.Drawing.Size(193, 23) - Me.SuppressScriptErrorsButton.TabIndex = 13 - Me.SuppressScriptErrorsButton.Text = "Suppress Script Errors" - ' - 'OpenRestrictedWindowButton - ' - Me.OpenRestrictedWindowButton.Location = New System.Drawing.Point(3, 90) - Me.OpenRestrictedWindowButton.Name = "OpenRestrictedWindowButton" - Me.OpenRestrictedWindowButton.Size = New System.Drawing.Size(198, 23) - Me.OpenRestrictedWindowButton.TabIndex = 14 - Me.OpenRestrictedWindowButton.Text = "Open Restricted Window" - ' - 'Form1 - ' - Me.ClientSize = New System.Drawing.Size(919, 554) - Me.Controls.Add(Me.WebBrowser1) - Me.Controls.Add(Me.FlowLayoutPanel1) - Me.Name = "Form1" - Me.Text = "Form1" - Me.FlowLayoutPanel1.ResumeLayout(False) - Me.ResumeLayout(False) - - End Sub - Friend WithEvents FlowLayoutPanel1 As System.Windows.Forms.FlowLayoutPanel - Friend WithEvents GetLinksFromFramesButton As System.Windows.Forms.Button - Friend WithEvents WebBrowser1 As System.Windows.Forms.WebBrowser - Friend WithEvents ShowModalDialogButton As System.Windows.Forms.Button - Friend WithEvents OpenNewWindowOverBrowserButton As System.Windows.Forms.Button - Friend WithEvents SetWindowStatusButton As System.Windows.Forms.Button - Friend WithEvents ResetFramesButton As System.Windows.Forms.Button - Friend WithEvents BalanceWindowButton As System.Windows.Forms.Button - Friend WithEvents WindowTimeout As System.Windows.Forms.Timer - Friend WithEvents NewOrderButton As System.Windows.Forms.Button - Friend WithEvents OpenThreeWindowsButton As System.Windows.Forms.Button - Friend WithEvents WindowOpenOnExeButton As System.Windows.Forms.Button - Friend WithEvents DisplayWindow1Button As System.Windows.Forms.Button - Friend WithEvents DisplayWindow2Button As System.Windows.Forms.Button - Friend WithEvents EnableClickScrollButton As System.Windows.Forms.Button - Friend WithEvents ResizeWindowButton As System.Windows.Forms.Button - Friend WithEvents SuppressScriptErrorsButton As System.Windows.Forms.Button - Friend WithEvents OpenRestrictedWindowButton As System.Windows.Forms.Button - -End Class diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx deleted file mode 100644 index 25c2f26478d..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb deleted file mode 100644 index 54037eff4f0..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb +++ /dev/null @@ -1,333 +0,0 @@ -Imports System.Windows.Forms - -Public Class Form1 - Public Shared Sub Main() - End Sub - - Private Sub GetLinksFromFramesButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetLinksFromFramesButton.Click - Me.GetLinksFromFrames() - End Sub - - ' - Dim LinksTable As Hashtable - - Private Sub GetLinksFromFrames() - LinksTable = New Hashtable() - Dim FrameUrl As String - - If (WebBrowser1.Document IsNot Nothing) Then - With WebBrowser1.Document - Dim CurrentWindow As HtmlWindow = .Window - If (CurrentWindow.Frames.Count > 0) Then - For Each Frame As HtmlWindow In CurrentWindow.Frames - FrameUrl = Frame.Url.ToString() - Dim FrameLinksHash As New Hashtable() - LinksTable.Add(FrameUrl, FrameLinksHash) - - For Each HrefElement As HtmlElement In Frame.Document.Links - FrameLinksHash.Add(HrefElement.GetAttribute("HREF"), "Url") - Next - Next - Else - Dim DocLinksHash As New Hashtable() - LinksTable.Add(.Url.ToString(), DocLinksHash) - - For Each HrefElement As HtmlElement In .Links - DocLinksHash.Add(HrefElement.GetAttribute("HREF"), "Url") - Next - End If - End With - End If - End Sub - ' - - Private Sub ShowModalDialogButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowModalDialogButton.Click - Me.ShowModalDialog() - End Sub - - ' - Private Sub ShowModalDialog() - If (WebBrowser1.Document IsNot Nothing) Then - Dim Frame As HtmlWindow = WebBrowser1.Document.Window - - Dim DialogArguments As String = "dialogHeight: 250px; dialogWidth: 300px; dialogTop: 300px;" & _ - "dialogLeft: 300px; edge: Sunken; center: Yes; help: Yes; resizable: No; status: No;" - - ' Show the dialog. - Dim RawWindow = Frame.DomWindow - RawWindow.showModalDialog("http://www.adatum.com/dialogWindow.htm", Nothing, CObj(DialogArguments)) - End If - End Sub - ' - - - Private Sub OpenNewWindowOverBrowserButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenNewWindowOverBrowserButton.Click - Me.OpenNewWindowOverBrowser() - End Sub - - ' - 'Private Sub TestCookies() - ' If (WebBrowser1.Document IsNot Nothing) Then - ' Dim Capabilities As System.Windows.Forms.HtmlNavigator = WebBrowser1.Document.Window.Navigator - ' If (Not Capabilities.CookieEnabled) Then - ' MessageBox.Show("You have disabled cookies in Internet Explorer. The current " & _ - ' " application will not work properly without them. See your system " & _ - ' "administrator for more details.") - ' End If - ' End If - 'End Sub - ' - - ' - Private Sub OpenNewWindowOverBrowser() - If (WebBrowser1.Document IsNot Nothing) Then - Dim DocWindow As HtmlWindow = WebBrowser1.Document.Window - - Dim NewWindow As HtmlWindow = DocWindow.OpenNew(New Uri("http://www.adatum.com/popup.htm"), "left=" & DocWindow.Position.X & ",top=" & DocWindow.Position.Y & ",width=" & WebBrowser1.Width & ",height=" & WebBrowser1.Height) - End If - End Sub - ' - - - Private Sub SetWindowStatusButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SetWindowStatusButton.Click - Me.SetWindowStatus() - End Sub - - ' - Dim WithEvents PopWindow As HtmlWindow - - Private Sub SetWindowStatus() - If (WebBrowser1.Document IsNot Nothing) Then - Dim DocWindow As HtmlWindow = WebBrowser1.Document.Window - PopWindow = DocWindow.OpenNew(New Uri("file://C:\\testStatusBarText.htm"), "") - End If - End Sub - - Private Sub PopWindow_Load(ByVal sender As Object, ByVal e As HtmlElementEventArgs) Handles PopWindow.Load - MessageBox.Show("Loaded!") - End Sub - ' - - Private Sub ResetFramesButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ResetFramesButton.Click - Me.ResetFrames() - End Sub - - ' - Private Sub ResetFrames() - If (WebBrowser1.Document IsNot Nothing) Then - Dim FrameElement As HtmlElement - Dim DocWindow As HtmlWindow = WebBrowser1.Document.Window - - For Each FrameWindow As HtmlWindow In DocWindow.Frames - FrameElement = FrameWindow.WindowFrameElement - Dim OriginalUrl As String = FrameElement.GetAttribute("SRC") - - If (Not OriginalUrl.Equals(FrameWindow.Url.ToString())) Then - FrameWindow.Navigate(New Uri(OriginalUrl)) - End If - Next - End If - End Sub - ' - - - ' - Dim BalanceWindow As HtmlWindow - - Private Sub BalanceWindowButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BalanceWindowButton.Click - If (WebBrowser1.Document IsNot Nothing) Then - With WebBrowser1.Document - BalanceWindow = .Window.OpenNew(New Uri("http://www.adatum.com/viewBalances.aspx"), "dialogHeight: 250px; dialogWidth: 300px; " & _ - " dialogTop: 300px; dialogLeft: 300px; edge: Sunken; center: Yes; help: Yes; " & _ - "resizable: No; status: No;") - - ' Listen for activity on the document. - - - WindowTimeout.Interval = 300000 - WindowTimeout.Start() - End With - End If - End Sub - - Private Sub Document_Click(ByVal sender As Object, ByVal e As System.EventArgs) - WindowTimeout.Stop() - WindowTimeout.Start() - End Sub - - Private Sub WindowTimeout_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WindowTimeout.Tick - If (Not BalanceWindow.IsClosed) Then - BalanceWindow.Close() - WindowTimeout.Stop() - End If - End Sub - ' - - ' - Dim OrderWindow As HtmlWindow - Dim FormElement As HtmlElement - - Private Sub NewOrderButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewOrderButton.Click - LoadOrderForm() - End Sub - - Private Sub LoadOrderForm() - If (WebBrowser1.Document IsNot Nothing) Then - With WebBrowser1.Document - OrderWindow = .Window.OpenNew(New Uri("file://C:\\orderForm.htm"), "") - - ' !TODO: Perform this in the load event handler! - ' Get order form. - Dim ElemCollection As System.Windows.Forms.HtmlElementCollection = .All.GetElementsByName("NewOrderForm") - If (ElemCollection.Count = 1) Then - FormElement = ElemCollection(0) - ' TODO: Resolve this. - 'FormElement.AttachEventHandler("onsubmit", New HtmlElementEventHandler(AddressOf Form_Submit)) - End If - End With - - End If - End Sub - - Private Sub Form_Submit(ByVal sender As Object, ByVal e As HtmlElementEventArgs) - Dim DoOrder As Boolean = OrderWindow.Confirm("Once you transmit this order, you cannot cancel it. Submit?") - If (Not DoOrder) Then - ' Cancel the submit. - e.ReturnValue = False - OrderWindow.Alert("Submit cancelled.") - End If - End Sub - ' - - - Private Sub OpenThreeWindowsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenThreeWindowsButton.Click - ' Me.OpenThreeWindows() - End Sub - - ' NOTE: HtmlScreen will be ripped from build soon. - 'Private Sub OpenThreeWindows() - ' If (WebBrowser1.Document IsNot Nothing) Then - ' With WebBrowser1.Document - ' Dim WindowWidth As Integer = (ScreenObj.AvailableArea.Width / 3) - 10 - - ' ' Open first window. - ' Dim FirstWindow As HtmlWindow = .Window.OpenNew("http://www.microsoft.com/", "width=" & WindowWidth & ",height=200px,top=0,left=0") - ' .Window.OpenNew("http://www.microsoft.com/", "width=" & WindowWidth & ",height=200px,top=0,left=" & WindowWidth + 10) - ' .Window.OpenNew("http://www.microsoft.com/", "width=" & WindowWidth & ",height=200px,top=0,left=" & ((WindowWidth * 2) + 20)) - ' End With - ' End If - 'End Sub - - Private Sub WindowOpenOnExeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WindowOpenOnExeButton.Click - If (WebBrowser1.Document IsNot Nothing) Then - With WebBrowser1.Document - .Window.Open(New Uri("http://kamikaze/printTest.exe"), "_blank", "", False) - End With - End If - End Sub - - Private Sub DisplayWindow1Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayWindow1Button.Click - DisplayFirstUrl() - End Sub - - Private Sub DisplayWindow2Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayWindow2Button.Click - DisplaySecondUrl() - End Sub - - ' - Private Sub DisplayFirstUrl() - If (WebBrowser1.Document IsNot Nothing) Then - With WebBrowser1.Document - ' If this is called first, the window will only have a status bar. - .Window.Open(New Uri("http://www.microsoft.com/"), "displayWindow", "status=yes,width=200,height=400", False) - End With - End If - End Sub - - Private Sub DisplaySecondUrl() - If (WebBrowser1.Document IsNot Nothing) Then - With WebBrowser1.Document - ' If this is called first, the window will only have an Address bar. - .Window.Open(New Uri("http://msdn.microsoft.com/"), "displayWindow", "width=400,height=200,location=yes", False) - End With - End If - End Sub - ' - - - Private Sub EnableClickScrollButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnableClickScrollButton.Click - Me.EnableClickScroll() - End Sub - - - ' - Dim WithEvents Doc As HtmlDocument - - Private Sub EnableClickScroll() - If (WebBrowser1.Document IsNot Nothing) Then - Doc = WebBrowser1.Document - End If - End Sub - - Private Sub TopWindow_Click(ByVal sender As Object, ByVal e As HtmlElementEventArgs) Handles Doc.Click - Dim DocWindow As HtmlWindow = WebBrowser1.Document.Window - DocWindow.ScrollTo(e.MousePosition.X, e.MousePosition.Y) - End Sub - ' - - - - ' - Dim ResizableWindow As HtmlWindow - - Private Sub ResizeWindow() - If (WebBrowser1.Document IsNot Nothing) Then - ResizableWindow = WebBrowser1.Document.Window.OpenNew(New Uri("http://www.microsoft.com/"), "") - ResizableWindow.ResizeTo(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height) - End If - End Sub - ' - - Private Sub ResizeWindowButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ResizeWindowButton.Click - Me.ResizeWindow() - End Sub - - - Private Sub SuppressScriptErrorsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SuppressScriptErrorsButton.Click - Me.SuppressScriptErrors() - End Sub - - ' - Dim WithEvents ScriptWindow As HtmlWindow - - Private Sub SuppressScriptErrors() - If (WebBrowser1.Document IsNot Nothing) Then - ScriptWindow = WebBrowser1.Document.Window - End If - End Sub - - Private Sub ScriptWindow_Error(ByVal sender As Object, ByVal e As HtmlElementErrorEventArgs) Handles ScriptWindow.Error - MessageBox.Show("Suppressed error!") - e.Handled = True - End Sub - ' - - - Private Sub OpenRestrictedWindowButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenRestrictedWindowButton.Click - ' Me.OpenRestrictedWindow() - End Sub - - ' - 'Dim WithEvents RestrictedWindow As HtmlWindow - - 'Private Sub OpenRestrictedWindow() - ' If (WebBrowser1.Document IsNot Nothing) Then - ' RestrictedWindow = WebBrowser1.Document.Window.OpenNew("http://www.adatum.com/", "width=300,height=300,resizable=yes") - ' End If - 'End Sub - - 'Private Sub RestrictedWindow_ResizeStart(ByVal sender As Object, ByVal e As HtmlElementEventArgs) Handles RestrictedWindow.ResizeStart - ' e.ReturnValue = True - 'End Sub - ' -End Class diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProject.vbproj b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProject.vbproj deleted file mode 100644 index 0b25e60e109..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/HtmlWindowProject.vbproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Exe - net9.0-windows - true - - - diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyEvents.vb b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyEvents.vb deleted file mode 100644 index b6dfb0a6eb5..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyEvents.vb +++ /dev/null @@ -1,15 +0,0 @@ -Namespace My - - 'Use the editor window dropdowns in the Application pane of the Project Designer to handle MyApplication Events - ' - 'Startup: Raised when the application starts, before the startup form is created. - 'Shutdown: Raised after all application forms are closed. This event is not raised if the application is terminating abnormally. - 'UnhandledException: Raised if the application encounters an unhandled exception. - 'StartupNextInstance: Raised when launching a single-instance application and the application is already active. - 'NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. - - Partial Friend Class MyApplication - - End Class - -End Namespace diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.resx b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.resx deleted file mode 100644 index 3e18af958a2..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.vb b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.vb deleted file mode 100644 index 8fe17ca352d..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MyResources.vb +++ /dev/null @@ -1,61 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - -Imports System.IO -Imports System.Resources - -Namespace My.Resources - - ' - ' A strongly-typed resource class, for looking up localized strings, etc. - ' - 'This class was auto-generated by the Strongly Typed Resource Builder - 'class via a tool like ResGen or Visual Studio.NET. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - _ - Module MyResources - - Private _resMgr As System.Resources.ResourceManager - - Private _resCulture As System.Globalization.CultureInfo - - ' - ' Returns the cached ResourceManager instance used by this class. - ' - _ - Public ReadOnly Property ResourceManager() As System.Resources.ResourceManager - Get - If (_resMgr Is Nothing) Then - Dim temp As System.Resources.ResourceManager = New System.Resources.ResourceManager("HtmlWindowProject.MyResources", GetType(MyResources).Assembly) - System.Threading.Thread.MemoryBarrier - _resMgr = temp - End If - Return _resMgr - End Get - End Property - - ' - ' Overrides the current thread's CurrentUICulture property for all - ' resource lookups using this strongly typed resource class. - ' - _ - Public Property Culture() As System.Globalization.CultureInfo - Get - Return _resCulture - End Get - Set - _resCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.settings b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.settings deleted file mode 100644 index 0bcb11da337..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.vb b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.vb deleted file mode 100644 index 3d12c6fb5fa..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/My Project/MySettings.vb +++ /dev/null @@ -1,38 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict Off -Option Explicit On - - - -Partial Friend NotInheritable Class MySettings - Inherits System.Configuration.ApplicationSettingsBase - - Private Shared m_Value As MySettings - - Private Shared m_SyncObject As Object = New Object - - _ - Public Shared ReadOnly Property Value() As MySettings - Get - If (MySettings.m_Value Is Nothing) Then - System.Threading.Monitor.Enter(MySettings.m_SyncObject) - If (MySettings.m_Value Is Nothing) Then - Try - MySettings.m_Value = New MySettings - Finally - System.Threading.Monitor.Exit(MySettings.m_SyncObject) - End Try - End If - End If - Return MySettings.m_Value - End Get - End Property -End Class diff --git a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config b/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config deleted file mode 100644 index f6369234512..00000000000 --- a/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/app.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xml/System.IdentityModel.Tokens/SecurityToken.xml b/xml/System.IdentityModel.Tokens/SecurityToken.xml index bb7ac870dd7..57d923c6b74 100644 --- a/xml/System.IdentityModel.Tokens/SecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/SecurityToken.xml @@ -82,14 +82,6 @@ To add functionality to existing token types you can derive from the specific type and its associated token handler to support any new elements that you add to the token. To add support for new token types, you can derive directly from the class. When you do this, you will also need to create a token handler class by deriving from the class. Depending on how your token is to be used, you may also need to create a custom token resolver by deriving from the class as well as one or more custom key identifier clause types by deriving from the class. - - -## Examples - The code examples that are used in the topics are taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). It includes an implementation of a `SimpleWebToken` class and a `SimpleWebTokenHandler` class, as well as other classes that support SWT tokens. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows the implementation of the `SimpleWebToken` class. This class extends . - - :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs" id="Snippet1"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet2"::: - ]]> @@ -256,15 +248,6 @@ ## Remarks Typically, when a security token is serialized into XML, the `Id` attribute for the security token is set to the value of the property. - - -## Examples - The code examples that are used in the topics are taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). It includes an implementation of a `SimpleWebToken` class and a `SimpleWebTokenHandler` class, as well as other classes that support SWT tokens. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows the override of the property. - - :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs" id="Snippet1"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet3"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet4"::: - ]]> @@ -394,15 +377,6 @@ ## Remarks Use the property to set the cryptographic keys for this security token to protect tokens or a SOAP message. The keys can be used, among other things, to digitally sign or encrypt either tokens or SOAP messages. - - -## Examples - The code examples that are used in the topics are taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). It includes an implementation of a `SimpleWebToken` class and a `SimpleWebTokenHandler` class, as well as other classes that support SWT tokens. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows the override of the property. - - :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs" id="Snippet1"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet3"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet5"::: - ]]> @@ -443,16 +417,6 @@ ## Remarks Use the and properties to determine the time period in which a token is valid. The and properties represent the first and last instants in time in which the security token is valid, respectively. - - -## Examples - The code examples that are used in the topics are taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). It includes an implementation of a `SimpleWebToken` class and a `SimpleWebTokenHandler` class, as well as other classes that support SWT tokens. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows the override of the property. - - :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs" id="Snippet1"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet3"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet6"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet8"::: - ]]> @@ -493,16 +457,6 @@ ## Remarks Use the and properties to determine the time period in which a token is valid. The and properties represent the first and last instants in time in which the security token is valid, respectively. - - -## Examples - The code examples that are used in the topics are taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). It includes an implementation of a `SimpleWebToken` class and a `SimpleWebTokenHandler` class, as well as other classes that support SWT tokens. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows the override of the property. - - :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtokenconstants.cs" id="Snippet1"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet3"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet7"::: -:::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityToken/Overview/simplewebtoken.cs" id="Snippet8"::: - ]]> diff --git a/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml b/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml index 5586a558648..a47f69e27ed 100644 --- a/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml +++ b/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml @@ -29,17 +29,7 @@ Provides data for the event. - - control named `webBrowser1`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: - - ]]> - + To be added. @@ -106,22 +96,13 @@ System.Boolean - Gets or sets whether this error has been handled by the application hosting the document. + Gets or sets a value that indicates whether this error has been handled by the application hosting the document. if the event has been handled; otherwise, . The default is . control named `webBrowser1`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: +If you want to display your own custom error message to the user or suppress the error entirely, set this property to `true`. ]]> diff --git a/xml/System.Windows.Forms/HtmlWindow.xml b/xml/System.Windows.Forms/HtmlWindow.xml index ea214117569..9510502f477 100644 --- a/xml/System.Windows.Forms/HtmlWindow.xml +++ b/xml/System.Windows.Forms/HtmlWindow.xml @@ -41,14 +41,6 @@ You can use to open new windows containing new documents. loads the specified URL into the named window, creating it if it does not already exist, while always opens its URL in a newly created window. - - -## Examples - The following code example contains two methods. The first opens a URL in a window named `displayWindow`, which it creates with a status bar displayed. The second opens another URL in the same window, but specifies that only the location bar should be displayed. Notice that the dimensions of the window and the controls that are displayed depends on which URL is opened first. The code example requires that your form contains a control named `WebBrowser1`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet13"::: - ]]> @@ -166,12 +158,6 @@ When you create new windows using or , causes the HTML Document Object Model to open a new instance of Internet Explorer. If you don't call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application closes. -## Examples - The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example was written under the assumption that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. To run this example successfully, change the first argument supplied to to a valid URL. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet9"::: - ]]> close Method @@ -213,35 +199,6 @@ ## Remarks displays a modal dialog box; the user will not be able to access the underlying HTML page without first closing this dialog box. -## Examples - -Copy the following HTML and save it into a form called orderForm.htm: - -```html - - -
-Select Part Type: -
-Quantity:
-Building/Desk: - / -

- -

- - -``` - -The following example displays a dialog box when the user submits `NewOrderForm`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet10"::: - ]]> confirm Method @@ -313,14 +270,6 @@ The following example displays a ## Remarks Typically, you will access the through the property of the control. Use this property when you need to access a document within a `FRAME` using the collection. - - -## Examples - The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet2"::: - ]]> @@ -364,14 +313,6 @@ The following example displays a You must add a referenced to the unmanaged MSHTML.dll in order to use . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). - - -## Examples - The following code example obtains an `IHTMLWindow2` pointer from a document's window and displays a new document in a modal window. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet3"::: - ]]> IHTMLWindow2 Interface @@ -446,12 +387,6 @@ The following example displays a You can set the property of to `true` in order to prevent the native error dialog box in Internet Explorer from displaying. -## Examples - The following code example traps the error that results when a script on an HTML page attempts to access an object that is not defined in the document. The page must be fully loaded before the event handler is attached, otherwise the example will not work. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: - ]]> onerror Event @@ -529,14 +464,6 @@ The following example displays a Frames will contain one instance of for each `FRAME` or `IFRAME` defined within a Web page. - - -## Examples - The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet2"::: - ]]> frames Collection @@ -693,14 +620,6 @@ The following example displays a ## Remarks If the has been closed by the user or by way of a call to the method, attempting to navigate to a new URL or access the window's document will result in an error. Use this property to determine whether it is safe to call properties and methods on the current window object. - - -## Examples - The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example requires that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet8"::: - ]]> closed Property @@ -1276,17 +1195,6 @@ The following example displays a If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . -## Examples - The following code example contains two methods: - -- The first opens a URL in a window named `displayWindow`, which it creates with a status bar displayed. -- The second opens another URL in the same window, but specifies that only the location bar should be displayed. - - Notice that the dimensions of the window and the controls that are displayed depends on which URL is opened first. The code example requires that your form contains a control named `WebBrowser1`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet13"::: - ]]> open Method @@ -1499,14 +1407,6 @@ The following example displays a ## Remarks The property of the control will return the position of the control relative to the upper-left corner of the form. By contrast, will return the location of the document's display area relative to the top-left corner of the user's monitor. - - -## Examples - The following code example opens a new window directly over the control on the form. The code example requires that your form contains an instance of the control named `WebBrowser1`. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet5"::: - ]]> Windows Forms Coordinates @@ -1673,17 +1573,7 @@ The following example displays a A describing the desired width and height of the window, in pixels. Must be 100 pixels or more in both dimensions. Changes the size of the window to the specified dimensions. - - - + To be added. The window you are trying to resize is in a different domain than its parent window. This restriction is part of cross-frame scripting security. resizeTo Method @@ -1802,14 +1692,6 @@ The following example displays a ## Remarks will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. - - -## Examples - The following code example scrolls through the document to the coordinate position clicked by the user. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet15"::: - ]]> scrollTo Method @@ -2034,14 +1916,6 @@ The following example displays a ## Remarks When you retrieve a `FRAME` element from the collection, it returns an . Call on this object if you need to access attributes of the underlying `FRAME` element, such as the `SRC` attribute. - - -## Examples - The following code example compares the `SRC` attribute of frames in a `FRAMESET` to the current location. If they are different, the frames are reset to their original URLs. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet8"::: - ]]> frameElement Property diff --git a/xml/System.Windows.Forms/HtmlWindowCollection.xml b/xml/System.Windows.Forms/HtmlWindowCollection.xml index bfd56359a80..ff610050c6c 100644 --- a/xml/System.Windows.Forms/HtmlWindowCollection.xml +++ b/xml/System.Windows.Forms/HtmlWindowCollection.xml @@ -48,14 +48,6 @@ For more information on frames, see the documentation for the property. - - -## Examples - The following code example inspects each document within a page containing frames and creates a table of all of the outgoing hyperlinks from each page for future inspection. - - :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet2"::: - ]]> From 4c9099fbdbb02104fbb08471fc970a3b7f94aeb2 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:22:33 -0700 Subject: [PATCH 2/6] Upgrade WPF projects to .NET 10 (#12922) --- .../AnimateProperty_Storyboards_markup.csproj | 47 +++------- .../XAML/XAML.csproj | 87 ++++++------------ .../Basic3D/XAML/BlankSample.csproj | 54 +++-------- .../XAML/BrushOverviewExample.csproj | 44 +++------ .../XAML/BrushesIntroduction.csproj | 82 +++-------------- .../XAML/Canvas_Ovw_Sample.csproj | 41 +++------ .../CanvasZ-Order/XAML/Canvas_Z-Order.csproj | 44 +++------ .../xaml/datatemplatingsample.csproj | 62 +++---------- .../xaml/deferredscrolling.csproj | 92 ++++--------------- .../XAML/DockPanel_Ovw_sample.csproj | 43 +++------ .../XAML/misc_snippets.csproj | 72 ++++----------- .../XAML/XAML.csproj | 82 +++++------------ .../XAML/GeometriesMiscSnippets.csproj | 46 +++------- .../XAML/GradientBrushExamples.csproj | 58 +++--------- .../Grid/XAML/Grid_Ovw_sample.csproj | 43 +++------ .../XAML/LayoutTransform.csproj | 43 +++------ .../XAML/MPA_Layout_VerticalAlignment.csproj | 38 +++----- .../Margin_Padding_Alignment_Sample.csproj | 43 +++------ .../PageKeepAliveSnippets/XAML/XAML.csproj | 86 +++++------------ .../XAML/XAML.csproj | 86 +++++------------ .../ScrollViewer/XAML/ScrollViewer_wcp.csproj | 38 +++----- .../Slider/xaml/slider_xaml.csproj | 92 ++++--------------- .../XAML/StackPanel_Ovw_Sample4.csproj | 43 +++------ .../ThicknessStruct/XAML/ThicknessXAML.csproj | 44 +++------ .../XAML/WindowIconSample.csproj | 80 +++------------- .../XAML/WrapPanel_Samp.csproj | 44 +++------ .../xaml/calendarsnippets_xaml.csproj | 91 +++--------------- .../xaml/datepickersnippets.csproj | 91 +++--------------- .../XAML/keyframes_markup.csproj | 46 +++------- .../XAML/visualbrush_markup_snip.csproj | 70 ++++---------- 30 files changed, 462 insertions(+), 1370 deletions(-) diff --git a/snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/AnimateProperty_Storyboards_markup.csproj b/snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/AnimateProperty_Storyboards_markup.csproj index 80f6e2d699c..736b0162dd5 100644 --- a/snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/AnimateProperty_Storyboards_markup.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/AnimatePropertyStoryboards/XAML/AnimateProperty_Storyboards_markup.csproj @@ -1,62 +1,43 @@ - + + - AnimatingWithStoryboards_markup - winexe - Debug - App.ico + WinExe + net10.0-windows + true + false Microsoft.Samples.Animation.AnimatingWithStoryboards - {77076AC3-80DC-41F1-9C3C-700A2561709C} - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 + AnimatingWithStoryboards_markup - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/ApplicationMainWindowSnippets/XAML/XAML.csproj b/snippets/xaml/VS_Snippets_Wpf/ApplicationMainWindowSnippets/XAML/XAML.csproj index 24688809b16..cca557c27cd 100644 --- a/snippets/xaml/VS_Snippets_Wpf/ApplicationMainWindowSnippets/XAML/XAML.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/ApplicationMainWindowSnippets/XAML/XAML.csproj @@ -1,85 +1,50 @@ - + + - Debug - AnyCPU - {81575C54-3234-4369-B1B5-C3D0F4D98390} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false XAML XAML - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + StartupWindow.xaml - Code - - MainPage.xaml - + + Resources.resx + + + Settings.settings + + + + ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj b/snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj index 99f78e80d09..ab582c0389d 100644 --- a/snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/BlankSample.csproj @@ -1,53 +1,27 @@ - - + + + WinExe + net10.0-windows + true + false BlankSample - Blank3DSample - winexe - Debug - MSBuild - False - App.ico - bin\$(Debug)\ - 10.0.20821 - 2.0 - {EE434869-7982-4ADE-B848-1C5500C94289} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - + - MSBuild:Compile - Designer - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - + - - - - - - - - 4.0 - - - + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/BrushOverviewExample.csproj b/snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/BrushOverviewExample.csproj index 954793535f4..774f154f345 100644 --- a/snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/BrushOverviewExample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/BrushOverviewExamples_snip/XAML/BrushOverviewExample.csproj @@ -1,33 +1,19 @@ - + + - BrushExamples - winexe - Release - App.ico - 10.0.20821 + WinExe + net10.0-windows + true + false Microsoft.Samples.BrushExamples - 2.0 - {9D37563A-C550-4347-9EEF-942BF2330B79} - bin\$(Configuration)\ - v4.8 - + BrushExamples - + - - - - - - - - - 4.0 - - + + - @@ -46,30 +32,28 @@ + SampleViewer.xaml - Code MyApp.xaml - Code SolidColorBrushExample.xaml - Code OpacityExample.xaml - Code SolidColorBrushAnimationExample.xaml - Code + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/BrushesIntroduction.csproj b/snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/BrushesIntroduction.csproj index a4fcb293366..9bc04d4094a 100644 --- a/snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/BrushesIntroduction.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/BrushesIntroduction_snip/XAML/BrushesIntroduction.csproj @@ -1,146 +1,94 @@ - + + - BrushesIntroduction - $(OutputType) - Debug - AnyCPU - App.ico - BrushesIntroduction - MSBuild - 2.0 - {9D37563A-C550-4347-9EEF-942BF2330B79} WinExe + net10.0-windows + true + false + BrushesIntroduction + BrushesIntroduction BrushesIntroduction.app - false - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile MSBuild:Compile - Designer - Designer MSBuild:Compile MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer - Designer MSBuild:Compile MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer - Designer MSBuild:Compile MSBuild:Compile - Designer - Designer MSBuild:Compile - Designer MSBuild:Compile + GradientBrushesExample.xaml - Code SampleViewer.xaml - Code app.xaml - Code InteractiveLinearGradientBrushExample.xaml - Code + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/CanvasOvwSample/XAML/Canvas_Ovw_Sample.csproj b/snippets/xaml/VS_Snippets_Wpf/CanvasOvwSample/XAML/Canvas_Ovw_Sample.csproj index 78b3d841f3b..5feb71000de 100644 --- a/snippets/xaml/VS_Snippets_Wpf/CanvasOvwSample/XAML/Canvas_Ovw_Sample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/CanvasOvwSample/XAML/Canvas_Ovw_Sample.csproj @@ -1,38 +1,19 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - - - - - + - - - - - - - - - 4.0 - - + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/CanvasZ-Order/XAML/Canvas_Z-Order.csproj b/snippets/xaml/VS_Snippets_Wpf/CanvasZ-Order/XAML/Canvas_Z-Order.csproj index 7239f590bec..a09b2cc118c 100644 --- a/snippets/xaml/VS_Snippets_Wpf/CanvasZ-Order/XAML/Canvas_Z-Order.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/CanvasZ-Order/XAML/Canvas_Z-Order.csproj @@ -1,42 +1,24 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 + SDKSample - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/DataTemplatingIntro/xaml/datatemplatingsample.csproj b/snippets/xaml/VS_Snippets_Wpf/DataTemplatingIntro/xaml/datatemplatingsample.csproj index 5a5fc67d49b..cc21c6674cf 100644 --- a/snippets/xaml/VS_Snippets_Wpf/DataTemplatingIntro/xaml/datatemplatingsample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/DataTemplatingIntro/xaml/datatemplatingsample.csproj @@ -1,67 +1,35 @@ - + + - Debug - AnyCPU - {ECFDBD90-E649-439C-86B1-4BCDD513E831} + WinExe + net10.0-windows + true + false DataTemplatingSample DataTemplatingSample - 4 - winexe - 1.0.0.* - - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + app.xaml - Code Window1.xaml - Code - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/DeferredScrolling/xaml/deferredscrolling.csproj b/snippets/xaml/VS_Snippets_Wpf/DeferredScrolling/xaml/deferredscrolling.csproj index 49aed22a656..01722b265ff 100644 --- a/snippets/xaml/VS_Snippets_Wpf/DeferredScrolling/xaml/deferredscrolling.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/DeferredScrolling/xaml/deferredscrolling.csproj @@ -1,105 +1,53 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {7BF376D2-5795-4057-979D-20D5E029152B} WinExe - Properties + net10.0-windows + true + false DeferredScrolling DeferredScrolling - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/DockPanelOvwSample/XAML/DockPanel_Ovw_sample.csproj b/snippets/xaml/VS_Snippets_Wpf/DockPanelOvwSample/XAML/DockPanel_Ovw_sample.csproj index 7239f590bec..1c890fe2c04 100644 --- a/snippets/xaml/VS_Snippets_Wpf/DockPanelOvwSample/XAML/DockPanel_Ovw_sample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/DockPanelOvwSample/XAML/DockPanel_Ovw_sample.csproj @@ -1,42 +1,23 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/misc_snippets.csproj b/snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/misc_snippets.csproj index c01679d9054..df51892270a 100644 --- a/snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/misc_snippets.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/DrawingMiscSnippets_snip/XAML/misc_snippets.csproj @@ -1,48 +1,26 @@ - - + + - SDKSample + WinExe + net10.0-windows + true + false Misc Snippets - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {BDDD444F-2D67-4503-A9B6-60E241A55762} - bin\$(Configuration)\ - v4.8 - - - + - - - - - - + + + + - - - - - - - - - - - - + + + - - - - + @@ -54,31 +32,19 @@ + MyApp.xaml - Code SampleViewer.xaml - Code + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/FrameNavigationUIVisibilitySnippets/XAML/XAML.csproj b/snippets/xaml/VS_Snippets_Wpf/FrameNavigationUIVisibilitySnippets/XAML/XAML.csproj index 03b10af0807..840e5364970 100644 --- a/snippets/xaml/VS_Snippets_Wpf/FrameNavigationUIVisibilitySnippets/XAML/XAML.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/FrameNavigationUIVisibilitySnippets/XAML/XAML.csproj @@ -1,83 +1,49 @@ - + + - Debug - AnyCPU - {E8D20F96-D4DD-4F5A-ABD1-FE076BCB7542} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false XAML XAML - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code Window1.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator Resources.cs - Designer - - True - Resources.resx - + + + SettingsSingleFileGenerator Settings.cs - - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/GeometriesMiscSnippets_snip/XAML/GeometriesMiscSnippets.csproj b/snippets/xaml/VS_Snippets_Wpf/GeometriesMiscSnippets_snip/XAML/GeometriesMiscSnippets.csproj index 9a5d628e22c..e9fcf757f98 100644 --- a/snippets/xaml/VS_Snippets_Wpf/GeometriesMiscSnippets_snip/XAML/GeometriesMiscSnippets.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/GeometriesMiscSnippets_snip/XAML/GeometriesMiscSnippets.csproj @@ -1,25 +1,18 @@ - - + + - SDKSample + WinExe + net10.0-windows + true + false MiscSnippets - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {BDDD444F-2D67-4503-A9B6-60E241A55762} - bin\$(Configuration)\ - v4.8 - - - + - - + + + @@ -27,27 +20,14 @@ + MyApp.xaml - Code SampleViewer.xaml - Code - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushExamples.csproj b/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushExamples.csproj index 08d0221920a..96d3c69ae2f 100644 --- a/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushExamples.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/GradientBrushExamples_snip/XAML/GradientBrushExamples.csproj @@ -1,50 +1,19 @@ - + + - GradientBrushExamples - $(OutputType) - Debug - AnyCPU - App.ico - Microsoft.Samples.GradientBrushExamples - MSBuild - 2.0 - {9D37563A-C550-4347-9EEF-942BF2330B79} WinExe - - - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + net10.0-windows + true + false + Microsoft.Samples.GradientBrushExamples + GradientBrushExamples - + - - - - - - - - - 4.0 - - + + - @@ -52,18 +21,19 @@ + SampleViewer.xaml - Code MyApp.xaml - Code + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/Grid/XAML/Grid_Ovw_sample.csproj b/snippets/xaml/VS_Snippets_Wpf/Grid/XAML/Grid_Ovw_sample.csproj index 1b979f86fd0..5feb71000de 100644 --- a/snippets/xaml/VS_Snippets_Wpf/Grid/XAML/Grid_Ovw_sample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/Grid/XAML/Grid_Ovw_sample.csproj @@ -1,40 +1,19 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - {AF101258-0411-474D-8E5D-E283A75D53B4} - v4.8 - - 10.0.20821 - - + - - - - - - + - - - - - - - - - 4.0 - - + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/LayoutTransform.csproj b/snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/LayoutTransform.csproj index d85827a8ff1..1c890fe2c04 100644 --- a/snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/LayoutTransform.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/LayoutTransform/XAML/LayoutTransform.csproj @@ -1,42 +1,23 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - MSBuild:Compile - Designer - + + + - Designer MSBuild:Compile - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/MPALayoutVerticalAlignment/XAML/MPA_Layout_VerticalAlignment.csproj b/snippets/xaml/VS_Snippets_Wpf/MPALayoutVerticalAlignment/XAML/MPA_Layout_VerticalAlignment.csproj index 14148d0a879..5feb71000de 100644 --- a/snippets/xaml/VS_Snippets_Wpf/MPALayoutVerticalAlignment/XAML/MPA_Layout_VerticalAlignment.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/MPALayoutVerticalAlignment/XAML/MPA_Layout_VerticalAlignment.csproj @@ -1,35 +1,19 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - - + - - - - - - - - - 4.0 - - + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/MarginPaddingAlignmentSample/XAML/Margin_Padding_Alignment_Sample.csproj b/snippets/xaml/VS_Snippets_Wpf/MarginPaddingAlignmentSample/XAML/Margin_Padding_Alignment_Sample.csproj index 7239f590bec..1c890fe2c04 100644 --- a/snippets/xaml/VS_Snippets_Wpf/MarginPaddingAlignmentSample/XAML/Margin_Padding_Alignment_Sample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/MarginPaddingAlignmentSample/XAML/Margin_Padding_Alignment_Sample.csproj @@ -1,42 +1,23 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/PageKeepAliveSnippets/XAML/XAML.csproj b/snippets/xaml/VS_Snippets_Wpf/PageKeepAliveSnippets/XAML/XAML.csproj index 8c277dc96eb..17f6f257d14 100644 --- a/snippets/xaml/VS_Snippets_Wpf/PageKeepAliveSnippets/XAML/XAML.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/PageKeepAliveSnippets/XAML/XAML.csproj @@ -1,79 +1,43 @@ - + + - Debug - AnyCPU - {41F6C1D3-F5D7-47A3-B26A-756BEED1AA07} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false XAML XAML - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - True - True Resources.resx - True - True Settings.settings - + - + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/PageShowsNavigationUISnippets/XAML/XAML.csproj b/snippets/xaml/VS_Snippets_Wpf/PageShowsNavigationUISnippets/XAML/XAML.csproj index dde7ff97aa3..17f6f257d14 100644 --- a/snippets/xaml/VS_Snippets_Wpf/PageShowsNavigationUISnippets/XAML/XAML.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/PageShowsNavigationUISnippets/XAML/XAML.csproj @@ -1,79 +1,43 @@ - + + - Debug - AnyCPU - {B33B0A78-65B2-427B-806B-83488DBF8BBC} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false XAML XAML - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - True - True Resources.resx - True - True Settings.settings - + - + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/ScrollViewer/XAML/ScrollViewer_wcp.csproj b/snippets/xaml/VS_Snippets_Wpf/ScrollViewer/XAML/ScrollViewer_wcp.csproj index 0a77abccc00..fa509adb135 100644 --- a/snippets/xaml/VS_Snippets_Wpf/ScrollViewer/XAML/ScrollViewer_wcp.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/ScrollViewer/XAML/ScrollViewer_wcp.csproj @@ -1,37 +1,23 @@ - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Debug - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/Slider/xaml/slider_xaml.csproj b/snippets/xaml/VS_Snippets_Wpf/Slider/xaml/slider_xaml.csproj index cd8859205a5..aef55501a2b 100644 --- a/snippets/xaml/VS_Snippets_Wpf/Slider/xaml/slider_xaml.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/Slider/xaml/slider_xaml.csproj @@ -1,105 +1,53 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {76B7363A-4543-4E59-AEAE-1061B49F2567} WinExe - Properties + net10.0-windows + true + false Slider_xaml Slider_xaml - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/StackPanelOvw4/XAML/StackPanel_Ovw_Sample4.csproj b/snippets/xaml/VS_Snippets_Wpf/StackPanelOvw4/XAML/StackPanel_Ovw_Sample4.csproj index 97643fc8be1..4c9bf750261 100644 --- a/snippets/xaml/VS_Snippets_Wpf/StackPanelOvw4/XAML/StackPanel_Ovw_Sample4.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/StackPanelOvw4/XAML/StackPanel_Ovw_Sample4.csproj @@ -1,44 +1,27 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - - 4.0 - - - + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/ThicknessStruct/XAML/ThicknessXAML.csproj b/snippets/xaml/VS_Snippets_Wpf/ThicknessStruct/XAML/ThicknessXAML.csproj index 4c86a9deee0..5feb71000de 100644 --- a/snippets/xaml/VS_Snippets_Wpf/ThicknessStruct/XAML/ThicknessXAML.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/ThicknessStruct/XAML/ThicknessXAML.csproj @@ -1,39 +1,19 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - {30129F7F-DA62-447D-80F8-EE9CAE8D24AE} - v4.8 - - 10.0.20821 - - + - - - - - - - + + - - - - - - - - - 4.0 - - + - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/WindowIconSnippets/XAML/WindowIconSample.csproj b/snippets/xaml/VS_Snippets_Wpf/WindowIconSnippets/XAML/WindowIconSample.csproj index cf9fb83ce39..654e939d241 100644 --- a/snippets/xaml/VS_Snippets_Wpf/WindowIconSnippets/XAML/WindowIconSample.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/WindowIconSnippets/XAML/WindowIconSample.csproj @@ -1,86 +1,32 @@ - + + - Debug - AnyCPU - {0D413B30-C78F-464E-B0C3-9319EF8E1D0D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false WindowIconSample WindowIconSample - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - true - 1.0.0.* - true - true - Publish\ - SystemIcon.ico - v4.8 - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - + - - - + + MainWindow.xaml + + - - - - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/WrapPanel_Intro/XAML/WrapPanel_Samp.csproj b/snippets/xaml/VS_Snippets_Wpf/WrapPanel_Intro/XAML/WrapPanel_Samp.csproj index c05704dfa5e..1c890fe2c04 100644 --- a/snippets/xaml/VS_Snippets_Wpf/WrapPanel_Intro/XAML/WrapPanel_Samp.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/WrapPanel_Intro/XAML/WrapPanel_Samp.csproj @@ -1,43 +1,23 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - False - 2.0 - bin\$(Configuration)\ - {E52486E1-B58E-4497-95A7-A10130403348} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Designer MSBuild:Compile - + + + MSBuild:Compile - Designer - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/calendarsnippets/xaml/calendarsnippets_xaml.csproj b/snippets/xaml/VS_Snippets_Wpf/calendarsnippets/xaml/calendarsnippets_xaml.csproj index 05082d34241..72244ff1288 100644 --- a/snippets/xaml/VS_Snippets_Wpf/calendarsnippets/xaml/calendarsnippets_xaml.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/calendarsnippets/xaml/calendarsnippets_xaml.csproj @@ -1,96 +1,33 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {3210750F-A272-4600-818E-3C2BD6C09026} WinExe - Properties + net10.0-windows + true + false CalendarSnippets_Xaml CalendarSnippets_Xaml - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - 4.0 - - - 3.5 - - - 3.5 - - - 3.5 - - - 3.0 - - - 3.0 - - - 3.0 - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/datepickersnippets.csproj b/snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/datepickersnippets.csproj index 081038a0384..477489c9b57 100644 --- a/snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/datepickersnippets.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/datepickersnippets/xaml/datepickersnippets.csproj @@ -1,96 +1,33 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {B3CAD313-D426-4C3A-B84B-77A2EC65D72B} WinExe - Properties + net10.0-windows + true + false DatePickerSnippets DatePickerSnippets - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - 4.0 - - - 3.5 - - - 3.5 - - - 3.5 - - - 3.0 - - - 3.0 - - - 3.0 - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/keyframes_snip/XAML/keyframes_markup.csproj b/snippets/xaml/VS_Snippets_Wpf/keyframes_snip/XAML/keyframes_markup.csproj index 57e736aecb6..0d4688482db 100644 --- a/snippets/xaml/VS_Snippets_Wpf/keyframes_snip/XAML/keyframes_markup.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/keyframes_snip/XAML/keyframes_markup.csproj @@ -1,22 +1,20 @@ - + + - KeyFramesSample - winexe - Release - App.ico - 10.0.20821 - 2.0 - keyframes_markup - {87591A45-52BE-4F4D-B77E-9B777DC7846C} - bin\$(Configuration)\ + WinExe + net10.0-windows + true + false Microsoft.Samples.KeyFrameExamples + KeyFramesSample Microsoft.Samples.KeyFrameExamples.MyApp - v4.8 - - + + + + @@ -33,38 +31,24 @@ + - Code KeyTimesIllustration.xaml MyApp.xaml - Code KeyFramesIntroduction.xaml - Code SampleViewer.xaml - Code + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/visualbrush_markup_snip.csproj b/snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/visualbrush_markup_snip.csproj index 9aa5ccb7ad1..5a3d4dadce5 100644 --- a/snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/visualbrush_markup_snip.csproj +++ b/snippets/xaml/VS_Snippets_Wpf/visualbrush_markup_snip/XAML/visualbrush_markup_snip.csproj @@ -1,74 +1,38 @@ - + + - Debug - AnyCPU - {21EC4067-4463-41C6-BD7D-5FDD3295AE77} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false Microsoft.Samples.VisualBrushExamples VisualBrushExamples - 4 - winexe - 1.0.0.* - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - - - - - - - - - + + + + + App.xaml - Code SampleViewer.xaml - Code + Always - - \ No newline at end of file + + From 9eddaea8acb57c82a846e258c2cb39de70f6166c Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:22:54 -0700 Subject: [PATCH 3/6] Upgrade System.Windows projects to .NET 10 (#12923) --- .../Column/PatternProviders.csproj | 61 ++-------- .../IInvokeProvider/Invoke/UIAProvider.csproj | 61 ++-------- .../FocusTracker.csproj | 63 ++-------- .../GetSupportedPatterns.csproj | 71 +++--------- .../Invoke/UIAInvokePattern_snip.csproj | 90 ++++----------- .../UIATextPattern_snip.csproj | 78 ++++--------- .../Margin_Padding_Alignment_Sample.csproj | 36 ++---- .../Canvas/Overview/Canvas_Ovw_Sample.csproj | 40 ++----- .../Dock/DockPanel_Ovw_Sample.csproj | 40 ++----- .../Grid/Overview/Grid_Code_csharp.csproj | 39 ++----- .../Source/StackPanel_Ovw_Sample4.csproj | 40 ++----- .../MediaElement/Stretch/ViewboxCode.csproj | 36 ++---- .../Panel/SetZIndex/CanvasZ-Order.csproj | 40 ++----- .../Overview/ScrollViewer_wcp.csproj | 40 ++----- .../Overview/WrapPanel_Code_csharp.csproj | 37 ++---- .../Overview/CodeOnlyBinding.csproj | 37 ++---- .../PropertyMappingWithElementHost.csproj | 82 ++++--------- .../mousecapturechanged.csproj | 85 +++----------- .../TabStop/splitcontainer.csproj | 61 ++-------- .../Stroke/Draw/DrawTransformSample.csproj | 68 ++--------- .../GetClipResult/HitTestSample_CS.csproj | 55 ++------- .../Overview/GrabBaml.csproj | 39 ++----- .../animateproperty_csharp.csproj | 49 ++------ .../Overview/BitmapFrame.csproj | 46 ++------ .../BitmapMetadata.csproj | 40 ++----- .../.ctor/BitmapEncoderDecoder.csproj | 40 ++----- .../Overview/CachedBitmapExample.csproj | 39 ++----- .../.ctor/GifEncoderDecoder.csproj | 40 ++----- .../.ctor/JpegEncoderDecoder.csproj | 40 ++----- .../.ctor/PngEncoderDecoder.csproj | 40 ++----- .../.ctor/TiffEncoderDecoder.csproj | 40 ++----- .../.ctor/WDPEncoderDecoder.csproj | 40 ++----- .../Overview/BitmapImageProps.csproj | 39 ++----- .../NavigationWindow/Overview/csharp.csproj | 90 ++++----------- .../PageFunctionT/OnReturn/CSharp.csproj | 87 ++++---------- .../Ellipse/Overview/ShapesProcedural.csproj | 38 ++---- .../Shape/Fill/BrushesMiscSnippets.csproj | 52 +++------ .../JumpList/Overview/jumplistsample.csproj | 95 ++++----------- .../Overview/shell_taskbaritemsample.csproj | 100 ++++------------ .../ThreadingWeatherForecastSample.csproj | 62 +++------- .../CheckAccess/DispatcherAccessSample.csproj | 69 +++-------- .../DispatcherSnippets.csproj | 80 +++---------- .../InvalidateRequeryWithSystemTimer.csproj | 69 +++-------- .../ThreadingPrimeNumberSample.csproj | 62 +++------- .../DispatcherObjectAccessSample.csproj | 69 +++-------- .../Overview/XpsReadWriteSign.csproj | 91 ++++----------- .../Application/Activated/CSharp.csproj | 87 ++++---------- .../CSharp.csproj | 86 ++++---------- .../Application/Exit/CSharp.csproj | 87 ++++---------- .../ApplicationFindResourceSnippets.csproj | 71 +++--------- .../Application/Properties/CSharp.csproj | 87 ++++---------- .../Application/SessionEnding/CSharp.csproj | 87 ++++---------- .../Application/ShutdownMode/XAML.csproj | 86 ++++---------- .../Application/Startup/CSharp.csproj | 87 ++++---------- .../ApplicationTryFindResourceSnippets.csproj | 72 +++--------- .../Application/Windows/CSharp.csproj | 89 ++++----------- .../Overview/flowmiscsnippets_snip.csproj | 49 +++----- .../Overview/DragDropMiscCode.csproj | 69 +++-------- .../Overview/DPCustom.csproj | 36 +++--- .../.ctor/CorePseudocode.csproj | 62 +++------- .../Condition/Binding/DataTrigger.csproj | 67 +++-------- .../Overview/ControlTemplateExamples.csproj | 47 ++------ .../AddHandler/EventOvwSupport.csproj | 40 +++---- .../ContentElementsSmorgasbord.csproj | 46 +++----- .../Overview/ThicknessSamp.csproj | 35 ++---- .../Overview/DataTemplatingSample.csproj | 57 +++------ .../Triggers/DataBindingLab.csproj | 76 +++--------- .../ClearValue/DPClearValue.csproj | 37 +++--- .../CoerceValue/SDKSampleLibrary.csproj | 42 ++----- .../SDKSampleLibrary.csproj | 34 ++---- .../Overview/WPFAquariumObjects.csproj | 30 ++--- .../PropertiesOvwSupport.csproj | 50 +++----- .../Overview/NumericUpDownOneProject.csproj | 74 +++--------- .../DoDragDrop/dragdropsnippets.csproj | 90 ++++----------- .../SDKSampleLibrary.csproj | 34 ++---- .../StyleEventTriggerAnimation.csproj | 42 ++----- .../ErrorException/MediaElementExample.csproj | 49 +++----- .../Overview/FloaterFigureSnippets.csproj | 72 +++--------- .../Overview/BlockSnippets.csproj | 61 +++------- .../Overview/OpenTypeFontSnippets.csproj | 46 ++------ .../FontStyle/Overview/FontSnippets.csproj | 100 ++++++---------- .../ContextMenuClosing/cursors.csproj | 60 +++------- .../ForceCursor/forcecursor.csproj | 35 ++---- .../Parent/TextPointer_Snippets.csproj | 65 +++-------- .../ToolTip/TableSnippets2.csproj | 67 +++-------- .../Height_MinHeight_MaxHeight_CSharp.csproj | 41 +++---- .../Width_MinWidth_MaxWidth_CSharp.csproj | 41 +++---- .../BeginStoryboard/CubeAnimation_XBAP.csproj | 83 +++----------- .../BindingGroup/BindingGroupSnippets.csproj | 108 ++++-------------- .../DataContext/MasterDetail.csproj | 47 +++----- .../CustomControlLibrary.csproj | 53 ++------- .../GetVisualChild/ResizingAdorner.csproj | 39 +++---- .../IsLoaded/GroupBoxExample.csproj | 62 +++------- .../LayoutTransformCsharp.csproj | 41 ++----- .../MoveFocus/FocusSample.csproj | 65 +++-------- .../Name/animateheight_csharp.csproj | 39 ++----- .../Parent/GeometryDesigner.csproj | 51 ++------- .../AnimateProperty_Storyboards_csharp.csproj | 87 ++++---------- .../FrameworkElement/Style/FEResource.csproj | 41 ++----- .../FrameworkElement/ToolTip/StatusBar.csproj | 52 +++------ .../.ctor/PropertyMetadataAPIs.csproj | 31 ++--- .../freezablesample_csharp.csproj | 42 ++----- .../AltnerationIndexSnippets.csproj | 95 ++++----------- .../Overview/hierarchicaldatatemplate.csproj | 56 +++------ .../Canvas_Positioning_Properties.csproj | 45 +++----- .../Category/AttributesSnippets.csproj | 58 +++------- .../MessageBox/Show/CSharp.csproj | 67 +++-------- .../Point/Overview/PointExamples_snip.csproj | 59 +++------- .../MergedDictionaries/resourcemerge.csproj | 48 +++----- .../.ctor/SDKSampleLibrary.csproj | 42 ++----- .../RoutedEvent/ColorPicker.csproj | 67 +++-------- .../Overview/autogrid.csproj | 49 +++----- .../Setter/Property/StyleOvw1.csproj | 47 +++----- .../Setter/Value/BindingValidation.csproj | 66 +++-------- .../Size/Overview/PlotPanel_csharp.csproj | 36 ++---- .../Overview/SplashScreenDemo.csproj | 78 ++----------- .../Overview/MyInkEraser.csproj | 95 ++++----------- .../Style/Setters/ListBoxItemStyle.csproj | 50 +++----- .../Overview/stylingintrosample.csproj | 81 +++---------- .../Overview/vsmcustomcontrol.csproj | 108 ++++-------------- .../.ctor/TextDecorationSnippets.csproj | 38 +++--- .../Overview/Performance.csproj | 45 +++----- .../Overview/textmarkerstylesnippets.csproj | 48 ++------ .../Overview/textboxbase_samp.csproj | 39 +++---- .../AllowDrop/dropopentextfile.csproj | 44 +++---- .../TimingBehavior_csharp.csproj | 92 ++++----------- .../BeginAnimation/BrushesIntroduction.csproj | 94 +++------------ .../BitmapEffect/EffectsGallery.csproj | 72 ++++-------- .../UIElement/Clip/ClipPathExample.csproj | 42 +++---- .../UIElement/Effect/ShaderEffectDemo.csproj | 75 +++--------- .../UIElement/Focus/CursorToEnd.csproj | 40 +++---- .../richtextbox_noscrollviewer.csproj | 47 +++----- .../CommandingOverviewSnippets.csproj | 65 +++-------- .../RoutedEventAddRemoveHandler.csproj | 37 +++--- .../IsFocused/PopupPropertiesSample.csproj | 57 +++------ .../basicmanipulation.csproj | 94 ++++----------- .../IsMouseCaptured/MouseSnippetSample.csproj | 56 +++------ .../IsMouseOver/listviewcheckbox.csproj | 60 +++------- .../OnRender/Light_Custom_Panel_csharp.csproj | 36 ++---- .../OpacityMask/OpacityMasking_markup.csproj | 46 +++----- .../RenderSize/AdornersMiscCode.csproj | 64 +++-------- .../RenderTransformOrigin/project.csproj | 56 +++------ .../UIElement3D/Overview/Shapes.csproj | 78 +++---------- .../Vector/.ctor/VectorExamples_snip.csproj | 59 +++------- .../Vector/Overview/MilVectorSample.csproj | 61 +++------- .../MPA_Layout_VerticallAlignment.csproj | 39 ++----- .../Overview/vsmbuttontemplate.csproj | 97 +++------------- .../vsmgotoelementstate.csproj | 80 +++---------- .../System.Windows/Window/Close/CSharp.csproj | 84 ++++---------- .../Window/Closing/CSharp.csproj | 84 ++++---------- .../Window/DialogResult/CSharp.csproj | 91 +++++---------- .../DragMove/WindowDragMoveSnippets.csproj | 82 ++++--------- .../Window/Icon/WindowIconSample.csproj | 80 +++---------- .../Window/Overview/CSharp.csproj | 86 ++++---------- .../Window/OwnedWindows/CSharp.csproj | 85 ++++---------- .../WindowRestoreBoundsSnippets.csproj | 68 +++-------- .../WindowShowActivatedSnippets.csproj | 102 ++++------------- .../Window/ShowDialog/CSharp.csproj | 89 +++++---------- 158 files changed, 2402 insertions(+), 7207 deletions(-) diff --git a/snippets/csharp/System.Windows.Automation.Provider/IGridItemProvider/Column/PatternProviders.csproj b/snippets/csharp/System.Windows.Automation.Provider/IGridItemProvider/Column/PatternProviders.csproj index 0e0008e5aec..702e645ab0f 100644 --- a/snippets/csharp/System.Windows.Automation.Provider/IGridItemProvider/Column/PatternProviders.csproj +++ b/snippets/csharp/System.Windows.Automation.Provider/IGridItemProvider/Column/PatternProviders.csproj @@ -1,54 +1,16 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {F2C45D43-46E8-47AC-8747-3E0976144178} WinExe - Properties + net10.0-windows + true + true + false + false UIAProvider UIAProvider - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\UIAutomationProvider.dll - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\UIAutomationTypes.dll - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\WindowsBase.dll - - + @@ -62,8 +24,5 @@ - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Automation.Provider/IInvokeProvider/Invoke/UIAProvider.csproj b/snippets/csharp/System.Windows.Automation.Provider/IInvokeProvider/Invoke/UIAProvider.csproj index 2c02c2d4eab..48e67e2defe 100644 --- a/snippets/csharp/System.Windows.Automation.Provider/IInvokeProvider/Invoke/UIAProvider.csproj +++ b/snippets/csharp/System.Windows.Automation.Provider/IInvokeProvider/Invoke/UIAProvider.csproj @@ -1,54 +1,16 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {F2C45D43-46E8-47AC-8747-3E0976144178} WinExe - Properties + net10.0-windows + true + true + false + false UIAProvider UIAProvider - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\UIAutomationProvider.dll - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\UIAutomationTypes.dll - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\WindowsBase.dll - - + Form @@ -62,8 +24,5 @@ - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Automation/Automation/AddStructureChangedEventHandler/FocusTracker.csproj b/snippets/csharp/System.Windows.Automation/Automation/AddStructureChangedEventHandler/FocusTracker.csproj index 2bf325311dd..f337145e571 100644 --- a/snippets/csharp/System.Windows.Automation/Automation/AddStructureChangedEventHandler/FocusTracker.csproj +++ b/snippets/csharp/System.Windows.Automation/Automation/AddStructureChangedEventHandler/FocusTracker.csproj @@ -1,63 +1,16 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {52E37BD5-A902-4665-BDB6-865ECB6B3CE7} Exe - Properties + net10.0-windows + true + false ScreenReader ScreenReader - v4.8 - - - true - full - false - ..\..\..\sd_avalon.binaries.x86chk\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\UIAutomationClient.dll - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\UIAutomationTypes.dll - - - False - ..\..\..\..\..\sd_avalon.binaries.x86chk\WindowsBase.dll - - + - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Automation/ControlType/GetNeverSupportedPatterns/GetSupportedPatterns.csproj b/snippets/csharp/System.Windows.Automation/ControlType/GetNeverSupportedPatterns/GetSupportedPatterns.csproj index c11658be8af..9d296af84c0 100644 --- a/snippets/csharp/System.Windows.Automation/ControlType/GetNeverSupportedPatterns/GetSupportedPatterns.csproj +++ b/snippets/csharp/System.Windows.Automation/ControlType/GetNeverSupportedPatterns/GetSupportedPatterns.csproj @@ -1,52 +1,16 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {D1CECD2A-61C4-45EE-964D-16E4C9FD1213} WinExe - Properties + net10.0-windows + true + true + false + false GetSupportedPatterns GetSupportedPatterns - v4.8 - - - - true - full - false - ..\..\..\sd_avalon.binaries.x86chk\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - False - ..\..\..\sd_avalon.binaries.x86chk\UIAutomationClient.dll - False - - - False - ..\..\..\sd_avalon.binaries.x86chk\UIAutomationTypes.dll - False - - + Form @@ -55,20 +19,13 @@ GetPatternsForm.cs + + + - Designer GetPatternsForm.cs + Designer - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Automation/InvokePattern/Invoke/UIAInvokePattern_snip.csproj b/snippets/csharp/System.Windows.Automation/InvokePattern/Invoke/UIAInvokePattern_snip.csproj index 824b7af19c1..ba9647f1f43 100644 --- a/snippets/csharp/System.Windows.Automation/InvokePattern/Invoke/UIAInvokePattern_snip.csproj +++ b/snippets/csharp/System.Windows.Automation/InvokePattern/Invoke/UIAInvokePattern_snip.csproj @@ -1,84 +1,44 @@ - + + - Debug - AnyCPU - {7F2D7357-AD80-43AB-934C-955DACFA3B1D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + true + false UIAInvokePattern_snip UIAInvokePattern_snip - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - - - - 4.0 - - - - - - - + + Resources.resx + + + Settings.settings + + + + UIAInvokePatternTarget.cs + + + - ResXFileCodeGenerator Resources.cs - Designer - Designer UIAInvokePatternTarget.cs - - True - Resources.resx - + + + SettingsSingleFileGenerator Settings.cs - - True - Settings.settings - - - Form - - - UIAInvokePatternTarget.cs - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Automation/TextPattern/AnimationStyleAttribute/UIATextPattern_snip.csproj b/snippets/csharp/System.Windows.Automation/TextPattern/AnimationStyleAttribute/UIATextPattern_snip.csproj index a541803a568..2b0209d022d 100644 --- a/snippets/csharp/System.Windows.Automation/TextPattern/AnimationStyleAttribute/UIATextPattern_snip.csproj +++ b/snippets/csharp/System.Windows.Automation/TextPattern/AnimationStyleAttribute/UIATextPattern_snip.csproj @@ -1,72 +1,38 @@ - + + - Debug - AnyCPU - {B1FF714F-061D-44DB-87BF-46933710038A} + WinExe + net10.0-windows + true + true + false UIATextPattern_snip UIATextPattern_snip - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.8 - - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - - - - - - 4.0 - - - - + + + Resources.resx + + + Settings.settings + + + - - ResXFileCodeGenerator Resources.cs - - True - Resources.resx - + + + SettingsSingleFileGenerator Settings.cs - - True - Settings.settings - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/Border/Overview/Margin_Padding_Alignment_Sample.csproj b/snippets/csharp/System.Windows.Controls/Border/Overview/Margin_Padding_Alignment_Sample.csproj index a1fab14f7dd..e87f732c097 100644 --- a/snippets/csharp/System.Windows.Controls/Border/Overview/Margin_Padding_Alignment_Sample.csproj +++ b/snippets/csharp/System.Windows.Controls/Border/Overview/Margin_Padding_Alignment_Sample.csproj @@ -1,33 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/Canvas/Overview/Canvas_Ovw_Sample.csproj b/snippets/csharp/System.Windows.Controls/Canvas/Overview/Canvas_Ovw_Sample.csproj index 32afa68f138..1b43bc550ff 100644 --- a/snippets/csharp/System.Windows.Controls/Canvas/Overview/Canvas_Ovw_Sample.csproj +++ b/snippets/csharp/System.Windows.Controls/Canvas/Overview/Canvas_Ovw_Sample.csproj @@ -1,35 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/DockPanel/Dock/DockPanel_Ovw_Sample.csproj b/snippets/csharp/System.Windows.Controls/DockPanel/Dock/DockPanel_Ovw_Sample.csproj index b7c2f224719..764055038e0 100644 --- a/snippets/csharp/System.Windows.Controls/DockPanel/Dock/DockPanel_Ovw_Sample.csproj +++ b/snippets/csharp/System.Windows.Controls/DockPanel/Dock/DockPanel_Ovw_Sample.csproj @@ -1,35 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/Grid/Overview/Grid_Code_csharp.csproj b/snippets/csharp/System.Windows.Controls/Grid/Overview/Grid_Code_csharp.csproj index 5b123e21b35..a06c80a48ba 100644 --- a/snippets/csharp/System.Windows.Controls/Grid/Overview/Grid_Code_csharp.csproj +++ b/snippets/csharp/System.Windows.Controls/Grid/Overview/Grid_Code_csharp.csproj @@ -1,34 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/Image/Source/StackPanel_Ovw_Sample4.csproj b/snippets/csharp/System.Windows.Controls/Image/Source/StackPanel_Ovw_Sample4.csproj index de6f653a136..94e1a6cc095 100644 --- a/snippets/csharp/System.Windows.Controls/Image/Source/StackPanel_Ovw_Sample4.csproj +++ b/snippets/csharp/System.Windows.Controls/Image/Source/StackPanel_Ovw_Sample4.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/MediaElement/Stretch/ViewboxCode.csproj b/snippets/csharp/System.Windows.Controls/MediaElement/Stretch/ViewboxCode.csproj index 16a6f7a58c6..794a1d506c7 100644 --- a/snippets/csharp/System.Windows.Controls/MediaElement/Stretch/ViewboxCode.csproj +++ b/snippets/csharp/System.Windows.Controls/MediaElement/Stretch/ViewboxCode.csproj @@ -1,33 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/Panel/SetZIndex/CanvasZ-Order.csproj b/snippets/csharp/System.Windows.Controls/Panel/SetZIndex/CanvasZ-Order.csproj index 42a9b99a69d..5b9a01508e1 100644 --- a/snippets/csharp/System.Windows.Controls/Panel/SetZIndex/CanvasZ-Order.csproj +++ b/snippets/csharp/System.Windows.Controls/Panel/SetZIndex/CanvasZ-Order.csproj @@ -1,35 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/ScrollBarVisibility/Overview/ScrollViewer_wcp.csproj b/snippets/csharp/System.Windows.Controls/ScrollBarVisibility/Overview/ScrollViewer_wcp.csproj index bb0c0c228b7..ef5a88fbcf2 100644 --- a/snippets/csharp/System.Windows.Controls/ScrollBarVisibility/Overview/ScrollViewer_wcp.csproj +++ b/snippets/csharp/System.Windows.Controls/ScrollBarVisibility/Overview/ScrollViewer_wcp.csproj @@ -1,35 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Controls/WrapPanel/Overview/WrapPanel_Code_csharp.csproj b/snippets/csharp/System.Windows.Controls/WrapPanel/Overview/WrapPanel_Code_csharp.csproj index ddf3dc871d7..0db7777d054 100644 --- a/snippets/csharp/System.Windows.Controls/WrapPanel/Overview/WrapPanel_Code_csharp.csproj +++ b/snippets/csharp/System.Windows.Controls/WrapPanel/Overview/WrapPanel_Code_csharp.csproj @@ -1,34 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Data/BindingExpression/Overview/CodeOnlyBinding.csproj b/snippets/csharp/System.Windows.Data/BindingExpression/Overview/CodeOnlyBinding.csproj index 12374f8ce35..2174cc839f2 100644 --- a/snippets/csharp/System.Windows.Data/BindingExpression/Overview/CodeOnlyBinding.csproj +++ b/snippets/csharp/System.Windows.Data/BindingExpression/Overview/CodeOnlyBinding.csproj @@ -1,36 +1,17 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample CodeOnlyBinding - winexe - Debug - MSBuild - False - bin\$(Configuration)\ - {92583AE8-07C4-422A-863D-7D84CD49DA4D} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Forms.Integration/ElementHost/PropertyMap/PropertyMappingWithElementHost.csproj b/snippets/csharp/System.Windows.Forms.Integration/ElementHost/PropertyMap/PropertyMappingWithElementHost.csproj index c7fb30e0712..38d735931c8 100644 --- a/snippets/csharp/System.Windows.Forms.Integration/ElementHost/PropertyMap/PropertyMappingWithElementHost.csproj +++ b/snippets/csharp/System.Windows.Forms.Integration/ElementHost/PropertyMap/PropertyMappingWithElementHost.csproj @@ -1,82 +1,44 @@ - + + - Debug - false - AnyCPU - 10.0.20821 - 2.0 - {0F034258-7873-4C92-AE48-620406E847AB} WinExe - Properties + net10.0-windows + true + true + false PropertyMappingWithElementHost PropertyMappingWithElementHost - v4.8 - - - false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - 4.0 - - - - - - - - - + - - Form - + Form1.cs - + + Resources.resx + + + Settings.settings + + + + - Designer Form1.cs ResXFileCodeGenerator Resources.Designer.cs - Designer - - True - Resources.resx - + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - Settings.settings - True - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Forms/Control/MouseCaptureChanged/mousecapturechanged.csproj b/snippets/csharp/System.Windows.Forms/Control/MouseCaptureChanged/mousecapturechanged.csproj index 47c0d18b0c8..785634150da 100644 --- a/snippets/csharp/System.Windows.Forms/Control/MouseCaptureChanged/mousecapturechanged.csproj +++ b/snippets/csharp/System.Windows.Forms/Control/MouseCaptureChanged/mousecapturechanged.csproj @@ -1,50 +1,15 @@ - - + + - Debug - x86 - 8.0.30703 - 2.0 - {8B30C593-5F3A-424C-BF76-DD50A8C85DC4} WinExe - Properties + net10.0-windows + true + false + false MouseCaptureChanged MouseCaptureChanged - v4.8 - - 512 - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - + Form @@ -53,35 +18,23 @@ Form1.cs - + + Resources.resx + + + Settings.settings + + + + Form1.cs + Designer ResXFileCodeGenerator Resources.Designer.cs - Designer - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Forms/SplitContainer/TabStop/splitcontainer.csproj b/snippets/csharp/System.Windows.Forms/SplitContainer/TabStop/splitcontainer.csproj index 1505dc5271d..5ec9359d34c 100644 --- a/snippets/csharp/System.Windows.Forms/SplitContainer/TabStop/splitcontainer.csproj +++ b/snippets/csharp/System.Windows.Forms/SplitContainer/TabStop/splitcontainer.csproj @@ -1,61 +1,20 @@ - - + + - Debug - x86 - 8.0.30703 - 2.0 - {706A822B-0609-4F1C-9BEB-09ABBE305CCB} Exe - Properties + net10.0-windows + true + false + false SplitContainer SplitContainer - v4.8 - - 512 + WFO1000 - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - + Form - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Ink/Stroke/Draw/DrawTransformSample.csproj b/snippets/csharp/System.Windows.Ink/Stroke/Draw/DrawTransformSample.csproj index 60f895d00b1..75f82904fb1 100644 --- a/snippets/csharp/System.Windows.Ink/Stroke/Draw/DrawTransformSample.csproj +++ b/snippets/csharp/System.Windows.Ink/Stroke/Draw/DrawTransformSample.csproj @@ -1,67 +1,17 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {606065AF-E14F-4CF2-9CAB-D0F32CDD84A2} Exe - Properties + net10.0-windows + true + true + false DrawTransformSample DrawTransformSample - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\PresentationCore.dll - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\PresentationFramework.dll - - - - - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\UIAutomationProvider.dll - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\UIAutomationTypes.dll - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\WindowsBase.dll - - - False - ..\..\..\..\WindowsFormsIntegration.dll - - + - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Ink/Stroke/GetClipResult/HitTestSample_CS.csproj b/snippets/csharp/System.Windows.Ink/Stroke/GetClipResult/HitTestSample_CS.csproj index 0717a2bac17..4da839927a7 100644 --- a/snippets/csharp/System.Windows.Ink/Stroke/GetClipResult/HitTestSample_CS.csproj +++ b/snippets/csharp/System.Windows.Ink/Stroke/GetClipResult/HitTestSample_CS.csproj @@ -1,55 +1,16 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {334BE712-A97C-4BC8-AAC5-366DAD6E215C} Exe - Properties + net10.0-windows + true + false HitTestSample_CS HitTestSample_CS - v4.8 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\PresentationCore.dll - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\PresentationFramework.dll - - - - - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\WindowsBase.dll - - + - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Markup.Localizer/BamlLocalizableResource/Overview/GrabBaml.csproj b/snippets/csharp/System.Windows.Markup.Localizer/BamlLocalizableResource/Overview/GrabBaml.csproj index 36d40141591..6a20dea9373 100644 --- a/snippets/csharp/System.Windows.Markup.Localizer/BamlLocalizableResource/Overview/GrabBaml.csproj +++ b/snippets/csharp/System.Windows.Markup.Localizer/BamlLocalizableResource/Overview/GrabBaml.csproj @@ -1,34 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Animation/Animatable/BeginAnimation/animateproperty_csharp.csproj b/snippets/csharp/System.Windows.Media.Animation/Animatable/BeginAnimation/animateproperty_csharp.csproj index 2d291d411e2..c96411c07bd 100644 --- a/snippets/csharp/System.Windows.Media.Animation/Animatable/BeginAnimation/animateproperty_csharp.csproj +++ b/snippets/csharp/System.Windows.Media.Animation/Animatable/BeginAnimation/animateproperty_csharp.csproj @@ -1,42 +1,17 @@ - - + + - Microsoft.Samples.Animation.LocalAnimations + WinExe + net10.0-windows + true + false LocalAnimationsExample - winexe - Release - MSBuild - False - {9DDB1AAC-567C-45D3-A4A7-352DC99E13C0} - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - Code - - - Code - - - Code - + + + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/BitmapCodecInfo/Overview/BitmapFrame.csproj b/snippets/csharp/System.Windows.Media.Imaging/BitmapCodecInfo/Overview/BitmapFrame.csproj index 45178a566f8..4ae5c934e59 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/BitmapCodecInfo/Overview/BitmapFrame.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/BitmapCodecInfo/Overview/BitmapFrame.csproj @@ -1,47 +1,25 @@ - - + + + WinExe + net10.0-windows + true + false BitmapFrame - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - 10.0.20821 - {5C13CD63-6693-482D-853C-0A76246D48C8} - - false - - - - - - Code - - + - - - - - - - - 4.0 - - + + Always + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/BitmapDecoder/CreateInPlaceBitmapMetadataWriter/BitmapMetadata.csproj b/snippets/csharp/System.Windows.Media.Imaging/BitmapDecoder/CreateInPlaceBitmapMetadataWriter/BitmapMetadata.csproj index e3a25446e6b..7ef0d8ee60f 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/BitmapDecoder/CreateInPlaceBitmapMetadataWriter/BitmapMetadata.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/BitmapDecoder/CreateInPlaceBitmapMetadataWriter/BitmapMetadata.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 10.0.20821 - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/BmpBitmapDecoder/.ctor/BitmapEncoderDecoder.csproj b/snippets/csharp/System.Windows.Media.Imaging/BmpBitmapDecoder/.ctor/BitmapEncoderDecoder.csproj index e9a90eb1332..e4e593028b5 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/BmpBitmapDecoder/.ctor/BitmapEncoderDecoder.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/BmpBitmapDecoder/.ctor/BitmapEncoderDecoder.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/CachedBitmap/Overview/CachedBitmapExample.csproj b/snippets/csharp/System.Windows.Media.Imaging/CachedBitmap/Overview/CachedBitmapExample.csproj index 360969ec309..561c59845cf 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/CachedBitmap/Overview/CachedBitmapExample.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/CachedBitmap/Overview/CachedBitmapExample.csproj @@ -1,38 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/GifBitmapDecoder/.ctor/GifEncoderDecoder.csproj b/snippets/csharp/System.Windows.Media.Imaging/GifBitmapDecoder/.ctor/GifEncoderDecoder.csproj index fb56094dcc2..f187ccb73fb 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/GifBitmapDecoder/.ctor/GifEncoderDecoder.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/GifBitmapDecoder/.ctor/GifEncoderDecoder.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/JpegBitmapDecoder/.ctor/JpegEncoderDecoder.csproj b/snippets/csharp/System.Windows.Media.Imaging/JpegBitmapDecoder/.ctor/JpegEncoderDecoder.csproj index 76334ddea44..58e41ab038d 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/JpegBitmapDecoder/.ctor/JpegEncoderDecoder.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/JpegBitmapDecoder/.ctor/JpegEncoderDecoder.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/PngBitmapDecoder/.ctor/PngEncoderDecoder.csproj b/snippets/csharp/System.Windows.Media.Imaging/PngBitmapDecoder/.ctor/PngEncoderDecoder.csproj index 607a26cb6bd..7b5a9a33f7b 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/PngBitmapDecoder/.ctor/PngEncoderDecoder.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/PngBitmapDecoder/.ctor/PngEncoderDecoder.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/TiffBitmapDecoder/.ctor/TiffEncoderDecoder.csproj b/snippets/csharp/System.Windows.Media.Imaging/TiffBitmapDecoder/.ctor/TiffEncoderDecoder.csproj index d1c651cd389..d3307300b42 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/TiffBitmapDecoder/.ctor/TiffEncoderDecoder.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/TiffBitmapDecoder/.ctor/TiffEncoderDecoder.csproj @@ -1,39 +1,21 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media.Imaging/WmpBitmapDecoder/.ctor/WDPEncoderDecoder.csproj b/snippets/csharp/System.Windows.Media.Imaging/WmpBitmapDecoder/.ctor/WDPEncoderDecoder.csproj index b87cc92bad9..05136c089ee 100644 --- a/snippets/csharp/System.Windows.Media.Imaging/WmpBitmapDecoder/.ctor/WDPEncoderDecoder.csproj +++ b/snippets/csharp/System.Windows.Media.Imaging/WmpBitmapDecoder/.ctor/WDPEncoderDecoder.csproj @@ -1,36 +1,17 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - - - - - - - - - - - 4.0 - - + + Always @@ -39,4 +20,5 @@ Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Media/ColorContext/Overview/BitmapImageProps.csproj b/snippets/csharp/System.Windows.Media/ColorContext/Overview/BitmapImageProps.csproj index 719b61a8984..5702e8a105b 100644 --- a/snippets/csharp/System.Windows.Media/ColorContext/Overview/BitmapImageProps.csproj +++ b/snippets/csharp/System.Windows.Media/ColorContext/Overview/BitmapImageProps.csproj @@ -1,35 +1,17 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - 10.0.20821 - 2.0 - bin\$(Configuration)\ - v4.8 - - - + - - Code - - - - - - - - - - - 4.0 - - + + Always @@ -38,4 +20,5 @@ Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Navigation/NavigationWindow/Overview/csharp.csproj b/snippets/csharp/System.Windows.Navigation/NavigationWindow/Overview/csharp.csproj index 103c65a9ae8..40d653cabc6 100644 --- a/snippets/csharp/System.Windows.Navigation/NavigationWindow/Overview/csharp.csproj +++ b/snippets/csharp/System.Windows.Navigation/NavigationWindow/Overview/csharp.csproj @@ -1,94 +1,54 @@ - + + - Debug - AnyCPU - {D2B3E81D-5B1E-47EF-8B5B-BF7D8696E2E5} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + + + + + + - - True - True Settings.settings - - App.xaml - Code MainWindow.xaml - Code - - - Code HomePage.xaml - + + Resources.resx + + + + ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Navigation/PageFunctionT/OnReturn/CSharp.csproj b/snippets/csharp/System.Windows.Navigation/PageFunctionT/OnReturn/CSharp.csproj index 1f41cece68f..fabc7c3e65d 100644 --- a/snippets/csharp/System.Windows.Navigation/PageFunctionT/OnReturn/CSharp.csproj +++ b/snippets/csharp/System.Windows.Navigation/PageFunctionT/OnReturn/CSharp.csproj @@ -1,90 +1,51 @@ - + + - Debug - AnyCPU - {DDAE6101-695C-4477-BE30-95354393EF52} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + - Code GetStringPageFunctionCaller.xaml - - True - True Settings.settings + + Resources.resx + + + GetStringPageFunction.xaml + + + + ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - Code - GetStringPageFunction.xaml - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Shapes/Ellipse/Overview/ShapesProcedural.csproj b/snippets/csharp/System.Windows.Shapes/Ellipse/Overview/ShapesProcedural.csproj index 842871c0d04..7afabdba7f7 100644 --- a/snippets/csharp/System.Windows.Shapes/Ellipse/Overview/ShapesProcedural.csproj +++ b/snippets/csharp/System.Windows.Shapes/Ellipse/Overview/ShapesProcedural.csproj @@ -1,35 +1,15 @@ - - + + - SDKSample + WinExe + net10.0-windows + true + false ShapesProcedural - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - + - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Shapes/Shape/Fill/BrushesMiscSnippets.csproj b/snippets/csharp/System.Windows.Shapes/Shape/Fill/BrushesMiscSnippets.csproj index 80efc04ab8f..44002a8c314 100644 --- a/snippets/csharp/System.Windows.Shapes/Shape/Fill/BrushesMiscSnippets.csproj +++ b/snippets/csharp/System.Windows.Shapes/Shape/Fill/BrushesMiscSnippets.csproj @@ -1,57 +1,33 @@ - - + + - SDKSample + WinExe + net10.0-windows + true + false MiscSnippets - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {BDDD444F-2D67-4503-A9B6-60E241A55762} - bin\$(Configuration)\ - en-US - v4.8 - - - - false - - - + - - + + + + MyApp.xaml - Code SampleViewer.xaml - Code - - - - - - - - - 4.0 - - - - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Shell/JumpList/Overview/jumplistsample.csproj b/snippets/csharp/System.Windows.Shell/JumpList/Overview/jumplistsample.csproj index 93dc92050d0..a97afb5ff4a 100644 --- a/snippets/csharp/System.Windows.Shell/JumpList/Overview/jumplistsample.csproj +++ b/snippets/csharp/System.Windows.Shell/JumpList/Overview/jumplistsample.csproj @@ -1,109 +1,54 @@ - - + + - Debug - x86 - 10.0.20821 - 2.0 - {5FC4DE02-99AE-4CF5-9135-6565D661A222} WinExe - Properties + net10.0-windows + true + false JumpListSample JumpListSample - v4.8 - - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code MainWindow.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Shell/TaskbarItemInfo/Overview/shell_taskbaritemsample.csproj b/snippets/csharp/System.Windows.Shell/TaskbarItemInfo/Overview/shell_taskbaritemsample.csproj index 28dfe6569b0..25f1bd9e6b7 100644 --- a/snippets/csharp/System.Windows.Shell/TaskbarItemInfo/Overview/shell_taskbaritemsample.csproj +++ b/snippets/csharp/System.Windows.Shell/TaskbarItemInfo/Overview/shell_taskbaritemsample.csproj @@ -1,110 +1,58 @@ - - + + - Debug - x86 - 8.0.30703 - 2.0 - {B88639C3-0EA5-421A-AD71-488A7CCA1C62} WinExe - Properties + net10.0-windows + true + false Shell_TaskbarItemSample Shell_ThumbButtonSample - v4.8 - - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code MainWindow.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + + + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Threading/Dispatcher/BeginInvoke/ThreadingWeatherForecastSample.csproj b/snippets/csharp/System.Windows.Threading/Dispatcher/BeginInvoke/ThreadingWeatherForecastSample.csproj index 6fb1e5b5ff5..bc8ea8a6d9b 100644 --- a/snippets/csharp/System.Windows.Threading/Dispatcher/BeginInvoke/ThreadingWeatherForecastSample.csproj +++ b/snippets/csharp/System.Windows.Threading/Dispatcher/BeginInvoke/ThreadingWeatherForecastSample.csproj @@ -1,67 +1,37 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples ThreadingWeatherForecastSample - 4 - winexe - 1.0.0.* - - {884214C5-0C31-4CC6-ACF0-6096E0993FFE} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false - - - - - - - - - 4.0 - - - - + - Designer MSBuild:Compile + + + - Designer MSBuild:Compile + + + app.xaml - Code Window1.xaml - Code + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Threading/Dispatcher/CheckAccess/DispatcherAccessSample.csproj b/snippets/csharp/System.Windows.Threading/Dispatcher/CheckAccess/DispatcherAccessSample.csproj index 2d37ec647c2..86c4cc3e02d 100644 --- a/snippets/csharp/System.Windows.Threading/Dispatcher/CheckAccess/DispatcherAccessSample.csproj +++ b/snippets/csharp/System.Windows.Threading/Dispatcher/CheckAccess/DispatcherAccessSample.csproj @@ -1,70 +1,33 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples DispatcherAccessSample - 4 - winexe - 1.0.0.* - - false - {203FC869-DDE5-46F1-AA9D-E1F1BE721179} - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + + + + + - - - - - - - - 4.0 - - - - - - - - + + - - - - - app.xaml - Code Window1.xaml - Code + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Threading/Dispatcher/DisableProcessing/DispatcherSnippets.csproj b/snippets/csharp/System.Windows.Threading/Dispatcher/DisableProcessing/DispatcherSnippets.csproj index b0195ab93fa..27fbafe334b 100644 --- a/snippets/csharp/System.Windows.Threading/Dispatcher/DisableProcessing/DispatcherSnippets.csproj +++ b/snippets/csharp/System.Windows.Threading/Dispatcher/DisableProcessing/DispatcherSnippets.csproj @@ -1,85 +1,37 @@ - + + - Debug - AnyCPU - {CBA73165-7EE1-4083-953B-75F69800B324} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false DispatcherSnippets DispatcherSnippets - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - false - 1.0.0.* - true - true - Publish\ - v4.8 - - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false - - - - - - - - - - 4.0 - - - - - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Threading/Dispatcher/Invoke/InvalidateRequeryWithSystemTimer.csproj b/snippets/csharp/System.Windows.Threading/Dispatcher/Invoke/InvalidateRequeryWithSystemTimer.csproj index 279bfc0d8a4..3f21d20f502 100644 --- a/snippets/csharp/System.Windows.Threading/Dispatcher/Invoke/InvalidateRequeryWithSystemTimer.csproj +++ b/snippets/csharp/System.Windows.Threading/Dispatcher/Invoke/InvalidateRequeryWithSystemTimer.csproj @@ -1,74 +1,37 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples InvalidateRequeryWithSystemTimer - 4 - winexe - 1.0.0.* - - false - {6DC70F4B-6835-4C21-AD56-DC1161CBA927} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false - - - - - - - - - - 4.0 - - - - - - - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile + + + app.xaml - Code Window1.xaml - Code + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Threading/Dispatcher/Overview/ThreadingPrimeNumberSample.csproj b/snippets/csharp/System.Windows.Threading/Dispatcher/Overview/ThreadingPrimeNumberSample.csproj index 991c9c355cb..a18bcd61e77 100644 --- a/snippets/csharp/System.Windows.Threading/Dispatcher/Overview/ThreadingPrimeNumberSample.csproj +++ b/snippets/csharp/System.Windows.Threading/Dispatcher/Overview/ThreadingPrimeNumberSample.csproj @@ -1,67 +1,37 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples ThreadingPrimeNumberSample - 4 - winexe - 1.0.0.* - - {53F8DDD9-7DC8-4DBC-BF48-D19E85FDB3EC} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false - - - - - - - - - 4.0 - - - - + - Designer MSBuild:Compile + + + - Designer MSBuild:Compile + + + app.xaml - Code Window1.xaml - Code + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Threading/DispatcherObject/CheckAccess/DispatcherObjectAccessSample.csproj b/snippets/csharp/System.Windows.Threading/DispatcherObject/CheckAccess/DispatcherObjectAccessSample.csproj index 5bcad4fd1b8..c3c34c43418 100644 --- a/snippets/csharp/System.Windows.Threading/DispatcherObject/CheckAccess/DispatcherObjectAccessSample.csproj +++ b/snippets/csharp/System.Windows.Threading/DispatcherObject/CheckAccess/DispatcherObjectAccessSample.csproj @@ -1,70 +1,33 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples DispatcherObjectAccessSample - 4 - winexe - 1.0.0.* - - false - {8B0EC2AC-D1B8-4D24-9F35-74FDC9D05C31} - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + + + + + - - - - - - - - 4.0 - - - - - - - - + + - - - - - app.xaml - Code Window1.xaml - Code + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/XpsReadWriteSign.csproj b/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/XpsReadWriteSign.csproj index b1ee3e0102d..13a14fbff17 100644 --- a/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/XpsReadWriteSign.csproj +++ b/snippets/csharp/System.Windows.Xps.Packaging/IXpsFixedDocumentReader/Overview/XpsReadWriteSign.csproj @@ -1,111 +1,66 @@ - + + - Debug - AnyCPU - {0DA25C02-0A70-4246-8DEE-0570A8FF1668} + WinExe + net10.0-windows + true + true + false XpsApiSdk XpsApiSdk - 4 - winexe - $(OutputType) - 1.0.0.* - x86 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false - - - - - - - - - - - - - - - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + + + app.xaml - Code Window1.xaml - Code - - - - - - - Form + + Properties.cs - - Form - + SignatureDefinition.cs + + + - Designer Properties.cs - Designer SignatureDefinition.cs - + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/Activated/CSharp.csproj b/snippets/csharp/System.Windows/Application/Activated/CSharp.csproj index 784697eef32..fffd98eb0e9 100644 --- a/snippets/csharp/System.Windows/Application/Activated/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/Activated/CSharp.csproj @@ -1,89 +1,50 @@ - + + - Debug - AnyCPU - {2C727B60-21B5-4F1F-81C2-2F7F372F26D7} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false SDKSample ApplicationDeactivatedSnippetSample_CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/DispatcherUnhandledException/CSharp.csproj b/snippets/csharp/System.Windows/Application/DispatcherUnhandledException/CSharp.csproj index c6ba64ce126..30247478a45 100644 --- a/snippets/csharp/System.Windows/Application/DispatcherUnhandledException/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/DispatcherUnhandledException/CSharp.csproj @@ -1,88 +1,50 @@ - + + - Debug - AnyCPU - {AE3A030C-DB62-4292-8AF5-398FA57EC7B0} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false SDKSample CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/Exit/CSharp.csproj b/snippets/csharp/System.Windows/Application/Exit/CSharp.csproj index 39f54b9b89b..1ab4152b57d 100644 --- a/snippets/csharp/System.Windows/Application/Exit/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/Exit/CSharp.csproj @@ -1,89 +1,50 @@ - + + - Debug - AnyCPU - {E4C9539E-9A93-4012-9924-6FE288B348EC} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/FindResource/ApplicationFindResourceSnippets.csproj b/snippets/csharp/System.Windows/Application/FindResource/ApplicationFindResourceSnippets.csproj index 42f739b374e..ffc72f0cdf1 100644 --- a/snippets/csharp/System.Windows/Application/FindResource/ApplicationFindResourceSnippets.csproj +++ b/snippets/csharp/System.Windows/Application/FindResource/ApplicationFindResourceSnippets.csproj @@ -1,71 +1,30 @@ - + + - Debug - AnyCPU - {753F15AE-DE1F-4EBA-A851-DA9548CB2509} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false ApplicationFindResourceSnippets ApplicationFindResourceSnippets - 4 - winexe - 1.0.0.* - - false - 3.0 - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + MainWindow.xaml - Code - - - - - - + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/Properties/CSharp.csproj b/snippets/csharp/System.Windows/Application/Properties/CSharp.csproj index 3ad7d684981..1ab4152b57d 100644 --- a/snippets/csharp/System.Windows/Application/Properties/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/Properties/CSharp.csproj @@ -1,89 +1,50 @@ - + + - Debug - AnyCPU - {41E3E324-F31F-42C2-8B0E-F8F673697A51} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/SessionEnding/CSharp.csproj b/snippets/csharp/System.Windows/Application/SessionEnding/CSharp.csproj index fafdb08289f..30247478a45 100644 --- a/snippets/csharp/System.Windows/Application/SessionEnding/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/SessionEnding/CSharp.csproj @@ -1,89 +1,50 @@ - + + - Debug - AnyCPU - {62FA3167-AA28-4B24-AC29-AA18B0E62340} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false SDKSample CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/ShutdownMode/XAML.csproj b/snippets/csharp/System.Windows/Application/ShutdownMode/XAML.csproj index 9e19f89aa8b..656457661b4 100644 --- a/snippets/csharp/System.Windows/Application/ShutdownMode/XAML.csproj +++ b/snippets/csharp/System.Windows/Application/ShutdownMode/XAML.csproj @@ -1,86 +1,48 @@ - + + - Debug - AnyCPU - {3BA4FE17-DA76-460B-BB8D-59D8F11A1F58} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false XAML XAML - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - - 4.0 - - - - - - - - + + - + MainWindow.xaml - + + Resources.resx + + + Settings.settings + + + + ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/Startup/CSharp.csproj b/snippets/csharp/System.Windows/Application/Startup/CSharp.csproj index 9035cd876e3..30247478a45 100644 --- a/snippets/csharp/System.Windows/Application/Startup/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/Startup/CSharp.csproj @@ -1,89 +1,50 @@ - + + - Debug - AnyCPU - {1887DD39-82D1-491E-9CFC-832F6EDF3136} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false SDKSample CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - - 4.0 - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/TryFindResource/ApplicationTryFindResourceSnippets.csproj b/snippets/csharp/System.Windows/Application/TryFindResource/ApplicationTryFindResourceSnippets.csproj index 0dfd7d74376..9bba2bd47d5 100644 --- a/snippets/csharp/System.Windows/Application/TryFindResource/ApplicationTryFindResourceSnippets.csproj +++ b/snippets/csharp/System.Windows/Application/TryFindResource/ApplicationTryFindResourceSnippets.csproj @@ -1,74 +1,34 @@ - + + - Debug - AnyCPU - {753F15AE-DE1F-4EBA-A851-DA9548CB2509} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false ApplicationTryFindResourceSnippets ApplicationTryFindResourceSnippets - 4 - winexe - 1.0.0.* - - false - 3.0 - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + MainWindow.xaml - Code - - - + - - - + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Application/Windows/CSharp.csproj b/snippets/csharp/System.Windows/Application/Windows/CSharp.csproj index b8bb30ae74b..383f105daf1 100644 --- a/snippets/csharp/System.Windows/Application/Windows/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/Windows/CSharp.csproj @@ -1,90 +1,51 @@ - + + - Debug - AnyCPU - {E0F76E9B-3E01-42D5-9B7A-C8543496BC3D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - false - true - .\bin\Release\ - TRACE - false + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + Resources.resx + + + Settings.settings + + + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/BaselineAlignment/Overview/flowmiscsnippets_snip.csproj b/snippets/csharp/System.Windows/BaselineAlignment/Overview/flowmiscsnippets_snip.csproj index f151c0d61cf..2809b3b3b63 100644 --- a/snippets/csharp/System.Windows/BaselineAlignment/Overview/flowmiscsnippets_snip.csproj +++ b/snippets/csharp/System.Windows/BaselineAlignment/Overview/flowmiscsnippets_snip.csproj @@ -1,61 +1,38 @@ - - + + - SDKSample + WinExe + net10.0-windows + true + false MiscSnippets - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {BDDD444F-2D67-4503-A9B6-60E241A55762} - bin\$(Configuration)\ - en-US - v4.8 - - - + - - + + + + MyApp.xaml - Code SampleViewer.xaml - Code FigureLengthExample.xaml - Code TextEffectTargetExample.xaml - Code - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Clipboard/Overview/DragDropMiscCode.csproj b/snippets/csharp/System.Windows/Clipboard/Overview/DragDropMiscCode.csproj index 619ebf6d820..36340a11f9e 100644 --- a/snippets/csharp/System.Windows/Clipboard/Overview/DragDropMiscCode.csproj +++ b/snippets/csharp/System.Windows/Clipboard/Overview/DragDropMiscCode.csproj @@ -1,68 +1,29 @@ - + + - Debug - AnyCPU - {02E6CC9F-5FF0-4CBD-BD69-A3C64CEE1E7C} + WinExe + net10.0-windows + true + false DragDropMiscCode DragDropMiscCode - 4 - winexe - 1.0.0.* - - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - + + + + + + - - - - - MyApp.xaml - Code Window1.xaml - Code - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/CoerceValueCallback/Overview/DPCustom.csproj b/snippets/csharp/System.Windows/CoerceValueCallback/Overview/DPCustom.csproj index 7623a86e09f..e8efe43e8ed 100644 --- a/snippets/csharp/System.Windows/CoerceValueCallback/Overview/DPCustom.csproj +++ b/snippets/csharp/System.Windows/CoerceValueCallback/Overview/DPCustom.csproj @@ -1,33 +1,25 @@ - + + - Debug + WinExe + net10.0-windows + true + false DPCustom - winexe - .\bin\debug\ - v4.8 - - 10.0.20821 + - - - - - - - - 4.0 - - - + + - + + + default.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/CorePseudocode.csproj b/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/CorePseudocode.csproj index fd945157c2b..69a90d42512 100644 --- a/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/CorePseudocode.csproj +++ b/snippets/csharp/System.Windows/ComponentResourceKey/.ctor/CorePseudocode.csproj @@ -1,69 +1,37 @@ - + + - Debug - AnyCPU - {0C3BB303-942E-44C6-80EA-40BF9CF3964F} + WinExe + net10.0-windows + true + false CorePseudocode CorePseudocode - winexe - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Condition/Binding/DataTrigger.csproj b/snippets/csharp/System.Windows/Condition/Binding/DataTrigger.csproj index 3618fb75c22..9148251a039 100644 --- a/snippets/csharp/System.Windows/Condition/Binding/DataTrigger.csproj +++ b/snippets/csharp/System.Windows/Condition/Binding/DataTrigger.csproj @@ -1,66 +1,29 @@ - - + + - MSBuild + WinExe + net10.0-windows + true + false SDKSample DataTriggerSample - winexe - False - Debug - AnyCPU - bin\$(Configuration)\ - False - en-US - 10.0.20821 - 2.0 - {855EBE54-C4FC-4A42-A518-6C988B9EA726} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + - - - - + + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Condition/Overview/ControlTemplateExamples.csproj b/snippets/csharp/System.Windows/Condition/Overview/ControlTemplateExamples.csproj index f3d220994f7..bf7db19db02 100644 --- a/snippets/csharp/System.Windows/Condition/Overview/ControlTemplateExamples.csproj +++ b/snippets/csharp/System.Windows/Condition/Overview/ControlTemplateExamples.csproj @@ -1,45 +1,20 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false ControlTemplateExamples ControlTemplateExamples - winexe - 10.0.20821 - 2.0 - {C0F48790-C039-47B7-BC2B-A694B8CDAEB0} - v4.8 - - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - + + - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/ContentElement/AddHandler/EventOvwSupport.csproj b/snippets/csharp/System.Windows/ContentElement/AddHandler/EventOvwSupport.csproj index e973d5be0d3..cb1fbc92a20 100644 --- a/snippets/csharp/System.Windows/ContentElement/AddHandler/EventOvwSupport.csproj +++ b/snippets/csharp/System.Windows/ContentElement/AddHandler/EventOvwSupport.csproj @@ -1,35 +1,25 @@ - + + + WinExe + net10.0-windows + true + false EventOvwSupport - winexe - Debug - bin\$(Configuration)\ - {23A686A8-12E2-45B0-AB2E-2DBFABBAAED3} - v4.8 - - 10.0.20821 - + + + + - - Code - - + - - - - - - - - 4.0 - - - + + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/ContentElement/AllowDrop/ContentElementsSmorgasbord.csproj b/snippets/csharp/System.Windows/ContentElement/AllowDrop/ContentElementsSmorgasbord.csproj index c739735c6d6..c3187c3ebe9 100644 --- a/snippets/csharp/System.Windows/ContentElement/AllowDrop/ContentElementsSmorgasbord.csproj +++ b/snippets/csharp/System.Windows/ContentElement/AllowDrop/ContentElementsSmorgasbord.csproj @@ -1,43 +1,31 @@ - + + + WinExe + net10.0-windows + true + false ContentElementsSmorgasbord - winexe - Debug - bin\$(Configuration)\ - {53D45E76-8AF7-46AB-AEF8-41F0BF42A8DC} - v4.8 - - 10.0.20821 - + + + + + - - Designer - - - Code - + + + + page2.xaml - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/CornerRadius/Overview/ThicknessSamp.csproj b/snippets/csharp/System.Windows/CornerRadius/Overview/ThicknessSamp.csproj index 47e4b8563d2..800f88f0d1b 100644 --- a/snippets/csharp/System.Windows/CornerRadius/Overview/ThicknessSamp.csproj +++ b/snippets/csharp/System.Windows/CornerRadius/Overview/ThicknessSamp.csproj @@ -1,32 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DataTemplate/Overview/DataTemplatingSample.csproj b/snippets/csharp/System.Windows/DataTemplate/Overview/DataTemplatingSample.csproj index 74bee0e7710..65aa9c40107 100644 --- a/snippets/csharp/System.Windows/DataTemplate/Overview/DataTemplatingSample.csproj +++ b/snippets/csharp/System.Windows/DataTemplate/Overview/DataTemplatingSample.csproj @@ -1,60 +1,31 @@ - + + - Debug - AnyCPU - {ECFDBD90-E649-439C-86B1-4BCDD513E831} + WinExe + net10.0-windows + true + false DataTemplatingSample DataTemplatingSample - 4 - winexe - 1.0.0.* - - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - + + - + + + app.xaml - Code Window1.xaml - Code - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DataTemplate/Triggers/DataBindingLab.csproj b/snippets/csharp/System.Windows/DataTemplate/Triggers/DataBindingLab.csproj index 7345df148af..bdd8774b666 100644 --- a/snippets/csharp/System.Windows/DataTemplate/Triggers/DataBindingLab.csproj +++ b/snippets/csharp/System.Windows/DataTemplate/Triggers/DataBindingLab.csproj @@ -1,77 +1,39 @@ - + + - Debug - AnyCPU - {6AFEA501-7402-47C4-805D-060448961C78} + WinExe + net10.0-windows + true + false DataBindingLab DataBindingLab - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer - - DataBindingLabApp.xaml - Code - + MSBuild:Compile - Designer - - AddProductWindow.xaml - Code - - - MSBuild:Compile - Designer + + + + + DataBindingLabApp.xaml + + + AddProductWindow.xaml + MainWindow.xaml - Code - - @@ -79,5 +41,5 @@ - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DependencyObject/ClearValue/DPClearValue.csproj b/snippets/csharp/System.Windows/DependencyObject/ClearValue/DPClearValue.csproj index f39079177a6..dc9061f09bc 100644 --- a/snippets/csharp/System.Windows/DependencyObject/ClearValue/DPClearValue.csproj +++ b/snippets/csharp/System.Windows/DependencyObject/ClearValue/DPClearValue.csproj @@ -1,32 +1,23 @@ - + + + WinExe + net10.0-windows + true + false DPClearValue - winexe - Debug - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - + - - + + + - + - - - - - - - - 4.0 - - - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DependencyObject/CoerceValue/SDKSampleLibrary.csproj b/snippets/csharp/System.Windows/DependencyObject/CoerceValue/SDKSampleLibrary.csproj index fdf1ea2e85b..98e2a2c16f6 100644 --- a/snippets/csharp/System.Windows/DependencyObject/CoerceValue/SDKSampleLibrary.csproj +++ b/snippets/csharp/System.Windows/DependencyObject/CoerceValue/SDKSampleLibrary.csproj @@ -1,38 +1,14 @@ - + + - Debug - Library - ..\bin\$(Configuration)\ + net10.0-windows + true + false SDKSampleLibrary - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {74CE3840-AA76-46E5-9C7F-20AAB23A06BE} - - 10.0.20821 - - bin\debug\ - - - - Code - - - + - - - - - - - - 4.0 - - - + - - copy/Y sdksamplelibrary.dll ..\..\..\DPCallbackOverrideApp - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DependencyObject/InvalidateProperty/SDKSampleLibrary.csproj b/snippets/csharp/System.Windows/DependencyObject/InvalidateProperty/SDKSampleLibrary.csproj index 6af11fe0c08..98e2a2c16f6 100644 --- a/snippets/csharp/System.Windows/DependencyObject/InvalidateProperty/SDKSampleLibrary.csproj +++ b/snippets/csharp/System.Windows/DependencyObject/InvalidateProperty/SDKSampleLibrary.csproj @@ -1,30 +1,14 @@ - + + - Debug - Library - ..\bin\$(Configuration)\ + net10.0-windows + true + false SDKSampleLibrary - v4.8 - - 10.0.20821 + - - Code - + - - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DependencyObject/Overview/WPFAquariumObjects.csproj b/snippets/csharp/System.Windows/DependencyObject/Overview/WPFAquariumObjects.csproj index 6fa004300b5..09a36f0f045 100644 --- a/snippets/csharp/System.Windows/DependencyObject/Overview/WPFAquariumObjects.csproj +++ b/snippets/csharp/System.Windows/DependencyObject/Overview/WPFAquariumObjects.csproj @@ -1,33 +1,21 @@ - + + - Debug - Library - ..\WPFAquarium\bin\Debug\ + net10.0-windows + true + false WPFAquariumObjects WPFAquariumObjects - v4.8 - - 10.0.20821 - - - - - 4.0 - - - - - - - + + Always - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DependencyObjectType/FromSystemType/PropertiesOvwSupport.csproj b/snippets/csharp/System.Windows/DependencyObjectType/FromSystemType/PropertiesOvwSupport.csproj index ba8dbab9a2d..1804b3aabcf 100644 --- a/snippets/csharp/System.Windows/DependencyObjectType/FromSystemType/PropertiesOvwSupport.csproj +++ b/snippets/csharp/System.Windows/DependencyObjectType/FromSystemType/PropertiesOvwSupport.csproj @@ -1,58 +1,44 @@ - + + + WinExe + net10.0-windows + true + false PropertiesOvwSupport - winexe - Debug - bin\$(Configuration)\ - {53D45E76-8AF7-46AB-AEF8-41F0BF42A8DC} - v4.8 - - 10.0.20821 - + + + + + - - Designer - - - Code - + + + + - Code page3.xaml - Code page4.xaml - Code page5.xaml - - - - - - - - - 4.0 - - - - + Always - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DependencyPropertyChangedEventArgs/Overview/NumericUpDownOneProject.csproj b/snippets/csharp/System.Windows/DependencyPropertyChangedEventArgs/Overview/NumericUpDownOneProject.csproj index 590d1b47ab9..7cdbeb56e5f 100644 --- a/snippets/csharp/System.Windows/DependencyPropertyChangedEventArgs/Overview/NumericUpDownOneProject.csproj +++ b/snippets/csharp/System.Windows/DependencyPropertyChangedEventArgs/Overview/NumericUpDownOneProject.csproj @@ -1,81 +1,37 @@ - + + - Debug - AnyCPU - {22849379-DEF7-410A-AC23-41596B2B3981} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false NumericUpDownOneProject NumericUpDownOneProject - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - 3.0 - - - 3.0 - - - 3.0 - - - 4.0 - - - 3.0 - - - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile MSBuild:Compile - Designer + + + app.xaml - Code Window1.xaml - Code - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/DragDrop/DoDragDrop/dragdropsnippets.csproj b/snippets/csharp/System.Windows/DragDrop/DoDragDrop/dragdropsnippets.csproj index 5c95855da25..0c7551ad4e1 100644 --- a/snippets/csharp/System.Windows/DragDrop/DoDragDrop/dragdropsnippets.csproj +++ b/snippets/csharp/System.Windows/DragDrop/DoDragDrop/dragdropsnippets.csproj @@ -1,103 +1,53 @@ - - + + - Debug - x86 - 8.0.30703 - 2.0 - {377EC07A-C36E-4EBF-9F3D-C014126BDBAD} WinExe - Properties + net10.0-windows + true + false DragDropSnippets DragDropSnippets - v4.8 - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code MainWindow.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/EventManager/RegisterClassHandler/SDKSampleLibrary.csproj b/snippets/csharp/System.Windows/EventManager/RegisterClassHandler/SDKSampleLibrary.csproj index 6af11fe0c08..98e2a2c16f6 100644 --- a/snippets/csharp/System.Windows/EventManager/RegisterClassHandler/SDKSampleLibrary.csproj +++ b/snippets/csharp/System.Windows/EventManager/RegisterClassHandler/SDKSampleLibrary.csproj @@ -1,30 +1,14 @@ - + + - Debug - Library - ..\bin\$(Configuration)\ + net10.0-windows + true + false SDKSampleLibrary - v4.8 - - 10.0.20821 + - - Code - + - - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/EventTrigger/Overview/StyleEventTriggerAnimation.csproj b/snippets/csharp/System.Windows/EventTrigger/Overview/StyleEventTriggerAnimation.csproj index 5313b5733b4..34a833dfd61 100644 --- a/snippets/csharp/System.Windows/EventTrigger/Overview/StyleEventTriggerAnimation.csproj +++ b/snippets/csharp/System.Windows/EventTrigger/Overview/StyleEventTriggerAnimation.csproj @@ -1,41 +1,23 @@ - - + + + WinExe + net10.0-windows + true + false StyleEventTriggerAnimation - winexe - Debug - bin\$(Configuration)\ - 10.0.20821 - 2.0 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/ExceptionRoutedEventArgs/ErrorException/MediaElementExample.csproj b/snippets/csharp/System.Windows/ExceptionRoutedEventArgs/ErrorException/MediaElementExample.csproj index 607bcb4561e..ee97bb902df 100644 --- a/snippets/csharp/System.Windows/ExceptionRoutedEventArgs/ErrorException/MediaElementExample.csproj +++ b/snippets/csharp/System.Windows/ExceptionRoutedEventArgs/ErrorException/MediaElementExample.csproj @@ -1,59 +1,46 @@ - + + - MediaElementExample - winexe - Debug - 10.0.20821 - 2.0 + WinExe + net10.0-windows + true + false MediaElementExample - {0C2198C0-2E37-4D23-90CC-C80963FF459A} - bin\$(Configuration)\ - v4.8 - + MediaElementExample - + - - - - - - - - 4.0 - - - + + - - - - - + + MyApp.xaml - Code PlaybackExample.xaml - Code SampleViewer.xaml - Code + + + + PreserveNewest - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/FloaterFigureSnippets.csproj b/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/FloaterFigureSnippets.csproj index 0a0fb6843dc..1c16db997a9 100644 --- a/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/FloaterFigureSnippets.csproj +++ b/snippets/csharp/System.Windows/FigureHorizontalAnchor/Overview/FloaterFigureSnippets.csproj @@ -1,71 +1,29 @@ - + + - Debug - AnyCPU - {B001AA50-DDA4-42BB-893D-F5D8C81C940A} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false FloaterFigureSnippets FloaterFigureSnippets - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + + + + + - - - - - MyApp.xaml - Code Window1.xaml - Code - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FlowDirection/Overview/BlockSnippets.csproj b/snippets/csharp/System.Windows/FlowDirection/Overview/BlockSnippets.csproj index fad839abf05..299a56f4775 100644 --- a/snippets/csharp/System.Windows/FlowDirection/Overview/BlockSnippets.csproj +++ b/snippets/csharp/System.Windows/FlowDirection/Overview/BlockSnippets.csproj @@ -1,64 +1,33 @@ - + + - Debug - AnyCPU - {2900CCDE-CF75-4DB3-A1CB-ADC61B6F16C0} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false BlockSnippets BlockSnippets - 4 - winexe - v4.8 - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + MyApp.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FontCapitals/Overview/OpenTypeFontSnippets.csproj b/snippets/csharp/System.Windows/FontCapitals/Overview/OpenTypeFontSnippets.csproj index 7b3188cac48..88ea50526d4 100644 --- a/snippets/csharp/System.Windows/FontCapitals/Overview/OpenTypeFontSnippets.csproj +++ b/snippets/csharp/System.Windows/FontCapitals/Overview/OpenTypeFontSnippets.csproj @@ -1,45 +1,21 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample SDKSample.OpenTypeFontSnippets - 4 - winexe - 1.0.0.* - 2.0 - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - 4.0 - - - - - + + - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FontStyle/Overview/FontSnippets.csproj b/snippets/csharp/System.Windows/FontStyle/Overview/FontSnippets.csproj index 8c02a58b79b..55ff77da850 100644 --- a/snippets/csharp/System.Windows/FontStyle/Overview/FontSnippets.csproj +++ b/snippets/csharp/System.Windows/FontStyle/Overview/FontSnippets.csproj @@ -1,93 +1,62 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample SDKSample.FontSnippets - 4 - winexe - 1.0.0.* - 10.0.20821 - 2.0 - {1E29ECD7-A15F-4E99-8F06-C0955C17D02A} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - 4.0 - - - - - - + MSBuild:Compile - Designer - - Window1.xaml - - - FontFamilySnippets.xaml - - - FontMapSnippets.xaml - - - FontStyleSnippets.xaml - - - FontPackageSnippets.xaml - - - pages\HomePage.xaml - + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + + + + Window1.xaml + + + FontFamilySnippets.xaml + + + FontMapSnippets.xaml + + + FontStyleSnippets.xaml + + + FontPackageSnippets.xaml + + + pages\HomePage.xaml + + + @@ -97,14 +66,13 @@ + + PreserveNewest - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkContentElement/ContextMenuClosing/cursors.csproj b/snippets/csharp/System.Windows/FrameworkContentElement/ContextMenuClosing/cursors.csproj index 4421cd1d2bd..cebc90f51bf 100644 --- a/snippets/csharp/System.Windows/FrameworkContentElement/ContextMenuClosing/cursors.csproj +++ b/snippets/csharp/System.Windows/FrameworkContentElement/ContextMenuClosing/cursors.csproj @@ -1,67 +1,39 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples cursors - 4 - winexe - 1.0.0.* - - false - {DAA5CE5A-A95B-4B6E-958E-2667B266520E} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - 4.0 - - - - + - Designer MSBuild:Compile + + + - Designer MSBuild:Compile + + + app.xaml - Code Window1.xaml - Code + Always - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkContentElement/ForceCursor/forcecursor.csproj b/snippets/csharp/System.Windows/FrameworkContentElement/ForceCursor/forcecursor.csproj index 45c03cb20df..0b15d0bae12 100644 --- a/snippets/csharp/System.Windows/FrameworkContentElement/ForceCursor/forcecursor.csproj +++ b/snippets/csharp/System.Windows/FrameworkContentElement/ForceCursor/forcecursor.csproj @@ -1,32 +1,19 @@ - + + + WinExe + net10.0-windows + true + false ForceCursor - winexe - Debug - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - + - - - - + - - - - - - - - 4.0 - - - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkContentElement/Parent/TextPointer_Snippets.csproj b/snippets/csharp/System.Windows/FrameworkContentElement/Parent/TextPointer_Snippets.csproj index 2a30840fc8c..e7d734b311e 100644 --- a/snippets/csharp/System.Windows/FrameworkContentElement/Parent/TextPointer_Snippets.csproj +++ b/snippets/csharp/System.Windows/FrameworkContentElement/Parent/TextPointer_Snippets.csproj @@ -1,64 +1,29 @@ - + + - Debug - AnyCPU - {1CE6618A-66EC-486F-90F5-0E84AEC4DAA2} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false TextPointer_Snippets TextPointer_Snippets - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + + + + + - - - - - - - - 4.0 - - - - - - - + + - - - - - MyApp.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkContentElement/ToolTip/TableSnippets2.csproj b/snippets/csharp/System.Windows/FrameworkContentElement/ToolTip/TableSnippets2.csproj index 3b2c6e7385b..d848bd481f8 100644 --- a/snippets/csharp/System.Windows/FrameworkContentElement/ToolTip/TableSnippets2.csproj +++ b/snippets/csharp/System.Windows/FrameworkContentElement/ToolTip/TableSnippets2.csproj @@ -1,68 +1,29 @@ - + + - Debug - AnyCPU - {7246A068-02D8-43DB-AE89-DE64281E3456} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false TableSnippets22 TableSnippets22 - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + MyApp.xaml - Code Window1.xaml - Code - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/ActualHeight/Height_MinHeight_MaxHeight_CSharp.csproj b/snippets/csharp/System.Windows/FrameworkElement/ActualHeight/Height_MinHeight_MaxHeight_CSharp.csproj index 44c6c358bfb..23e00986d0c 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/ActualHeight/Height_MinHeight_MaxHeight_CSharp.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/ActualHeight/Height_MinHeight_MaxHeight_CSharp.csproj @@ -1,47 +1,32 @@ - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Debug - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile + app.xaml - Code Window1.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/ActualWidth/Width_MinWidth_MaxWidth_CSharp.csproj b/snippets/csharp/System.Windows/FrameworkElement/ActualWidth/Width_MinWidth_MaxWidth_CSharp.csproj index c0f04b8af9b..23e00986d0c 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/ActualWidth/Width_MinWidth_MaxWidth_CSharp.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/ActualWidth/Width_MinWidth_MaxWidth_CSharp.csproj @@ -1,47 +1,32 @@ - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Debug - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + app.xaml - Code Window1.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/BeginStoryboard/CubeAnimation_XBAP.csproj b/snippets/csharp/System.Windows/FrameworkElement/BeginStoryboard/CubeAnimation_XBAP.csproj index ef8db97626e..7ba4cfc1bb7 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/BeginStoryboard/CubeAnimation_XBAP.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/BeginStoryboard/CubeAnimation_XBAP.csproj @@ -1,95 +1,44 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false CubeAnimation - winexe - $(OutputType) - 10.0.20821 - 2.0 - {741625E1-5709-4568-A03F-EDADA6B30F45} - false - - False - True - False - Internet - Program - $(WINDIR)\System32\PresentationHost.exe - .xbap - -debug "$(MSBuildProjectDirectory)\bin\$(Configuration)\$(AssemblyName)$(ApplicationExtension)" - false - 8A56AD997ABFFD66F2A4E73F30C01D5D52C20C2E - CubeAnimation_TemporaryKey.pfx - true - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - 1 - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - - 4.0 - - - - - - + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + - Designer MSBuild:Compile MSBuild:Compile - Designer + app.xaml - Code Page1.xaml - Code + + + - loose - False PreserveNewest - loose - False PreserveNewest - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/BindingGroup/BindingGroupSnippets.csproj b/snippets/csharp/System.Windows/FrameworkElement/BindingGroup/BindingGroupSnippets.csproj index 51b7a84ed60..c4b375d4b52 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/BindingGroup/BindingGroupSnippets.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/BindingGroup/BindingGroupSnippets.csproj @@ -1,114 +1,49 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {85D4DAB5-FA84-4CC9-944C-A32ACAD943F9} WinExe - Properties + net10.0-windows + true + false BindingGroupSnippets BindingGroupSnippets - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - - - 3.0 - - - 3.0 - - - 4.0 - - + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer - Designer MSBuild:Compile MSBuild:Compile - Designer - Designer MSBuild:Compile MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - Code - - True - True Resources.resx - True Settings.settings - True Window2.xaml @@ -116,23 +51,20 @@ Window3.xaml + + + ResXFileCodeGenerator Resources.Designer.cs - Designer + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/DataContext/MasterDetail.csproj b/snippets/csharp/System.Windows/FrameworkElement/DataContext/MasterDetail.csproj index 7e88e40b956..af56cee9735 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/DataContext/MasterDetail.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/DataContext/MasterDetail.csproj @@ -1,47 +1,28 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample MasterDetail - winexe - Debug - MSBuild - False - bin\$(Configuration)\ - 10.0.20821 - 2.0 - {973AAEAE-598F-4002-B5B9-EFC9E5FC1429} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - + - - - - - - - - - - 4.0 - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/CustomControlLibrary.csproj b/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/CustomControlLibrary.csproj index 46d4202c640..2b0130f6e33 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/CustomControlLibrary.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/CustomControlLibrary.csproj @@ -1,60 +1,25 @@ - + + - Debug - AnyCPU - {B121EE82-615D-48FC-8FEE-DA96A7F695B8} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + net10.0-windows + true + false CustomControlLibrary CustomControlLibrary - 4 - library - 1.0.0.* - - v4.8 - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer MSBuild:Compile - Designer + - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/GetVisualChild/ResizingAdorner.csproj b/snippets/csharp/System.Windows/FrameworkElement/GetVisualChild/ResizingAdorner.csproj index 51222d35968..accacfb88d1 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/GetVisualChild/ResizingAdorner.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/GetVisualChild/ResizingAdorner.csproj @@ -1,37 +1,26 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample - winexe - 2.0 - .\bin\Debug\ - {900997FF-6C7D-41C3-99F9-92C3465E8C1A} - v4.8 - - 10.0.20821 + - - - - - - - - 4.0 - - - + + - + + + Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/IsLoaded/GroupBoxExample.csproj b/snippets/csharp/System.Windows/FrameworkElement/IsLoaded/GroupBoxExample.csproj index 0a931f0265a..eccde36f2e4 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/IsLoaded/GroupBoxExample.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/IsLoaded/GroupBoxExample.csproj @@ -1,65 +1,33 @@ - + + - Debug - AnyCPU - {4B2AD967-9DE3-471F-889A-663967A5EF6D} + WinExe + net10.0-windows + true + false GroupBoxExample GroupBoxExample - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + app.xaml - Code Page1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/LayoutTransform/LayoutTransformCsharp.csproj b/snippets/csharp/System.Windows/FrameworkElement/LayoutTransform/LayoutTransformCsharp.csproj index 999177f46bc..2f768873ef4 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/LayoutTransform/LayoutTransformCsharp.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/LayoutTransform/LayoutTransformCsharp.csproj @@ -1,36 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - {C3272853-10CB-451A-92C3-D0FC9FEABF71} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/MoveFocus/FocusSample.csproj b/snippets/csharp/System.Windows/FrameworkElement/MoveFocus/FocusSample.csproj index 53d66077a3f..160c3439328 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/MoveFocus/FocusSample.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/MoveFocus/FocusSample.csproj @@ -1,68 +1,33 @@ - + + - Debug - AnyCPU - {988987F7-7B17-4D5C-8E69-98E74E1567DD} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false SDKSample FocusSample - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile + + + app.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/Name/animateheight_csharp.csproj b/snippets/csharp/System.Windows/FrameworkElement/Name/animateheight_csharp.csproj index 2b75d2b7715..e274fd2b8a5 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/Name/animateheight_csharp.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/Name/animateheight_csharp.csproj @@ -1,41 +1,22 @@ - - + + - Microsoft.Samples.Animation.AnimatedTransformations + WinExe + net10.0-windows + true + false AnimatedHeightExample_csharp - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {9FAD8619-EF29-4F60-A4CD-A4F1281DE8A5} - bin\$(Configuration)\ - v4.8 - - + + app.xaml - Code - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/Parent/GeometryDesigner.csproj b/snippets/csharp/System.Windows/FrameworkElement/Parent/GeometryDesigner.csproj index 510bb8714cd..f4f23905a05 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/Parent/GeometryDesigner.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/Parent/GeometryDesigner.csproj @@ -1,52 +1,25 @@ - + + - Debug - AnyCPU - {C2FF39B5-6B7C-4FDB-B587-995D79E41D0C} + WinExe + net10.0-windows + true + false GeometryDesigner GeometryDesigner - 4 - winexe - $(OutputType) - 10.0.20821 - 2.0 - v4.8 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - + - - - - - - - - 4.0 - - - + + - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/RegisterName/AnimateProperty_Storyboards_csharp.csproj b/snippets/csharp/System.Windows/FrameworkElement/RegisterName/AnimateProperty_Storyboards_csharp.csproj index e0dd0ea2d2c..452f4f5325a 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/RegisterName/AnimateProperty_Storyboards_csharp.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/RegisterName/AnimateProperty_Storyboards_csharp.csproj @@ -1,77 +1,38 @@ - + + - AnimatingWithStoryboards_csharp - winexe - Debug - App.ico - 10.0.20821 - 2.0 + WinExe + net10.0-windows + true + false Microsoft.Samples.Animation.AnimatingWithStoryboards - {D1CC167E-90AF-44E2-AEA5-ACD3FAFD233D} - bin\$(Configuration)\ - v4.8 - + AnimatingWithStoryboards_csharp - - - - - - - - - - 4.0 - - - - + + MyApp.xaml - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code + + + + + + + + + + + + + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/Style/FEResource.csproj b/snippets/csharp/System.Windows/FrameworkElement/Style/FEResource.csproj index fcf13623232..19b3fcb05c9 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/Style/FEResource.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/Style/FEResource.csproj @@ -1,40 +1,23 @@ - - + + + WinExe + net10.0-windows + true + false FEResource - winexe - Debug - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkElement/ToolTip/StatusBar.csproj b/snippets/csharp/System.Windows/FrameworkElement/ToolTip/StatusBar.csproj index ff8d2107131..204f826b532 100644 --- a/snippets/csharp/System.Windows/FrameworkElement/ToolTip/StatusBar.csproj +++ b/snippets/csharp/System.Windows/FrameworkElement/ToolTip/StatusBar.csproj @@ -1,60 +1,38 @@ - + + - StatusBarSimple - winexe - Debug - App.ico - 10.0.20821 - 2.0 + WinExe + net10.0-windows + true + false StatusBarSimple - {32AAFFC0-6E41-44E8-87FA-D82F6C1601E7} - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - + StatusBarSimple - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + app.xaml - Code Window1.xaml - Code + - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/FrameworkPropertyMetadata/.ctor/PropertyMetadataAPIs.csproj b/snippets/csharp/System.Windows/FrameworkPropertyMetadata/.ctor/PropertyMetadataAPIs.csproj index 63ae0cc9511..f01ec233fa6 100644 --- a/snippets/csharp/System.Windows/FrameworkPropertyMetadata/.ctor/PropertyMetadataAPIs.csproj +++ b/snippets/csharp/System.Windows/FrameworkPropertyMetadata/.ctor/PropertyMetadataAPIs.csproj @@ -1,30 +1,15 @@ - + + - Library + net10.0-windows + true + false PropertyMetadataAPIs PropertyMetadataAPIs - Debug - bin\Debug\ - v4.8 - - 10.0.20821 - + - - - - - - - - - 4.0 - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Freezable/CreateInstanceCore/freezablesample_csharp.csproj b/snippets/csharp/System.Windows/Freezable/CreateInstanceCore/freezablesample_csharp.csproj index bf7883c5bc6..5cc14fef77d 100644 --- a/snippets/csharp/System.Windows/Freezable/CreateInstanceCore/freezablesample_csharp.csproj +++ b/snippets/csharp/System.Windows/Freezable/CreateInstanceCore/freezablesample_csharp.csproj @@ -1,37 +1,15 @@ - - + + - Microsoft.Samples.Core.Freezable + WinExe + net10.0-windows + true + false FreezableSample_csharp - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {9DDB1AAC-567C-45D3-A4A7-352DC99E13C0} - bin\$(Configuration)\ - v4.8 - - - + - - Code - + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/HierarchicalDataTemplate/AlternationCount/AltnerationIndexSnippets.csproj b/snippets/csharp/System.Windows/HierarchicalDataTemplate/AlternationCount/AltnerationIndexSnippets.csproj index fa1408008be..33f26eb398a 100644 --- a/snippets/csharp/System.Windows/HierarchicalDataTemplate/AlternationCount/AltnerationIndexSnippets.csproj +++ b/snippets/csharp/System.Windows/HierarchicalDataTemplate/AlternationCount/AltnerationIndexSnippets.csproj @@ -1,110 +1,55 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {21E59703-ECB4-4930-AD38-0310123ED5BC} WinExe - Properties + net10.0-windows + true + false AltnerationIndexSnippets AltnerationIndexSnippets - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs - Designer + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/HierarchicalDataTemplate/Overview/hierarchicaldatatemplate.csproj b/snippets/csharp/System.Windows/HierarchicalDataTemplate/Overview/hierarchicaldatatemplate.csproj index 9c8fd883e71..57086cd35c9 100644 --- a/snippets/csharp/System.Windows/HierarchicalDataTemplate/Overview/hierarchicaldatatemplate.csproj +++ b/snippets/csharp/System.Windows/HierarchicalDataTemplate/Overview/hierarchicaldatatemplate.csproj @@ -1,58 +1,28 @@ - + + - Debug - AnyCPU - {8A7AD640-8F5E-4BD5-A494-E4B444DFFACB} + WinExe + net10.0-windows + true + false HierarchicalDataTemplate HierarchicalDataTemplate - 4 - winexe - 1.0.0.* - - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/LengthConverter/Overview/Canvas_Positioning_Properties.csproj b/snippets/csharp/System.Windows/LengthConverter/Overview/Canvas_Positioning_Properties.csproj index acd874a41a1..23e00986d0c 100644 --- a/snippets/csharp/System.Windows/LengthConverter/Overview/Canvas_Positioning_Properties.csproj +++ b/snippets/csharp/System.Windows/LengthConverter/Overview/Canvas_Positioning_Properties.csproj @@ -1,51 +1,32 @@ - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Debug - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer - MSBuild:Compile - Designer + + + MSBuild:Compile - Designer - MSBuild:Compile - Designer + app.xaml - Code Window1.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/LocalizabilityAttribute/Category/AttributesSnippets.csproj b/snippets/csharp/System.Windows/LocalizabilityAttribute/Category/AttributesSnippets.csproj index 7d25e02de35..8f4d5837124 100644 --- a/snippets/csharp/System.Windows/LocalizabilityAttribute/Category/AttributesSnippets.csproj +++ b/snippets/csharp/System.Windows/LocalizabilityAttribute/Category/AttributesSnippets.csproj @@ -1,70 +1,42 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample AttributesSnippets - 4 - winexe - 2.0 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - 4.0 - - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + + + Window1.xaml - Code Attributes.xaml - Code Comments.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/MessageBox/Show/CSharp.csproj b/snippets/csharp/System.Windows/MessageBox/Show/CSharp.csproj index cb2e1f0f0d4..b8be6ec2979 100644 --- a/snippets/csharp/System.Windows/MessageBox/Show/CSharp.csproj +++ b/snippets/csharp/System.Windows/MessageBox/Show/CSharp.csproj @@ -1,53 +1,19 @@ - + + - Debug - AnyCPU - {E0326FAE-7C03-4358-AEC7-1775A622E512} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - @@ -55,6 +21,9 @@ + + + Show2Window.xaml @@ -72,18 +41,10 @@ MainWindow.xaml - Code - Code Show1Window.xaml - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Point/Overview/PointExamples_snip.csproj b/snippets/csharp/System.Windows/Point/Overview/PointExamples_snip.csproj index 073b620a3b7..55ad3bd79bc 100644 --- a/snippets/csharp/System.Windows/Point/Overview/PointExamples_snip.csproj +++ b/snippets/csharp/System.Windows/Point/Overview/PointExamples_snip.csproj @@ -1,64 +1,35 @@ - + + - PointExamples - $(OutputType) - Debug - AnyCPU - App.ico + WinExe + net10.0-windows + true + false Microsoft.Samples.PointExamples - MSBuild - 2.0 - {9D37563A-C550-4347-9EEF-942BF2330B79} - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + PointExamples - + - - - - - - - - - 4.0 - - + + - + SampleViewer.xaml - Code MyApp.xaml - Code - - - Code + + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/ResourceDictionary/MergedDictionaries/resourcemerge.csproj b/snippets/csharp/System.Windows/ResourceDictionary/MergedDictionaries/resourcemerge.csproj index 884a04a77a6..bc14e041eab 100644 --- a/snippets/csharp/System.Windows/ResourceDictionary/MergedDictionaries/resourcemerge.csproj +++ b/snippets/csharp/System.Windows/ResourceDictionary/MergedDictionaries/resourcemerge.csproj @@ -1,54 +1,36 @@ - - + + + WinExe + net10.0-windows + true + false ResourceMerge - winexe - Debug - bin\$(Configuration)\ - {A788D8F2-AFD1-41BD-A08C-A0EE4B0A0315} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - - - - - - - - - - - 4.0 - - - + + + MSBuild:Compile - Designer MSBuild:Compile - Designer - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/RoutedEventArgs/.ctor/SDKSampleLibrary.csproj b/snippets/csharp/System.Windows/RoutedEventArgs/.ctor/SDKSampleLibrary.csproj index a5f571fc68c..98e2a2c16f6 100644 --- a/snippets/csharp/System.Windows/RoutedEventArgs/.ctor/SDKSampleLibrary.csproj +++ b/snippets/csharp/System.Windows/RoutedEventArgs/.ctor/SDKSampleLibrary.csproj @@ -1,38 +1,14 @@ - + + - Debug - Library - ..\bin\$(Configuration)\ + net10.0-windows + true + false SDKSampleLibrary - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {3E09D15F-D677-404A-84FA-D422A75ED148} - - 10.0.20821 - - bin\Debug\ - - - - Code - - - + - - - - - - - - 4.0 - - - + - - copy /Y sdksamplelibrary.dll ..\..\..\RoutedEventCustomApp - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/RoutedEventArgs/RoutedEvent/ColorPicker.csproj b/snippets/csharp/System.Windows/RoutedEventArgs/RoutedEvent/ColorPicker.csproj index 6219e38d91b..01405c3c73e 100644 --- a/snippets/csharp/System.Windows/RoutedEventArgs/RoutedEvent/ColorPicker.csproj +++ b/snippets/csharp/System.Windows/RoutedEventArgs/RoutedEvent/ColorPicker.csproj @@ -1,79 +1,44 @@ - - + + - Microsoft.Samples.ColorPickerExample - ColorPicker - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {99E90579-62FC-4898-B168-24F7DBD3A34D} - bin\$(Configuration)\ + WinExe + net10.0-windows + true + false Microsoft.Samples.CustomControls - - - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - + ColorPicker - - + - MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + MyApp.xaml - Code SampleViewer.xaml - Code - - - Code - - - Code + + ColorPickerDialog.xaml - Code - - - - - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/RoutedPropertyChangedEventHandlerT/Overview/autogrid.csproj b/snippets/csharp/System.Windows/RoutedPropertyChangedEventHandlerT/Overview/autogrid.csproj index 126bb779573..5d7c862968b 100644 --- a/snippets/csharp/System.Windows/RoutedPropertyChangedEventHandlerT/Overview/autogrid.csproj +++ b/snippets/csharp/System.Windows/RoutedPropertyChangedEventHandlerT/Overview/autogrid.csproj @@ -1,59 +1,38 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + MSBuild:Compile - Designer - MSBuild:Compile - Designer + + + MSBuild:Compile - Designer - MSBuild:Compile - Designer + app.xaml - Code Window1.xaml - Code + Always - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Setter/Property/StyleOvw1.csproj b/snippets/csharp/System.Windows/Setter/Property/StyleOvw1.csproj index 61165a6691f..ce93c73aec9 100644 --- a/snippets/csharp/System.Windows/Setter/Property/StyleOvw1.csproj +++ b/snippets/csharp/System.Windows/Setter/Property/StyleOvw1.csproj @@ -1,45 +1,26 @@ - + + - Get_Set - winexe - Release - - - 10.0.20821 - 2.0 + WinExe + net10.0-windows + true + false Get_Set - {006940D9-17E0-4628-9087-8C01B03D2153} - bin\$(Configuration)\ - v4.8 - + Get_Set - - - - - - + + + + + MyApp.xaml - Code - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Setter/Value/BindingValidation.csproj b/snippets/csharp/System.Windows/Setter/Value/BindingValidation.csproj index 628bb307b31..8f96036f7bb 100644 --- a/snippets/csharp/System.Windows/Setter/Value/BindingValidation.csproj +++ b/snippets/csharp/System.Windows/Setter/Value/BindingValidation.csproj @@ -1,73 +1,37 @@ - - + + - MSBuild + WinExe + net10.0-windows + true + false SDKSample BindValidation - winexe - Debug - AnyCPU - False - en-US - 10.0.20821 - 2.0 - {950D18C5-F942-494B-87F5-DE051442ABF6} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - - 4.0 - - - + - MSBuild:Compile - Designer MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer MSBuild:Compile - Designer - + + + Window1.xaml - Code App.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Size/Overview/PlotPanel_csharp.csproj b/snippets/csharp/System.Windows/Size/Overview/PlotPanel_csharp.csproj index 60a3032db20..23b2551d34b 100644 --- a/snippets/csharp/System.Windows/Size/Overview/PlotPanel_csharp.csproj +++ b/snippets/csharp/System.Windows/Size/Overview/PlotPanel_csharp.csproj @@ -1,33 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/SplashScreen/Overview/SplashScreenDemo.csproj b/snippets/csharp/System.Windows/SplashScreen/Overview/SplashScreenDemo.csproj index 3bd4ad5efda..c97839f5815 100644 --- a/snippets/csharp/System.Windows/SplashScreen/Overview/SplashScreenDemo.csproj +++ b/snippets/csharp/System.Windows/SplashScreen/Overview/SplashScreenDemo.csproj @@ -1,83 +1,27 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {1C36D0AA-555E-4855-B960-0825197F8671} WinExe - Properties + net10.0-windows + true + false SplashScreenDemo SplashScreenDemo - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + App.xaml - Code - - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/MyInkEraser.csproj b/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/MyInkEraser.csproj index bfbb65f2834..e08c5ce26bb 100644 --- a/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/MyInkEraser.csproj +++ b/snippets/csharp/System.Windows/StrokeCollectionConverter/Overview/MyInkEraser.csproj @@ -1,96 +1,51 @@ - + + - Debug - AnyCPU - {5FA6946A-9D3F-477E-8405-F4F851C19870} + WinExe + net10.0-windows + true + true + false Generated InkEraser - 4 - winexe - $(OutputType) - 10.0.20821 - 2.0 - en-US - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\UIAutomationProvider.dll - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\UIAutomationTypes.dll - - - - - - 4.0 - - - ..\..\..\..\WindowsFormsIntegration.dll - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile + + + + Resources.resx + + + Settings.settings + + - - - - - - ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Style/Setters/ListBoxItemStyle.csproj b/snippets/csharp/System.Windows/Style/Setters/ListBoxItemStyle.csproj index e233b8c0620..1fd5ec5fd41 100644 --- a/snippets/csharp/System.Windows/Style/Setters/ListBoxItemStyle.csproj +++ b/snippets/csharp/System.Windows/Style/Setters/ListBoxItemStyle.csproj @@ -1,55 +1,33 @@ - + + - ListBoxItemStyle - winexe - Debug - App.ico - 10.0.20821 - 2.0 - ListBoxItemStyle - {2FDB1A97-FB5A-4BDE-81DB-BAD0D528440D} WinExe - - - bin\$(Configuration)\ - v4.8 - + net10.0-windows + true + false + ListBoxItemStyle + ListBoxItemStyle - + - - - - - - - - 4.0 - - - + + - + app.xaml - Code Pane1.xaml - Code + - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/stylingintrosample.csproj b/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/stylingintrosample.csproj index ed660ed71f2..d02071a7c50 100644 --- a/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/stylingintrosample.csproj +++ b/snippets/csharp/System.Windows/TemplateBindingExtension/Overview/stylingintrosample.csproj @@ -1,85 +1,34 @@ - + + - Debug - AnyCPU - {AF480827-12BC-40F8-AF43-75ACB8B1DF8F} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false StylingIntroSample StylingIntroSample - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - false - 1.0.0.* - true - true - Publish\ - v4.8 - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/TemplateVisualStateAttribute/Overview/vsmcustomcontrol.csproj b/snippets/csharp/System.Windows/TemplateVisualStateAttribute/Overview/vsmcustomcontrol.csproj index b1bf975b6d1..74a397daca7 100644 --- a/snippets/csharp/System.Windows/TemplateVisualStateAttribute/Overview/vsmcustomcontrol.csproj +++ b/snippets/csharp/System.Windows/TemplateVisualStateAttribute/Overview/vsmcustomcontrol.csproj @@ -1,125 +1,57 @@ - - + + - Debug - x86 - 10.0.20821 - 2.0 - {E482C7A2-1F06-4F89-819B-8346171E0563} WinExe - Properties + net10.0-windows + true + false VSMCustomControl VSMCustomControl - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - x86 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - True - - - - - - - - 4.0 - - - 3.5 - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - - - 3.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - Code - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/TextDecoration/.ctor/TextDecorationSnippets.csproj b/snippets/csharp/System.Windows/TextDecoration/.ctor/TextDecorationSnippets.csproj index 70f52125b0d..078911f1f9f 100644 --- a/snippets/csharp/System.Windows/TextDecoration/.ctor/TextDecorationSnippets.csproj +++ b/snippets/csharp/System.Windows/TextDecoration/.ctor/TextDecorationSnippets.csproj @@ -1,38 +1,26 @@ - - + + - SDKSample.TextDecorationSnippets - winexe - Release - False - 2.0 - bin\$(Configuration)\ + WinExe + net10.0-windows + true + false SDKSample - v4.8 - - 10.0.20821 + SDKSample.TextDecorationSnippets - - + - - - - 4.0 - - - - - + + - + Window1.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/TextDecorations/Overview/Performance.csproj b/snippets/csharp/System.Windows/TextDecorations/Overview/Performance.csproj index 1e69a7c6be5..ebb5032c270 100644 --- a/snippets/csharp/System.Windows/TextDecorations/Overview/Performance.csproj +++ b/snippets/csharp/System.Windows/TextDecorations/Overview/Performance.csproj @@ -1,33 +1,19 @@ - - + + - SDKSample - PerformanceSnippets - winexe - Release - False - 2.0 - bin\$(Configuration)\ + WinExe + net10.0-windows + true + false SDKSample - {5A99CDD4-9B75-416C-A426-34D039959356} - v4.8 - - 10.0.20821 + PerformanceSnippets - + - - - - 4.0 - - - - - + + - @@ -36,22 +22,17 @@ + Hyperlink.xaml - Code - - TestNavigation.xaml - Code - - Window1.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/TextMarkerStyle/Overview/textmarkerstylesnippets.csproj b/snippets/csharp/System.Windows/TextMarkerStyle/Overview/textmarkerstylesnippets.csproj index 0406d0af1e7..014e7bde3f6 100644 --- a/snippets/csharp/System.Windows/TextMarkerStyle/Overview/textmarkerstylesnippets.csproj +++ b/snippets/csharp/System.Windows/TextMarkerStyle/Overview/textmarkerstylesnippets.csproj @@ -1,50 +1,26 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample TextMarkerStyleSnippets - 4 - winexe - 1.0.0.* - 2.0 - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - 4.0 - - - - - + + - + Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/TextWrapping/Overview/textboxbase_samp.csproj b/snippets/csharp/System.Windows/TextWrapping/Overview/textboxbase_samp.csproj index 77cb566d0b8..ebe1dba0cb9 100644 --- a/snippets/csharp/System.Windows/TextWrapping/Overview/textboxbase_samp.csproj +++ b/snippets/csharp/System.Windows/TextWrapping/Overview/textboxbase_samp.csproj @@ -1,42 +1,29 @@ - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - bin\$(Configuration)\ - {98382EB0-1D99-4E10-A500-2C6BA6A7C0CE} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + Window1.xaml - Code - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/AllowDrop/dropopentextfile.csproj b/snippets/csharp/System.Windows/UIElement/AllowDrop/dropopentextfile.csproj index efc744f7fcd..ebe1dba0cb9 100644 --- a/snippets/csharp/System.Windows/UIElement/AllowDrop/dropopentextfile.csproj +++ b/snippets/csharp/System.Windows/UIElement/AllowDrop/dropopentextfile.csproj @@ -1,43 +1,29 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample - 4 - winexe - .\bin\Debug\ - {068DBE97-4FA6-4EC9-88DE-7632515A3B56} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile + + + Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/ApplyAnimationClock/TimingBehavior_csharp.csproj b/snippets/csharp/System.Windows/UIElement/ApplyAnimationClock/TimingBehavior_csharp.csproj index 9eef1b0f1de..9d15aa64d7d 100644 --- a/snippets/csharp/System.Windows/UIElement/ApplyAnimationClock/TimingBehavior_csharp.csproj +++ b/snippets/csharp/System.Windows/UIElement/ApplyAnimationClock/TimingBehavior_csharp.csproj @@ -1,82 +1,40 @@ - - + + - Microsoft.Samples.Animation.TimingBehavior + WinExe + net10.0-windows + true + false TimingBehavior_csharp - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {99E90579-62FC-4898-B168-24F7DBD3A34D} - bin\$(Configuration)\ - v4.8 - - - + + + + + MyApp.xaml - Code - - - Code - - - Code + + SampleViewer.xaml - Code - - - Code - - - Code - - - Code - - - Code - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - - 4.0 - - - + + + + + + + + + + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/BeginAnimation/BrushesIntroduction.csproj b/snippets/csharp/System.Windows/UIElement/BeginAnimation/BrushesIntroduction.csproj index b5f606a4d71..81f6fdf0312 100644 --- a/snippets/csharp/System.Windows/UIElement/BeginAnimation/BrushesIntroduction.csproj +++ b/snippets/csharp/System.Windows/UIElement/BeginAnimation/BrushesIntroduction.csproj @@ -1,164 +1,100 @@ - + + - BrushesIntroduction - $(OutputType) - Debug - AnyCPU - App.ico - BrushesIntroduction - MSBuild - 2.0 - {9D37563A-C550-4347-9EEF-942BF2330B79} WinExe + net10.0-windows + true + false + BrushesIntroduction + BrushesIntroduction BrushesIntroduction.app - false - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - - 4.0 - - - + MSBuild:Compile - Designer MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + GradientBrushesExample.xaml - Code SampleViewer.xaml - Code app.xaml - Code InteractiveLinearGradientBrushExample.xaml - Code + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/BitmapEffect/EffectsGallery.csproj b/snippets/csharp/System.Windows/UIElement/BitmapEffect/EffectsGallery.csproj index 2e52cd69913..ead08071b07 100644 --- a/snippets/csharp/System.Windows/UIElement/BitmapEffect/EffectsGallery.csproj +++ b/snippets/csharp/System.Windows/UIElement/BitmapEffect/EffectsGallery.csproj @@ -1,42 +1,19 @@ - - + + - SDKSamples + WinExe + net10.0-windows + true + false EffectsGallery sample - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {99E90579-62FC-4898-B168-24F7DBD3A34D} - bin\$(Configuration)\ - v4.8 - - - + - - - - - MyApp.xaml - Code - - - SampleViewer.xaml - Code - - - Code - - - Code - + + @@ -64,44 +41,37 @@ + + + MyApp.xaml + + + SampleViewer.xaml + + + OuterGlowCodeBehindExample.xaml - Code BlurCodeBehindExample.xaml - Code DropShadowCodeBehindExample.xaml - Code BevelCodeBehindExample.xaml - Code EmbossCodeBehindExample.xaml - Code + Always - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/Clip/ClipPathExample.csproj b/snippets/csharp/System.Windows/UIElement/Clip/ClipPathExample.csproj index 41d8ad3e551..1500db30f24 100644 --- a/snippets/csharp/System.Windows/UIElement/Clip/ClipPathExample.csproj +++ b/snippets/csharp/System.Windows/UIElement/Clip/ClipPathExample.csproj @@ -1,43 +1,29 @@ - + + - ClipExample - winexe - Release - App.ico - 10.0.20821 - 2.0 + WinExe + net10.0-windows + true + false SDKSample - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - + ClipExample - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/Effect/ShaderEffectDemo.csproj b/snippets/csharp/System.Windows/UIElement/Effect/ShaderEffectDemo.csproj index 859191415ad..fc4a5ba1688 100644 --- a/snippets/csharp/System.Windows/UIElement/Effect/ShaderEffectDemo.csproj +++ b/snippets/csharp/System.Windows/UIElement/Effect/ShaderEffectDemo.csproj @@ -1,78 +1,33 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {B5045D1A-45D4-4EBB-9E97-0F033C28266C} WinExe - Properties + net10.0-windows + true + false ShaderEffectDemo ShaderEffectDemo - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + + - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/Focus/CursorToEnd.csproj b/snippets/csharp/System.Windows/UIElement/Focus/CursorToEnd.csproj index 8d701e1399f..ebe1dba0cb9 100644 --- a/snippets/csharp/System.Windows/UIElement/Focus/CursorToEnd.csproj +++ b/snippets/csharp/System.Windows/UIElement/Focus/CursorToEnd.csproj @@ -1,43 +1,29 @@ - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Debug - bin\$(Configuration)\ - {5F2A84D9-99E8-4B1F-B622-F8E4FB12790A} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - + - Designer MSBuild:Compile + + + MSBuild:Compile - Designer + Window1.xaml - Code - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/Focusable/richtextbox_noscrollviewer.csproj b/snippets/csharp/System.Windows/UIElement/Focusable/richtextbox_noscrollviewer.csproj index c502e28d163..ebe1dba0cb9 100644 --- a/snippets/csharp/System.Windows/UIElement/Focusable/richtextbox_noscrollviewer.csproj +++ b/snippets/csharp/System.Windows/UIElement/Focusable/richtextbox_noscrollviewer.csproj @@ -1,46 +1,29 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSample - winexe - .\bin\Debug\ - {BCE3D158-E5EA-40F9-86DB-AA9B870ABC2A} - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - - - - - - - - 4.0 - - - - - - - - + - Designer MSBuild:Compile + + + - Designer MSBuild:Compile + + + Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/InputBindings/CommandingOverviewSnippets.csproj b/snippets/csharp/System.Windows/UIElement/InputBindings/CommandingOverviewSnippets.csproj index a78db8f8fef..efd0b6b18b8 100644 --- a/snippets/csharp/System.Windows/UIElement/InputBindings/CommandingOverviewSnippets.csproj +++ b/snippets/csharp/System.Windows/UIElement/InputBindings/CommandingOverviewSnippets.csproj @@ -1,64 +1,29 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false SDKSamples CommandingOverviewSnippets - 4 - winexe - 1.0.0.* - - false - {21F86877-19B8-4461-B00B-D661AFD6D93F} - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + + + + + - - - - - - - - 4.0 - - - - - - - - + + - - - - - MyApp.xaml - Code Window1.xaml - Component - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/IsEnabled/RoutedEventAddRemoveHandler.csproj b/snippets/csharp/System.Windows/UIElement/IsEnabled/RoutedEventAddRemoveHandler.csproj index 8152e6c7d82..df16e190a2e 100644 --- a/snippets/csharp/System.Windows/UIElement/IsEnabled/RoutedEventAddRemoveHandler.csproj +++ b/snippets/csharp/System.Windows/UIElement/IsEnabled/RoutedEventAddRemoveHandler.csproj @@ -1,32 +1,23 @@ - + + + WinExe + net10.0-windows + true + false RoutedEventAddRemoveHandler - winexe - Debug - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - + - - + + + - + - - - - - - - - 4.0 - - - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/IsFocused/PopupPropertiesSample.csproj b/snippets/csharp/System.Windows/UIElement/IsFocused/PopupPropertiesSample.csproj index e062ada65c6..83dfd38f9a1 100644 --- a/snippets/csharp/System.Windows/UIElement/IsFocused/PopupPropertiesSample.csproj +++ b/snippets/csharp/System.Windows/UIElement/IsFocused/PopupPropertiesSample.csproj @@ -1,58 +1,29 @@ - + + - Debug - AnyCPU - {D3D69C55-A09F-473C-99B8-876826A68796} + WinExe + net10.0-windows + true + false Popup_Properties_Sample Popup Properties Sample - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.8 - - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - + + - + + + app.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/IsManipulationEnabled/basicmanipulation.csproj b/snippets/csharp/System.Windows/UIElement/IsManipulationEnabled/basicmanipulation.csproj index d78ca1760ec..a68d49dcb78 100644 --- a/snippets/csharp/System.Windows/UIElement/IsManipulationEnabled/basicmanipulation.csproj +++ b/snippets/csharp/System.Windows/UIElement/IsManipulationEnabled/basicmanipulation.csproj @@ -1,95 +1,43 @@ - - + + - Debug - x86 - 10.0.20828 - 2.0 - {BA773441-F1CC-4EC5-ACC1-47F9D02E0DB9} WinExe - Properties + net10.0-windows + true + false BasicManipulation BasicManipulation - v4.8 - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer - - ReportBoundaryFeedBackExample.xaml - + + + MSBuild:Compile - Designer + + MSBuild:Compile + + + + + + ReportBoundaryFeedBackExample.xaml + App.xaml - Code MainWindow.xaml - Code - - Designer - MSBuild:Compile - - - - + - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/IsMouseCaptured/MouseSnippetSample.csproj b/snippets/csharp/System.Windows/UIElement/IsMouseCaptured/MouseSnippetSample.csproj index 97ba9cd131d..5e361126640 100644 --- a/snippets/csharp/System.Windows/UIElement/IsMouseCaptured/MouseSnippetSample.csproj +++ b/snippets/csharp/System.Windows/UIElement/IsMouseCaptured/MouseSnippetSample.csproj @@ -1,57 +1,29 @@ - + + - Debug - AnyCPU + WinExe + net10.0-windows + true + false MouseSnippetSample MouseSnippetSample - 4 - winexe - 1.0.0.* - - {2DF11A81-A20D-44A2-B2D5-55F2CEE22064} - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - 4.0 - - - + + - - - - + + + MyApp.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/IsMouseOver/listviewcheckbox.csproj b/snippets/csharp/System.Windows/UIElement/IsMouseOver/listviewcheckbox.csproj index c4d23caa016..815723e3a14 100644 --- a/snippets/csharp/System.Windows/UIElement/IsMouseOver/listviewcheckbox.csproj +++ b/snippets/csharp/System.Windows/UIElement/IsMouseOver/listviewcheckbox.csproj @@ -1,63 +1,33 @@ - + + - Debug - AnyCPU - {48FC4244-068D-4EA1-A0EC-F7D72D16B203} + WinExe + net10.0-windows + true + false SDKSample ListViewTemplate - 4 - winexe - 1.0.0.* - - 2.0 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile + + + app.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/OnRender/Light_Custom_Panel_csharp.csproj b/snippets/csharp/System.Windows/UIElement/OnRender/Light_Custom_Panel_csharp.csproj index 301ce82d4b4..1bdd8880a62 100644 --- a/snippets/csharp/System.Windows/UIElement/OnRender/Light_Custom_Panel_csharp.csproj +++ b/snippets/csharp/System.Windows/UIElement/OnRender/Light_Custom_Panel_csharp.csproj @@ -1,33 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/OpacityMask/OpacityMasking_markup.csproj b/snippets/csharp/System.Windows/UIElement/OpacityMask/OpacityMasking_markup.csproj index d7c415df29d..8ed89010325 100644 --- a/snippets/csharp/System.Windows/UIElement/OpacityMask/OpacityMasking_markup.csproj +++ b/snippets/csharp/System.Windows/UIElement/OpacityMask/OpacityMasking_markup.csproj @@ -1,57 +1,39 @@ - + + - OpacityMaskingExamples - winexe - Release - App.ico - 10.0.20821 - 2.0 + WinExe + net10.0-windows + true + false Microsoft.Samples.Graphics.OpacityMask - {25F0CAC3-E0BC-40E6-9E3F-A592D23CF6F0} - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - + OpacityMaskingExamples - - - - - - - - - - 4.0 - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer MSBuild:Compile - Designer + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/RenderSize/AdornersMiscCode.csproj b/snippets/csharp/System.Windows/UIElement/RenderSize/AdornersMiscCode.csproj index 80c366c632a..0044cd7f372 100644 --- a/snippets/csharp/System.Windows/UIElement/RenderSize/AdornersMiscCode.csproj +++ b/snippets/csharp/System.Windows/UIElement/RenderSize/AdornersMiscCode.csproj @@ -1,67 +1,33 @@ - + + - Debug - AnyCPU - {EBD6662E-7DCC-439C-872A-5C9846264604} + WinExe + net10.0-windows + true + false AdornersMiscCode AdornersMiscCode - 4 - winexe - 1.0.0.* - - 10.0.20821 - 2.0 - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - 4.0 - - - - - - + - - MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + MyApp.xaml - Code Window1.xaml - Code - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement/RenderTransformOrigin/project.csproj b/snippets/csharp/System.Windows/UIElement/RenderTransformOrigin/project.csproj index fc7b4501329..e418243224b 100644 --- a/snippets/csharp/System.Windows/UIElement/RenderTransformOrigin/project.csproj +++ b/snippets/csharp/System.Windows/UIElement/RenderTransformOrigin/project.csproj @@ -1,58 +1,34 @@ - - + + - Microsoft.Samples.Animation + WinExe + net10.0-windows + true + false TimingBehaviors_csharp - winexe - Release - MSBuild - False - 10.0.20821 - 2.0 - {BDDD444F-2D67-4503-A9B6-60E241A55762} - bin\$(Configuration)\ - en-US - v4.8 - - - + - - + + + + MyApp.xaml - Code - - - Code + SampleViewer.xaml - Code - - - Code + + - - - - - - - - - 4.0 - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/UIElement3D/Overview/Shapes.csproj b/snippets/csharp/System.Windows/UIElement3D/Overview/Shapes.csproj index 17c66d447ef..ac12ac6fb67 100644 --- a/snippets/csharp/System.Windows/UIElement3D/Overview/Shapes.csproj +++ b/snippets/csharp/System.Windows/UIElement3D/Overview/Shapes.csproj @@ -1,84 +1,34 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {642BB6F1-B7BE-488B-AC80-DF46AA5F8BFC} WinExe - Properties + net10.0-windows + true + false Shapes Shapes - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Vector/.ctor/VectorExamples_snip.csproj b/snippets/csharp/System.Windows/Vector/.ctor/VectorExamples_snip.csproj index 834492d9279..cb3094e4109 100644 --- a/snippets/csharp/System.Windows/Vector/.ctor/VectorExamples_snip.csproj +++ b/snippets/csharp/System.Windows/Vector/.ctor/VectorExamples_snip.csproj @@ -1,64 +1,35 @@ - + + - VectorExamples - $(OutputType) - Debug - AnyCPU - App.ico + WinExe + net10.0-windows + true + false Microsoft.Samples.VectorExamples - MSBuild - 2.0 - {9D37563A-C550-4347-9EEF-942BF2330B79} - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + VectorExamples - + - - - - - - - - - 4.0 - - + + - + SampleViewer.xaml - Code MyApp.xaml - Code - - - Code + + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Vector/Overview/MilVectorSample.csproj b/snippets/csharp/System.Windows/Vector/Overview/MilVectorSample.csproj index d4f34d0035a..e6d5de12bd4 100644 --- a/snippets/csharp/System.Windows/Vector/Overview/MilVectorSample.csproj +++ b/snippets/csharp/System.Windows/Vector/Overview/MilVectorSample.csproj @@ -1,63 +1,36 @@ - - + + + WinExe + net10.0-windows + true + false MilVectorSample - VectorSample - winexe - Debug - MSBuild - False - App.ico - 10.0.20821 - 2.0 - {D4E81B63-4335-4FBA-A981-CAA54B13F116} - bin\$(Configuration)\ - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - + - MSBuild:Compile - Designer - + + + MSBuild:Compile - Designer - + + + Window1.xaml - Code app.xaml - Code - - + - - - - - - - - - - - 4.0 - - - - - - + - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/VerticalAlignment/Overview/MPA_Layout_VerticallAlignment.csproj b/snippets/csharp/System.Windows/VerticalAlignment/Overview/MPA_Layout_VerticallAlignment.csproj index 066a4b14c7b..118a7a7967a 100644 --- a/snippets/csharp/System.Windows/VerticalAlignment/Overview/MPA_Layout_VerticallAlignment.csproj +++ b/snippets/csharp/System.Windows/VerticalAlignment/Overview/MPA_Layout_VerticallAlignment.csproj @@ -1,34 +1,15 @@ - - + + + WinExe + net10.0-windows + true + false SDKSample - winexe - Release - MSBuild - False - 2.0 - bin\$(Configuration)\ - v4.8 - - 10.0.20821 - - + - - Code - + - - - - - - - - - 4.0 - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/VisualState/Overview/vsmbuttontemplate.csproj b/snippets/csharp/System.Windows/VisualState/Overview/vsmbuttontemplate.csproj index ed6c51b4650..1ed3a3b5798 100644 --- a/snippets/csharp/System.Windows/VisualState/Overview/vsmbuttontemplate.csproj +++ b/snippets/csharp/System.Windows/VisualState/Overview/vsmbuttontemplate.csproj @@ -1,89 +1,36 @@ - + + - Debug - x86 - 10.0.20821 - 2.0 - {750FAA08-C3CE-4209-A382-AF3343B180A2} WinExe - Properties + net10.0-windows + true + true + false VSMButtonTemplate VSMButtonTemplate - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - x86 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - 4.0 - - - 3.5 - - - 3.5 - - - 3.5 - - - 3.0 - - - 3.0 - - - 3.0 - - - 4.0 - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile - Designer MSBuild:Compile MSBuild:Compile - Designer + + + App.xaml - Code ButtonStages.xaml @@ -94,21 +41,7 @@ Window1.xaml - Code - - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/VisualStateManager/GoToElementState/vsmgotoelementstate.csproj b/snippets/csharp/System.Windows/VisualStateManager/GoToElementState/vsmgotoelementstate.csproj index a52179c012f..f73d8caadd0 100644 --- a/snippets/csharp/System.Windows/VisualStateManager/GoToElementState/vsmgotoelementstate.csproj +++ b/snippets/csharp/System.Windows/VisualStateManager/GoToElementState/vsmgotoelementstate.csproj @@ -1,85 +1,33 @@ - - + + - Debug - x86 - 8.0.30703 - 2.0 - {1E07C7F1-C0DE-43ED-AAFA-D00B560DFBB4} WinExe - Properties + net10.0-windows + true + false VSMGoToElementState VSMGoToElementState - v4.8 - - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - 4.0 - - - - - + MSBuild:Compile - Designer + + + MSBuild:Compile - Designer + + + App.xaml - Code MainWindow.xaml - Code - - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/Close/CSharp.csproj b/snippets/csharp/System.Windows/Window/Close/CSharp.csproj index ac13cb6aea6..e31b3802e93 100644 --- a/snippets/csharp/System.Windows/Window/Close/CSharp.csproj +++ b/snippets/csharp/System.Windows/Window/Close/CSharp.csproj @@ -1,85 +1,49 @@ - + + - Debug - AnyCPU - {493F0D56-3388-4B48-8966-A9053FBE6EB4} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/Closing/CSharp.csproj b/snippets/csharp/System.Windows/Window/Closing/CSharp.csproj index 9bd507d8c16..0ac73ade03c 100644 --- a/snippets/csharp/System.Windows/Window/Closing/CSharp.csproj +++ b/snippets/csharp/System.Windows/Window/Closing/CSharp.csproj @@ -1,85 +1,49 @@ - + + - Debug - AnyCPU - {0C4C9EB5-E9AB-4673-A61D-4CDB62BBEA3D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code DataWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/DialogResult/CSharp.csproj b/snippets/csharp/System.Windows/Window/DialogResult/CSharp.csproj index e37f167db90..9b3c94f420d 100644 --- a/snippets/csharp/System.Windows/Window/DialogResult/CSharp.csproj +++ b/snippets/csharp/System.Windows/Window/DialogResult/CSharp.csproj @@ -1,52 +1,23 @@ - + + - Debug - AnyCPU - {CAD43F12-4833-4E61-B2BF-1B4BC7EAB9DE} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - - 4.0 - - - - - - - - + + + + + + + DialogBox.xaml @@ -57,32 +28,26 @@ App.xaml - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - True - True Resources.resx - True - True Settings.settings - + - - - + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/DragMove/WindowDragMoveSnippets.csproj b/snippets/csharp/System.Windows/Window/DragMove/WindowDragMoveSnippets.csproj index ca7c5a7302b..9a8381ba55f 100644 --- a/snippets/csharp/System.Windows/Window/DragMove/WindowDragMoveSnippets.csproj +++ b/snippets/csharp/System.Windows/Window/DragMove/WindowDragMoveSnippets.csproj @@ -1,83 +1,49 @@ - + + - Debug - AnyCPU - {B7C6B0E7-36DE-49E4-9FD3-A9C030230A5D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false WindowDragMoveSnippets WindowDragMoveSnippets - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator Resources.cs - Designer - - True - Resources.resx - + + + SettingsSingleFileGenerator Settings.cs - - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/Icon/WindowIconSample.csproj b/snippets/csharp/System.Windows/Window/Icon/WindowIconSample.csproj index cf9fb83ce39..654e939d241 100644 --- a/snippets/csharp/System.Windows/Window/Icon/WindowIconSample.csproj +++ b/snippets/csharp/System.Windows/Window/Icon/WindowIconSample.csproj @@ -1,86 +1,32 @@ - + + - Debug - AnyCPU - {0D413B30-C78F-464E-B0C3-9319EF8E1D0D} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false WindowIconSample WindowIconSample - 4 - winexe - 3.0 - true - Web - true - Foreground - 7 - Days - false - false - true - 1.0.0.* - true - true - Publish\ - SystemIcon.ico - v4.8 - - 10.0.20821 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - + - - - + + MainWindow.xaml + + - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/Overview/CSharp.csproj b/snippets/csharp/System.Windows/Window/Overview/CSharp.csproj index 12e60d01be2..ade3eff780a 100644 --- a/snippets/csharp/System.Windows/Window/Overview/CSharp.csproj +++ b/snippets/csharp/System.Windows/Window/Overview/CSharp.csproj @@ -1,87 +1,51 @@ - + + - Debug - AnyCPU - {7A873147-F68A-4CDF-A087-903F98EE0618} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + + Resources.resx + + + Settings.settings + - - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/OwnedWindows/CSharp.csproj b/snippets/csharp/System.Windows/Window/OwnedWindows/CSharp.csproj index 2735d88851f..e31b3802e93 100644 --- a/snippets/csharp/System.Windows/Window/OwnedWindows/CSharp.csproj +++ b/snippets/csharp/System.Windows/Window/OwnedWindows/CSharp.csproj @@ -1,86 +1,49 @@ - + + - Debug - AnyCPU - {2A721E3E-CAE4-4125-8BE7-6EA84EB23F2C} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code + + + Resources.resx + + + Settings.settings + - ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/RestoreBounds/WindowRestoreBoundsSnippets.csproj b/snippets/csharp/System.Windows/Window/RestoreBounds/WindowRestoreBoundsSnippets.csproj index 43b892442a4..8cb2b5a23b3 100644 --- a/snippets/csharp/System.Windows/Window/RestoreBounds/WindowRestoreBoundsSnippets.csproj +++ b/snippets/csharp/System.Windows/Window/RestoreBounds/WindowRestoreBoundsSnippets.csproj @@ -1,69 +1,29 @@ - + + - Debug - AnyCPU - {154B0E9B-41C6-446A-A2C4-AD45A6BB0946} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false WindowRestoreBoundsSnippets WindowRestoreBoundsSnippets - 4 - winexe - 1.0.0.* - - false - 3.0 - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code - - - - - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/ShowActivated/WindowShowActivatedSnippets.csproj b/snippets/csharp/System.Windows/Window/ShowActivated/WindowShowActivatedSnippets.csproj index 7f48f49a92c..c722eb7e848 100644 --- a/snippets/csharp/System.Windows/Window/ShowActivated/WindowShowActivatedSnippets.csproj +++ b/snippets/csharp/System.Windows/Window/ShowActivated/WindowShowActivatedSnippets.csproj @@ -1,121 +1,59 @@ - + + - Debug - AnyCPU - 10.0.20821 - 2.0 - {19624BC0-2EFD-4994-96FC-4DEA036B1585} WinExe - Properties + net10.0-windows + true + false WindowShowActivatedSnippets WindowShowActivatedSnippets - v4.8 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - 3.0 - - - 3.0 - - - 3.0 - - - 3.0 - - - 4.0 - - + MSBuild:Compile - Designer + + + - Designer MSBuild:Compile MSBuild:Compile - Designer + + + App.xaml - Code Window1.xaml - Code - - AWindow.xaml - - Code - - True - True Resources.resx - True Settings.settings - True + + + ResXFileCodeGenerator Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - - - \ No newline at end of file + + diff --git a/snippets/csharp/System.Windows/Window/ShowDialog/CSharp.csproj b/snippets/csharp/System.Windows/Window/ShowDialog/CSharp.csproj index fe6f557d5dc..0d1b3478ddd 100644 --- a/snippets/csharp/System.Windows/Window/ShowDialog/CSharp.csproj +++ b/snippets/csharp/System.Windows/Window/ShowDialog/CSharp.csproj @@ -1,90 +1,53 @@ - + + - Debug - AnyCPU - {07FF7E94-2796-4486-86C6-CADA5CBAFAAF} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows + true + false CSharp CSharp - 4 - winexe - 1.0.0.* - - false - v4.8 - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE + - - - - - - - - 4.0 - - - - - - - - + + - + + + App.xaml - Code MainWindow.xaml - Code - - - Code DialogBox.xaml - + + Resources.resx + + + Settings.settings + + + + ResXFileCodeGenerator - Designer Resources.Designer.cs + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - True - Resources.resx - - - True - True - Settings.settings - - - - \ No newline at end of file + + From b19521842f4d5763cf5c518ecf0dcf79f3914d44 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:23:20 -0700 Subject: [PATCH 4/6] Remove references to .NET Framework in code files (#12919) --- .../CPP/marshalas.sizeparamindex.cpp | 2 +- .../DesignerTransaction Sample/CPP/source.cpp | 10 +- .../CPP/instancedescriptor.cpp | 21 +- .../CodeDomProvider/CreateProvider/source.cs | 4 +- .../DesignerTransaction/Overview/source.cs | 90 +- .../Overview/instancedescriptor.cs | 14 +- .../Overview/Project.csproj | 10 + .../Overview/datareceivedevent.cs | 18 +- .../Overview/net_async.cs | 114 +- .../Overview/nmake_async.cs | 137 +- .../Overview/sort_async.cs | 47 +- .../createspecificculture.cs | 4 +- .../createspecificculture2.cs | 8 +- .../PersianCalendar/Overview/Program.cs | 1 + .../PersianCalendar/Overview/Project.csproj | 2 +- .../PersianCalendar/Overview/calendar2.cs | 50 +- .../PersianCalendar/Overview/pcal.cs | 172 +-- .../System.Globalization/TextInfo/Clone/ro.cs | 6 +- .../DllImportAttribute/PreserveSig/example.cs | 14 +- .../marshalas.sizeparamindex.cs | 4 +- .../StructLayoutAttribute/Pack/packex5.cs | 10 - .../StructLayoutAttribute/Pack/packex7.cs | 10 - .../FrameworkName/op_Equality/Operators1.cs | 100 +- .../FrameworkName/op_Equality/Project.csproj | 2 +- .../Overview/simpleservice.cs | 3 +- .../EncodingInfo/Overview/encodinginfo.cs | 163 +-- .../System.Text/StringBuilder/Capacity/cap.cs | 2 +- .../SpinWait/Overview/spinwait.cs | 4 +- .../ThreadStart/Overview/source.cs | 41 +- .../Application/Overview/CSharp.csproj | 110 +- .../Overview/Properties/AssemblyInfo.cs | 12 +- .../System/Console/Overview/example3.cs | 4 +- .../ToBoolean/system.convert snippet.cs | 54 +- .../csharp/System/Single/Overview/Program.cs | 1 + .../System/Single/Overview/Project.csproj | 1 - .../System/Single/Overview/comparison2.cs | 5 +- .../System/Single/Overview/precisionlist3.cs | 5 +- .../System/Single/Overview/precisionlist4a.cs | 35 - .../System/String/IndexOf/ignorable21.cs | 10 +- .../System/TimeSpan/Parse/parsefailure1.cs | 31 - .../System/Type/Assembly/type_assembly.cs | 19 +- .../Overview/net_async.fs | 3 - .../Overview/nmake_async.fs | 3 - .../Overview/sort_async.fs | 3 - .../System.Text/StringBuilder/Capacity/cap.fs | 10 +- .../System/Console/Overview/example3.fs | 1 - .../System/Double/Overview/precision1.fs | 10 +- .../System/String/IndexOf/ignorable21.fs | 5 +- .../System/TimeSpan/Parse/parsefailure1.fs | 9 +- .../System/Type/Assembly/type_assembly.fs | 11 +- .../ServerComputer/FileSystem/Class1.vb | 1102 ----------------- .../CodeDomProvider/CreateProvider/source.vb | 110 +- .../Overview/instancedescriptor.vb | 18 +- .../Overview/net_async.vb | 82 +- .../Overview/nmake_async.vb | 97 +- .../Overview/sort_async.vb | 10 +- .../createspecificculture2.vb | 12 +- .../PersianCalendar/Overview/calendar2.vb | 102 +- .../System.Globalization/TextInfo/Clone/ro.vb | 36 +- .../DllImportAttribute/PreserveSig/example.vb | 24 +- .../marshalas.sizeparamindex.vb | 6 +- .../FrameworkName/op_Equality/Operators1.vb | 68 +- .../Overview/simpleservice.vb | 11 +- .../EncodingInfo/Overview/encodinginfo.vb | 171 +-- .../System.Text/StringBuilder/Capacity/cap.vb | 24 +- .../SpinWait/Overview/spinwait.vb | 4 +- .../System/Console/Overview/example3.vb | 45 +- .../ToBoolean/system.convert snippet.vb | 12 +- .../System/Single/Overview/PrecisionList4a.vb | 37 - .../System/Single/Overview/comparison2.vb | 5 +- .../System/Single/Overview/precisionlist3.vb | 6 +- .../System/String/IndexOf/ignorable21.vb | 9 +- .../System/TimeSpan/Parse/parsefailure1.vb | 7 +- .../System/Type/Assembly/type_assembly.vb | 9 +- .../ServerComputer.xml | 25 +- .../FileSystem.xml | 406 +----- .../SpecialDirectories.xml | 210 ++-- .../FileSystemProxy.xml | 312 +---- .../SpecialDirectoriesProxy.xml | 206 +-- .../FrameworkName.xml | 5 +- xml/System.Windows/Application.xml | 16 +- xml/System/String.xml | 3 +- xml/System/Type.xml | 20 +- 83 files changed, 1043 insertions(+), 3572 deletions(-) create mode 100644 snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/Project.csproj create mode 100644 snippets/csharp/System.Globalization/PersianCalendar/Overview/Program.cs create mode 100644 snippets/csharp/System/Single/Overview/Program.cs delete mode 100644 snippets/csharp/System/Single/Overview/precisionlist4a.cs delete mode 100644 snippets/csharp/System/TimeSpan/Parse/parsefailure1.cs delete mode 100644 snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb delete mode 100644 snippets/visualbasic/System/Single/Overview/PrecisionList4a.vb diff --git a/snippets/cpp/VS_Snippets_CLR_System/system.Runtime.InteropServices.MarshalAsAttribute.SizeParamIndex/CPP/marshalas.sizeparamindex.cpp b/snippets/cpp/VS_Snippets_CLR_System/system.Runtime.InteropServices.MarshalAsAttribute.SizeParamIndex/CPP/marshalas.sizeparamindex.cpp index ba7d39004e3..0af19ff9e7e 100644 --- a/snippets/cpp/VS_Snippets_CLR_System/system.Runtime.InteropServices.MarshalAsAttribute.SizeParamIndex/CPP/marshalas.sizeparamindex.cpp +++ b/snippets/cpp/VS_Snippets_CLR_System/system.Runtime.InteropServices.MarshalAsAttribute.SizeParamIndex/CPP/marshalas.sizeparamindex.cpp @@ -4,7 +4,7 @@ using namespace System; using namespace System::Runtime::InteropServices; // Force the layout of your fields to the C-style struct layout. -// Without this, the .NET Framework will reorder your fields. +// Without this, .NET will reorder your fields. [StructLayoutAttribute(LayoutKind::Sequential)] value struct Vertex diff --git a/snippets/cpp/VS_Snippets_Winforms/DesignerTransaction Sample/CPP/source.cpp b/snippets/cpp/VS_Snippets_Winforms/DesignerTransaction Sample/CPP/source.cpp index 5a435721cde..2cda004f223 100644 --- a/snippets/cpp/VS_Snippets_Winforms/DesignerTransaction Sample/CPP/source.cpp +++ b/snippets/cpp/VS_Snippets_Winforms/DesignerTransaction Sample/CPP/source.cpp @@ -87,14 +87,14 @@ private ref class DTDesigner: public ComponentDesigner { IDesignerHost^ host = static_cast(GetService( IDesignerHost::typeid )); DesignerTransaction^ t = host->CreateTransaction( "Change Text and Size" ); - + /* The code within the using statement is considered to be a single transaction. When the user selects Undo, the system will undo everything executed in this code block. */ if ( notification_mode ) MessageBox::Show( "Entering a Designer-Initiated Designer Transaction" ); - // The .NET Framework automatically associates the TypeDescriptor with the correct component + // .NET automatically associates the TypeDescriptor with the correct component. PropertyDescriptor^ someText = TypeDescriptor::GetProperties( Component )[ "StringProperty" ]; someText->SetValue( Component, "This text was set by the designer for this component." ); PropertyDescriptor^ anInteger = TypeDescriptor::GetProperties( Component )[ "CountProperty" ]; @@ -108,7 +108,7 @@ private ref class DTDesigner: public ComponentDesigner } public: - property DesignerVerbCollection^ Verbs + property DesignerVerbCollection^ Verbs { // The Verbs property is overridden from ComponentDesigner virtual DesignerVerbCollection^ get() override @@ -167,7 +167,7 @@ public ref class DTComponent: public System::ComponentModel::Component } public: - property String^ StringProperty + property String^ StringProperty { String^ get() { @@ -180,7 +180,7 @@ public ref class DTComponent: public System::ComponentModel::Component } } - property int CountProperty + property int CountProperty { int get() { diff --git a/snippets/cpp/VS_Snippets_Winforms/InstanceDescriptorSample/CPP/instancedescriptor.cpp b/snippets/cpp/VS_Snippets_Winforms/InstanceDescriptorSample/CPP/instancedescriptor.cpp index af165ac8484..ca37279d7eb 100644 --- a/snippets/cpp/VS_Snippets_Winforms/InstanceDescriptorSample/CPP/instancedescriptor.cpp +++ b/snippets/cpp/VS_Snippets_Winforms/InstanceDescriptorSample/CPP/instancedescriptor.cpp @@ -12,11 +12,11 @@ using namespace System::Globalization; using namespace System::Collections; using namespace System::Reflection; -/* This sample shows how to support code generation for a custom type of object +/* This sample shows how to support code generation for a custom type of object using a type converter and InstanceDescriptor objects. To use this code, copy it to a file and add the file to a project. Then add - a component to the project and declare a Triangle field and a public property + a component to the project and declare a Triangle field and a public property with accessors for the Triangle field on the component. The Triangle property will be persisted using code generation. @@ -35,7 +35,7 @@ public ref class Triangle public: - property Point Point1 + property Point Point1 { Point get() { @@ -48,7 +48,7 @@ public ref class Triangle } } - property Point Point2 + property Point Point2 { Point get() { @@ -61,7 +61,7 @@ public ref class Triangle } } - property Point Point3 + property Point Point3 { Point get() { @@ -81,12 +81,11 @@ public ref class Triangle P3 = point3; } - - /* A TypeConverter for the Triangle object. Note that you can make it internal, + /* A TypeConverter for the Triangle object. Note that you can make it internal, private, or any scope you want and the designers will still be able to use it through the TypeDescriptor object. This type converter provides the - capability to convert to an InstanceDescriptor. This object can be used by - the .NET Framework to generate source code that creates an instance of a + capability to convert to an InstanceDescriptor. This object can be used by + .NET to generate source code that creates an instance of a Triangle object. */ [System::Security::Permissions::PermissionSet(System::Security:: Permissions::SecurityAction::Demand, Name = "FullTrust")] @@ -104,7 +103,7 @@ public ref class Triangle return true; } - + // Always call the base to see if it can perform the conversion. return TypeConverter::CanConvertTo( context, destinationType ); } @@ -138,7 +137,7 @@ public ref class TestComponent: public System::ComponentModel::Component myTriangle = gcnew Triangle( Point(5,5),Point(10,10),Point(1,8) ); } - property Triangle^ MyTriangle + property Triangle^ MyTriangle { Triangle^ get() { diff --git a/snippets/csharp/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.cs b/snippets/csharp/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.cs index 43c1530bbe0..3d4b2675da5 100644 --- a/snippets/csharp/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.cs +++ b/snippets/csharp/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.cs @@ -1,7 +1,5 @@ // System.CodeDom.Compiler.CompilerInfo // -// Requires .NET Framework version 2.0 or higher. -// // The following example displays compiler configuration settings. // Command-line arguments are used to specify a compiler language, // file extension, or provider type. For the given input, the @@ -335,4 +333,4 @@ static void DisplayAllCompilerInfo() } } } -//
\ No newline at end of file +// diff --git a/snippets/csharp/System.ComponentModel.Design/DesignerTransaction/Overview/source.cs b/snippets/csharp/System.ComponentModel.Design/DesignerTransaction/Overview/source.cs index ffc0b324b15..ce38fb0f222 100644 --- a/snippets/csharp/System.ComponentModel.Design/DesignerTransaction/Overview/source.cs +++ b/snippets/csharp/System.ComponentModel.Design/DesignerTransaction/Overview/source.cs @@ -6,33 +6,33 @@ using System.Windows.Forms.Design; /* - This sample demonstrates how to perform a series of actions in a designer - transaction, how to change values of properties of a component from a - designer, and how to complete transactions without being interrupted + This sample demonstrates how to perform a series of actions in a designer + transaction, how to change values of properties of a component from a + designer, and how to complete transactions without being interrupted by other activities. - To run this sample, add this code to a class library project and compile. - Create a new Windows Forms project or load a form in the designer. Add a + To run this sample, add this code to a class library project and compile. + Create a new Windows Forms project or load a form in the designer. Add a reference to the class library that was compiled in the first step. - Right-click the Toolbox in design mode and click Customize Toolbox. - Browse to the class library that was compiled in the first step and - select OK until the DTComponent item appears in the Toolbox. Add an - instance of this component to the form. - + Right-click the Toolbox in design mode and click Customize Toolbox. + Browse to the class library that was compiled in the first step and + select OK until the DTComponent item appears in the Toolbox. Add an + instance of this component to the form. + When the component is created and added to the component tray for your - design project, the Initialize method of the designer is called. + design project, the Initialize method of the designer is called. This method displays a message box informing you that designer transaction - event handlers will be registered unless you click Cancel. When you set - properties in the properties window, each change will be encapsulated in - a designer transaction, allowing the change to be undone later. - - When you right-click the component, the shortcut menu for the component - is displayed. The designer constructs this menu according to whether + event handlers will be registered unless you click Cancel. When you set + properties in the properties window, each change will be encapsulated in + a designer transaction, allowing the change to be undone later. + + When you right-click the component, the shortcut menu for the component + is displayed. The designer constructs this menu according to whether designer transaction notifications are enabled, and offers the option - of enabling or disabling the notifications, depending on the current - mode. The shortcut menu also presents a Perform Example Transaction - item, which will set the values of the component's StringProperty and - CountProperty properties. You can undo the last designer transaction using + of enabling or disabling the notifications, depending on the current + mode. The shortcut menu also presents a Perform Example Transaction + item, which will set the values of the component's StringProperty and + CountProperty properties. You can undo the last designer transaction using the Undo command provided by the Visual Studio development environment. */ @@ -44,7 +44,7 @@ public class DTComponent : System.ComponentModel.Component { private string m_String; private int m_Count; - + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public string StringProperty { @@ -53,7 +53,7 @@ public string StringProperty set { m_String = value; } } - + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public int CountProperty { @@ -69,18 +69,18 @@ private void InitializeComponent() m_Count = 0; } } - + internal class DTDesigner : ComponentDesigner { private bool notification_mode = false; private int count = 10; - + // The Verbs property is overridden from ComponentDesigner public override DesignerVerbCollection Verbs { get - { - DesignerVerbCollection dvc = new DesignerVerbCollection(); + { + DesignerVerbCollection dvc = new DesignerVerbCollection(); dvc.Add( new DesignerVerb("Perform Example Transaction", new EventHandler(this.DoTransaction)) ); if(notification_mode) dvc.Add(new DesignerVerb("End Designer Transaction Notifications", new EventHandler(this.UnlinkDTNotifications))); @@ -88,12 +88,12 @@ public override DesignerVerbCollection Verbs dvc.Add(new DesignerVerb("Show Designer Transaction Notifications", new EventHandler(this.LinkDTNotifications))); return dvc; } } - + public override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); - IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); + IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); if(host == null) { MessageBox.Show("The IDesignerHost service interface could not be obtained."); @@ -101,18 +101,18 @@ public override void Initialize(System.ComponentModel.IComponent component) } if( MessageBox.Show("Press the Yes button to display notification message boxes for the designer transaction opened and closed notifications.","Link DesignerTransaction Notifications?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign) == DialogResult.Yes ) - { + { host.TransactionOpened += new EventHandler(OnDesignerTransactionOpened); host.TransactionClosed += new DesignerTransactionCloseEventHandler(OnDesignerTransactionClosed); notification_mode = true; } } - + private void LinkDTNotifications(object sender, EventArgs e) { if(!notification_mode) { - IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); + IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); if(host != null) { notification_mode = true; @@ -126,9 +126,9 @@ private void UnlinkDTNotifications(object sender, EventArgs e) { if(notification_mode) { - IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); + IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); if(host != null) - { + { notification_mode = false; host.TransactionOpened -= new EventHandler(OnDesignerTransactionOpened); host.TransactionClosed -= new DesignerTransactionCloseEventHandler(OnDesignerTransactionClosed); @@ -137,18 +137,18 @@ private void UnlinkDTNotifications(object sender, EventArgs e) } private void OnDesignerTransactionOpened(object sender, EventArgs e) - { + { System.Windows.Forms.MessageBox.Show("A Designer Transaction was started. (TransactionOpened)"); } private void OnDesignerTransactionClosed(object sender, DesignerTransactionCloseEventArgs e) - { + { System.Windows.Forms.MessageBox.Show("A Designer Transaction was completed. (TransactionClosed)"); - } + } - private void DoTransaction(object sender, EventArgs e) - { - IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); + private void DoTransaction(object sender, EventArgs e) + { + IDesignerHost host = (IDesignerHost)GetService(typeof(IDesignerHost)); DesignerTransaction t = host.CreateTransaction("Change Text and Size"); /* The code within the using statement is considered to be a single transaction. @@ -157,8 +157,8 @@ private void DoTransaction(object sender, EventArgs e) { if(notification_mode) System.Windows.Forms.MessageBox.Show("Entering a Designer-Initiated Designer Transaction"); - - // The .NET Framework automatically associates the TypeDescriptor with the correct component + + // .NET automatically associates the TypeDescriptor with the correct component. PropertyDescriptor someText = TypeDescriptor.GetProperties(Component)["StringProperty"]; someText.SetValue(Component, "This text was set by the designer for this component."); @@ -168,12 +168,12 @@ private void DoTransaction(object sender, EventArgs e) // Complete the designer transaction. t.Commit(); - + if(notification_mode) System.Windows.Forms.MessageBox.Show("Designer-Initiated Designer Transaction Completed"); } } - + protected override void Dispose(bool disposing) { UnlinkDTNotifications(this, new EventArgs()); @@ -181,4 +181,4 @@ protected override void Dispose(bool disposing) } } } -// \ No newline at end of file +// diff --git a/snippets/csharp/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.cs b/snippets/csharp/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.cs index d997f1a0b9d..a66dfed63c1 100644 --- a/snippets/csharp/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.cs +++ b/snippets/csharp/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.cs @@ -8,11 +8,11 @@ using System.Reflection; namespace Microsoft.Samples.InstanceDescriptorSample; -// This sample shows how to support code generation for a custom type +// This sample shows how to support code generation for a custom type // of object using a type converter and InstanceDescriptor objects. -// To use this code, copy it to a file and add the file to a project. -// Then add a component to the project and declare a Triangle field and +// To use this code, copy it to a file and add the file to a project. +// Then add a component to the project and declare a Triangle field and // a public property with accessors for the Triangle field on the component. // The Triangle property will be persisted using code generation. @@ -45,11 +45,11 @@ public Triangle(Point point1, Point point2, Point point3) P3 = point3; } - // A TypeConverter for the Triangle object. Note that you can make it internal, + // A TypeConverter for the Triangle object. Note that you can make it internal, // private, or any scope you want and the designers will still be able to use - // it through the TypeDescriptor object. This type converter provides the - // capability to convert to an InstanceDescriptor. This object can be used by - // the .NET Framework to generate source code that creates an instance of a + // it through the TypeDescriptor object.This type converter provides the + // capability to convert to an InstanceDescriptor.This object can be used by + // .NET to generate source code that creates an instance of a // Triangle object. internal class TriangleConverter : TypeConverter { diff --git a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/Project.csproj b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/Project.csproj new file mode 100644 index 00000000000..2810605dfc8 --- /dev/null +++ b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/Project.csproj @@ -0,0 +1,10 @@ + + + + library + net10.0 + enable + enable + + + diff --git a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/datareceivedevent.cs b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/datareceivedevent.cs index 1e45da4c82a..44261250ba5 100644 --- a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/datareceivedevent.cs +++ b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/datareceivedevent.cs @@ -1,27 +1,25 @@ // -using System; -using System.IO; using System.Diagnostics; using System.Text; class StandardAsyncOutputExample { - private static int lineCount = 0; - private static StringBuilder output = new StringBuilder(); + private static int s_lineCount = 0; + private static readonly StringBuilder s_output = new(); public static void Main() { - Process process = new Process(); + Process process = new(); process.StartInfo.FileName = "ipconfig.exe"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.OutputDataReceived += new DataReceivedEventHandler((sender, e) => { // Prepend line numbers to each line of the output. - if (!String.IsNullOrEmpty(e.Data)) + if (!string.IsNullOrEmpty(e.Data)) { - lineCount++; - output.Append("\n[" + lineCount + "]: " + e.Data); + s_lineCount++; + s_output.Append("\n[" + s_lineCount + "]: " + e.Data); } }); @@ -33,7 +31,7 @@ public static void Main() process.WaitForExit(); // Write the redirected output to this application's window. - Console.WriteLine(output); + Console.WriteLine(s_output); process.WaitForExit(); process.Close(); @@ -42,4 +40,4 @@ public static void Main() Console.ReadLine(); } } -// \ No newline at end of file +// diff --git a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.cs b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.cs index 48777aef8f5..feb1727e783 100644 --- a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.cs +++ b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.cs @@ -1,56 +1,46 @@ -// System.Diagnostics -// -// Requires .NET Framework version 1.2 or higher. - -// The following example uses the net view command to list the +// The following example uses the net view command to list the // available network resources available on a remote computer, // and displays the results to the console. Specifying the optional // error log file redirects error output to that file. // -// Define the namespaces used by this sample. -using System; -using System.Text; -using System.Globalization; -using System.IO; using System.Diagnostics; -using System.Threading; -using System.ComponentModel; +using System.Globalization; +using System.Text; namespace ProcessAsyncStreamSamples { - class ProcessNetStreamRedirection { // Define static variables shared by class methods. - private static StreamWriter streamError =null; - private static String netErrorFile = ""; - private static StringBuilder netOutput = null; - private static bool errorRedirect = false; - private static bool errorsWritten = false; + private static StreamWriter? s_streamError; + private static string? s_netErrorFile = ""; + private static StringBuilder? s_netOutput; + private static bool s_errorRedirect = false; + private static bool s_errorsWritten = false; public static void RedirectNetCommandStreams() { - String netArguments; + string? netArguments; Process netProcess; // Get the input computer name. Console.WriteLine("Enter the computer name for the net view command:"); - netArguments = Console.ReadLine().ToUpper(CultureInfo.InvariantCulture); - if (String.IsNullOrEmpty(netArguments)) + netArguments = Console.ReadLine()?.ToUpper(CultureInfo.InvariantCulture); + if (string.IsNullOrEmpty(netArguments)) { // Default to the help command if there is not an input argument. netArguments = "/?"; } // Check if errors should be redirected to a file. - errorsWritten = false; + s_errorsWritten = false; Console.WriteLine("Enter a fully qualified path to an error log file"); Console.WriteLine(" or just press Enter to write errors to console:"); - netErrorFile = Console.ReadLine().ToUpper(CultureInfo.InvariantCulture); - if (!String.IsNullOrEmpty(netErrorFile)) + s_netErrorFile = Console.ReadLine()?.ToUpper(CultureInfo.InvariantCulture); + if (!string.IsNullOrEmpty(s_netErrorFile)) { - errorRedirect = true; + s_errorRedirect = true; } // Note that at this point, netArguments and netErrorFile @@ -62,8 +52,7 @@ public static void RedirectNetCommandStreams() netProcess.StartInfo.FileName = "Net.exe"; // Build the net command argument list. - netProcess.StartInfo.Arguments = String.Format("view {0}", - netArguments); + netProcess.StartInfo.Arguments = $"view {netArguments}"; // Set UseShellExecute to false for redirection. netProcess.StartInfo.UseShellExecute = false; @@ -72,9 +61,9 @@ public static void RedirectNetCommandStreams() // This stream is read asynchronously using an event handler. netProcess.StartInfo.RedirectStandardOutput = true; netProcess.OutputDataReceived += new DataReceivedEventHandler(NetOutputDataHandler); - netOutput = new StringBuilder(); + s_netOutput = new StringBuilder(); - if (errorRedirect) + if (s_errorRedirect) { // Redirect the error output of the net command. netProcess.StartInfo.RedirectStandardError = true; @@ -86,12 +75,10 @@ public static void RedirectNetCommandStreams() netProcess.StartInfo.RedirectStandardError = false; } - Console.WriteLine("\nStarting process: net {0}", - netProcess.StartInfo.Arguments); - if (errorRedirect) + Console.WriteLine($"\nStarting process: net {netProcess.StartInfo.Arguments}"); + if (s_errorRedirect) { - Console.WriteLine("Errors will be written to the file {0}", - netErrorFile); + Console.WriteLine($"Errors will be written to the file {s_netErrorFile}"); } // Start the process. @@ -100,7 +87,7 @@ public static void RedirectNetCommandStreams() // Start the asynchronous read of the standard output stream. netProcess.BeginOutputReadLine(); - if (errorRedirect) + if (s_errorRedirect) { // Start the asynchronous read of the standard // error stream. @@ -110,39 +97,37 @@ public static void RedirectNetCommandStreams() // Let the net command run, collecting the output. netProcess.WaitForExit(); - if (streamError != null) + if (s_streamError != null) { // Close the error file. - streamError.Close(); + s_streamError.Close(); } else { // Set errorsWritten to false if the stream is not // open. Either there are no errors, or the error // file could not be opened. - errorsWritten = false; + s_errorsWritten = false; } - if (netOutput.Length > 0) + if (s_netOutput.Length > 0) { // If the process wrote more than just // white space, write the output to the console. - Console.WriteLine("\nPublic network shares from net view:\n{0}\n", - netOutput); + Console.WriteLine($"\nPublic network shares from net view:\n{s_netOutput}\n"); } - if (errorsWritten) + if (s_errorsWritten) { // Signal that the error file had something // written to it. - String [] errorOutput = File.ReadAllLines(netErrorFile); + string[] errorOutput = File.ReadAllLines(s_netErrorFile); if (errorOutput.Length > 0) { - Console.WriteLine("\nThe following error output was appended to {0}.", - netErrorFile); - foreach (String errLine in errorOutput) + Console.WriteLine($"\nThe following error output was appended to {s_netErrorFile}:"); + foreach (string errLine in errorOutput) { - Console.WriteLine(" {0}", errLine); + Console.WriteLine($" {errLine}"); } } Console.WriteLine(); @@ -155,10 +140,10 @@ private static void NetOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine) { // Collect the net view command output. - if (!String.IsNullOrEmpty(outLine.Data)) + if (!string.IsNullOrEmpty(outLine.Data)) { // Add the text to the collected output. - netOutput.Append(Environment.NewLine + " " + outLine.Data); + s_netOutput.Append(Environment.NewLine + " " + outLine.Data); } } @@ -168,16 +153,16 @@ private static void NetErrorDataHandler(object sendingProcess, // Write the error text to the file if there is something // to write and an error file has been specified. - if (!String.IsNullOrEmpty(errLine.Data)) + if (!string.IsNullOrEmpty(errLine.Data)) { - if (!errorsWritten) + if (!s_errorsWritten) { - if (streamError == null) + if (s_streamError == null) { // Open the file. try { - streamError = new StreamWriter(netErrorFile, true); + s_streamError = new StreamWriter(s_netErrorFile, true); } catch (Exception e) { @@ -186,22 +171,22 @@ private static void NetErrorDataHandler(object sendingProcess, } } - if (streamError != null) + if (s_streamError != null) { // Write a header to the file if this is the first // call to the error output handler. - streamError.WriteLine(); - streamError.WriteLine(DateTime.Now.ToString()); - streamError.WriteLine("Net View error output:"); + s_streamError.WriteLine(); + s_streamError.WriteLine(DateTime.Now.ToString()); + s_streamError.WriteLine("Net View error output:"); } - errorsWritten = true; + s_errorsWritten = true; } - if (streamError != null) + if (s_streamError != null) { // Write redirected errors to the file. - streamError.WriteLine(errLine.Data); - streamError.Flush(); + s_streamError.WriteLine(errLine.Data); + s_streamError.Flush(); } } } @@ -211,11 +196,10 @@ private static void NetErrorDataHandler(object sendingProcess, namespace ProcessAsyncStreamSamples { - - class ProcessSampleMain + class ProcessAsyncSample { /// The main entry point for the application. - static void Main() + static void Run() { try { @@ -228,4 +212,4 @@ static void Main() } } } -} \ No newline at end of file +} diff --git a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.cs b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.cs index c22103385f4..a06b5e7e0a8 100644 --- a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.cs +++ b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.cs @@ -1,14 +1,5 @@ -// System.Diagnostics -// -// Requires .NET Framework version 1.2 or higher. - -// Define the namespaces used by this sample. -using System; +using System.Diagnostics; using System.Text; -using System.IO; -using System.Diagnostics; -using System.Threading; -using System.ComponentModel; // namespace ProcessAsyncStreamSamples @@ -16,43 +7,41 @@ namespace ProcessAsyncStreamSamples class ProcessNMakeStreamRedirection { // Define static variables shared by class methods. - private static StreamWriter buildLogStream =null; - private static Mutex logMutex = new Mutex(); - private static int maxLogLines = 25; - private static int currentLogLines = 0; + private static StreamWriter? s_buildLogStream; + private static readonly Mutex s_logMutex = new(); + private static int s_maxLogLines = 25; + private static int s_currentLogLines = 0; public static void RedirectNMakeCommandStreams() { - String nmakeArguments = null; + string? nmakeArguments = null; Process nmakeProcess; // Get the input nmake command-line arguments. - Console.WriteLine("Enter the NMake command line arguments " + - "(@commandfile or /f makefile, etc):"); - String inputText = Console.ReadLine(); - if (!String.IsNullOrEmpty(inputText)) + while (string.IsNullOrEmpty(nmakeArguments)) { - nmakeArguments = inputText; + Console.WriteLine("Enter the NMake command line arguments " + + "(@commandfile or /f makefile, etc):"); + nmakeArguments = Console.ReadLine(); } Console.WriteLine("Enter max line limit for log file (default is 25):"); - inputText = Console.ReadLine(); - if (!String.IsNullOrEmpty(inputText)) + string? inputText = Console.ReadLine(); + if (!string.IsNullOrEmpty(inputText)) { - if (!Int32.TryParse(inputText, out maxLogLines)) + if (!int.TryParse(inputText, out s_maxLogLines)) { - maxLogLines = 25; + s_maxLogLines = 25; } } - Console.WriteLine("Output beyond {0} lines will be ignored.", - maxLogLines); + Console.WriteLine($"Output beyond {s_maxLogLines} lines will be ignored."); // Initialize the process and its StartInfo properties. nmakeProcess = new Process(); nmakeProcess.StartInfo.FileName = "NMake.exe"; // Build the nmake command argument list. - if (!String.IsNullOrEmpty(nmakeArguments)) + if (!string.IsNullOrEmpty(nmakeArguments)) { nmakeProcess.StartInfo.Arguments = nmakeArguments; } @@ -69,45 +58,44 @@ public static void RedirectNMakeCommandStreams() nmakeProcess.StartInfo.RedirectStandardError = true; nmakeProcess.ErrorDataReceived += new DataReceivedEventHandler(NMakeErrorDataHandler); - logMutex.WaitOne(); + s_logMutex.WaitOne(); - currentLogLines = 0; + s_currentLogLines = 0; // Write a header to the log file. - const String buildLogFile = "NmakeCmd.Txt"; + const string buildLogFile = "NmakeCmd.Txt"; try { - buildLogStream = new StreamWriter(buildLogFile, true); + s_buildLogStream = new StreamWriter(buildLogFile, true); } catch (Exception e) { - Console.WriteLine("Could not open output file {0}", buildLogFile); - Console.WriteLine("Exception = {0}", e.ToString()); + Console.WriteLine($"Could not open output file {buildLogFile}"); + Console.WriteLine($"Exception = {e}"); Console.WriteLine(e.Message); - buildLogStream = null; + s_buildLogStream = null; } - if (buildLogStream != null) + if (s_buildLogStream != null) { - Console.WriteLine("Nmake output logged to {0}", - buildLogFile); + Console.WriteLine($"Nmake output logged to {buildLogFile}"); - buildLogStream.WriteLine(); - buildLogStream.WriteLine(DateTime.Now.ToString()); - if (!String.IsNullOrEmpty(nmakeArguments)) + s_buildLogStream.WriteLine(); + s_buildLogStream.WriteLine(DateTime.Now.ToString()); + if (!string.IsNullOrEmpty(nmakeArguments)) { - buildLogStream.Write("Command line = NMake {0}", + s_buildLogStream.Write("Command line = NMake {0}", nmakeArguments); } else { - buildLogStream.Write("Command line = Nmake"); + s_buildLogStream.Write("Command line = Nmake"); } - buildLogStream.WriteLine(); - buildLogStream.Flush(); + s_buildLogStream.WriteLine(); + s_buildLogStream.Flush(); - logMutex.ReleaseMutex(); + s_logMutex.ReleaseMutex(); // Start the process. Console.WriteLine(); @@ -125,8 +113,8 @@ public static void RedirectNMakeCommandStreams() nmakeProcess.WaitForExit(); nmakeProcess.Close(); - buildLogStream.Close(); - logMutex.Dispose(); + s_buildLogStream.Close(); + s_logMutex.Dispose(); } } @@ -137,25 +125,24 @@ private static void NMakeOutputDataHandler(object sendingProcess, // logging it to the output file. Cancel the read // operation when the maximum line limit is reached. - if (!String.IsNullOrEmpty(outLine.Data)) + if (!string.IsNullOrEmpty(outLine.Data)) { - logMutex.WaitOne(); + s_logMutex.WaitOne(); - currentLogLines++; - if (currentLogLines > maxLogLines) + s_currentLogLines++; + if (s_currentLogLines > s_maxLogLines) { // Display the line to the console. // Skip writing the line to the log file. - Console.WriteLine("StdOut: {0}", outLine.Data); + Console.WriteLine($"StdOut: {outLine.Data}"); } - else if (currentLogLines == maxLogLines) + else if (s_currentLogLines == s_maxLogLines) { LogToFile("StdOut", "", true); // Stop reading the output streams. - Process p = sendingProcess as Process; - if (p != null) + if (sendingProcess is Process p) { p.CancelOutputRead(); p.CancelErrorRead(); @@ -166,7 +153,7 @@ private static void NMakeOutputDataHandler(object sendingProcess, // Write the line to the log file. LogToFile("StdOut", outLine.Data, true); } - logMutex.ReleaseMutex(); + s_logMutex.ReleaseMutex(); } } @@ -177,25 +164,24 @@ private static void NMakeErrorDataHandler(object sendingProcess, // logging it to the output file. Cancel the error output // read operation when the maximum line limit is reached. - if (!String.IsNullOrEmpty(errLine.Data)) + if (!string.IsNullOrEmpty(errLine.Data)) { - logMutex.WaitOne(); + s_logMutex.WaitOne(); - currentLogLines++; - if (currentLogLines > maxLogLines) + s_currentLogLines++; + if (s_currentLogLines > s_maxLogLines) { // Display the error line to the console. // Skip writing the line to the log file. - Console.WriteLine("StdErr: {0}", errLine.Data); + Console.WriteLine($"StdErr: {errLine.Data}"); } - else if (currentLogLines == maxLogLines) + else if (s_currentLogLines == s_maxLogLines) { LogToFile("StdErr", "", true); // Stop reading the output streams - Process p = sendingProcess as Process; - if (p != null) + if (sendingProcess is Process p) { p.CancelErrorRead(); p.CancelOutputRead(); @@ -207,31 +193,31 @@ private static void NMakeErrorDataHandler(object sendingProcess, LogToFile("StdErr", errLine.Data, true); } - logMutex.ReleaseMutex(); + s_logMutex.ReleaseMutex(); } } - private static void LogToFile(String logPrefix, - String logText, bool echoToConsole) + private static void LogToFile(string logPrefix, + string logText, bool echoToConsole) { // Write the specified line to the log file stream. StringBuilder logString = new StringBuilder(); - if (!String.IsNullOrEmpty(logPrefix)) + if (!string.IsNullOrEmpty(logPrefix)) { logString.AppendFormat("{0}> ", logPrefix); } - if (!String.IsNullOrEmpty(logText)) + if (!string.IsNullOrEmpty(logText)) { logString.Append(logText); } - if (buildLogStream != null) + if (s_buildLogStream != null) { - buildLogStream.WriteLine("[{0}] {1}", + s_buildLogStream.WriteLine("[{0}] {1}", DateTime.Now.ToString(), logString.ToString()); - buildLogStream.Flush(); + s_buildLogStream.Flush(); } if (echoToConsole) @@ -245,11 +231,10 @@ private static void LogToFile(String logPrefix, namespace ProcessAsyncStreamSamples { - - class ProcessSampleMain + class ProcessSample { /// The main entry point for the application. - static void Main() + static void Run() { try { @@ -262,4 +247,4 @@ static void Main() } } } -} \ No newline at end of file +} diff --git a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.cs b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.cs index 4dcccfabce5..3ddaea0bef2 100644 --- a/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.cs +++ b/snippets/csharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.cs @@ -1,26 +1,18 @@ -// System.Diagnostics -// -// Requires .NET Framework version 1.2 or higher. - -// The following example uses the sort command to sort a list +// The following example uses the sort command to sort a list // of input text lines, and displays the sorted list to the console. // // Define the namespaces used by this sample. -using System; -using System.Text; -using System.IO; using System.Diagnostics; -using System.Threading; -using System.ComponentModel; +using System.Text; namespace ProcessAsyncStreamSamples { class SortOutputRedirection { // Define static variables shared by class methods. - private static StringBuilder sortOutput = null; - private static int numOutputLines = 0; + private static StringBuilder? s_sortOutput; + private static int s_numOutputLines = 0; public static void SortInputListText() { @@ -28,7 +20,7 @@ public static void SortInputListText() // The sort command is a console application that // reads and sorts text input. - Process sortProcess = new Process(); + Process sortProcess = new(); sortProcess.StartInfo.FileName = "Sort.exe"; // Set UseShellExecute to false for redirection. @@ -37,7 +29,7 @@ public static void SortInputListText() // Redirect the standard output of the sort command. // This stream is read asynchronously using an event handler. sortProcess.StartInfo.RedirectStandardOutput = true; - sortOutput = new StringBuilder(); + s_sortOutput = new StringBuilder(); // Set our event handler to asynchronously read the sort output. sortProcess.OutputDataReceived += SortOutputHandler; @@ -55,24 +47,24 @@ public static void SortInputListText() // Start the asynchronous read of the sort output stream. sortProcess.BeginOutputReadLine(); - // Prompt the user for input text lines. Write each + // Prompt the user for input text lines. Write each // line to the redirected input stream of the sort command. Console.WriteLine("Ready to sort up to 50 lines of text"); - String inputText; + string? inputText; int numInputLines = 0; do { Console.WriteLine("Enter a text line (or press the Enter key to stop):"); inputText = Console.ReadLine(); - if (!String.IsNullOrEmpty(inputText)) + if (!string.IsNullOrEmpty(inputText)) { numInputLines++; sortStreamWriter.WriteLine(inputText); } } - while (!String.IsNullOrEmpty(inputText) && (numInputLines < 50)); + while (!string.IsNullOrEmpty(inputText) && (numInputLines < 50)); Console.WriteLine(""); Console.WriteLine(); @@ -82,12 +74,12 @@ public static void SortInputListText() // Wait for the sort process to write the sorted text lines. sortProcess.WaitForExit(); - if (numOutputLines > 0) + if (s_numOutputLines > 0) { // Write the formatted and sorted output to the console. - Console.WriteLine($" Sort results = {numOutputLines} sorted text line(s) "); + Console.WriteLine($" Sort results = {s_numOutputLines} sorted text line(s) "); Console.WriteLine("----------"); - Console.WriteLine(sortOutput); + Console.WriteLine(s_sortOutput); } else { @@ -101,13 +93,12 @@ private static void SortOutputHandler(object sendingProcess, DataReceivedEventArgs outLine) { // Collect the sort command output. - if (!String.IsNullOrEmpty(outLine.Data)) + if (!string.IsNullOrEmpty(outLine.Data)) { - numOutputLines++; + s_numOutputLines++; // Add the text to the collected output. - sortOutput.Append(Environment.NewLine + - $"[{numOutputLines}] - {outLine.Data}"); + s_sortOutput.Append($"{Environment.NewLine}[{s_numOutputLines}] - {outLine.Data}"); } } } @@ -115,11 +106,9 @@ private static void SortOutputHandler(object sendingProcess, namespace ProcessAsyncStreamSamples { - - class ProcessSampleMain + class ProcessSortSample { - /// The main entry point for the application. - static void Main() + static void Run() { try { diff --git a/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture.cs b/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture.cs index 4721999ba5f..5b64bf6a60a 100644 --- a/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture.cs +++ b/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture.cs @@ -6,14 +6,12 @@ public class SamplesCultureInfo { - public static void Main() { - // Prints the header. Console.WriteLine("CULTURE SPECIFIC CULTURE"); - // Determines the specific culture associated with each culture in the .NET Framework. + // Determines the specific culture associated with each culture in .NET. foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures)) { Console.Write("{0,-12} {1,-40}", ci.Name, ci.EnglishName); diff --git a/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.cs b/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.cs index 88cda77e489..7a310638a58 100644 --- a/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.cs +++ b/snippets/csharp/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.cs @@ -11,13 +11,13 @@ public static void Main() // Display the header. Console.WriteLine("{0,-53}{1}", "CULTURE", "SPECIFIC CULTURE"); - // Get each neutral culture in the .NET Framework. + // Get each neutral culture in .NET. CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.NeutralCultures); // Sort the returned array by name. Array.Sort(cultures, new NamePropertyComparer()); // Determine the specific culture associated with each neutral culture. - foreach (var culture in cultures) + foreach (CultureInfo culture in cultures) { Console.Write("{0,-12} {1,-40}", culture.Name, culture.EnglishName); try { @@ -45,7 +45,9 @@ public int Compare(T x, T y) return String.Compare((string) pX.GetValue(x, null), (string) pY.GetValue(y, null)); } } -// The example displays the following output on a Windows system. This output has been cropped for brevity. + +// The example displays the following output on a Windows system. This output has been cropped for brevity. +// // CULTURE SPECIFIC CULTURE // Invariant Language (Invariant Country) // aa Afar aa-ET diff --git a/snippets/csharp/System.Globalization/PersianCalendar/Overview/Program.cs b/snippets/csharp/System.Globalization/PersianCalendar/Overview/Program.cs new file mode 100644 index 00000000000..5a31894d3c4 --- /dev/null +++ b/snippets/csharp/System.Globalization/PersianCalendar/Overview/Program.cs @@ -0,0 +1 @@ +Example.Main(); diff --git a/snippets/csharp/System.Globalization/PersianCalendar/Overview/Project.csproj b/snippets/csharp/System.Globalization/PersianCalendar/Overview/Project.csproj index a369cfa8a80..ffb97e9872d 100644 --- a/snippets/csharp/System.Globalization/PersianCalendar/Overview/Project.csproj +++ b/snippets/csharp/System.Globalization/PersianCalendar/Overview/Project.csproj @@ -1,7 +1,7 @@ - Library + Exe net10.0 diff --git a/snippets/csharp/System.Globalization/PersianCalendar/Overview/calendar2.cs b/snippets/csharp/System.Globalization/PersianCalendar/Overview/calendar2.cs index 9e52133b85c..10bdf65b90d 100644 --- a/snippets/csharp/System.Globalization/PersianCalendar/Overview/calendar2.cs +++ b/snippets/csharp/System.Globalization/PersianCalendar/Overview/calendar2.cs @@ -4,9 +4,9 @@ public class Example { - public static void Main() - { - PersianCalendar pc = new PersianCalendar(); + public static void Main() + { + PersianCalendar pc = new(); DateTime thisDate = DateTime.Now; // Display the current date using the Gregorian and Persian calendars. @@ -68,38 +68,24 @@ public static void Main() pc.GetHour(pc.MinSupportedDateTime), pc.GetMinute(pc.MaxSupportedDateTime), pc.GetSecond(pc.MaxSupportedDateTime)); - } + } } -// The example displays the following output when run under the .NET Framework 4.6: -// Today in the Gregorian Calendar: Monday, 2/4/2013 9:11:36 AM -// Today in the Persian Calendar: Monday, 11/16/1391 9:11:36 -// -// Gregorian Calendar: Tuesday, May 28, 2013 -// Persian Calendar: Tuesday, 3/7/1392 10:35:0 -// -// Gregorian Calendar: Tuesday, July 12, 2016 -// Persian Calendar: Tuesday, 4/22/1395 12:30:0 -// -// Minimum Persian Calendar date (Gregorian Calendar): Friday, March 22, 0622 -// Minimum Persian Calendar date (Persian Calendar): Friday, 1/1/1 0:0:0 -// -// Maximum Persian Calendar date (Gregorian Calendar): Friday, December 31, 9999 -// Maximum Persian Calendar date (Persian Calendar): Friday, 10/13/9378 0:59:59 -// -// The example displays the following output when run under versions of -// the .NET Framework before the .NET Framework 4.6: -// Today in the Gregorian Calendar: Monday, 2/4/2013 9:11:36 AM -// Today in the Persian Calendar: Monday, 11/16/1391 9:11:36 + +// The example displays output similar to the following: + +// Today in the Gregorian Calendar: Thursday, 7/30/2026 4:19:25 PM +// Today in the Persian Calendar: Thursday, 5/8/1405 16:19:25 // -// Gregorian Calendar: Tuesday, May 28, 2013 -// Persian Calendar: Tuesday, 3/7/1392 10:35:0 +// Gregorian Calendar: Tuesday, May 28, 2013 +// Persian Calendar: Tuesday, 3/7/1392 10:35:0 // -// Gregorian Calendar: Tuesday, July 12, 2016 -// Persian Calendar: Tuesday, 4/22/1395 12:30:0 +// Gregorian Calendar: Tuesday, July 12, 2016 +// Persian Calendar: Tuesday, 4/22/1395 12:30:0 // -// Minimum Persian Calendar date (Gregorian Calendar): Thursday, March 21, 0622 -// Minimum Persian Calendar date (Persian Calendar): Thursday, 1/1/1 0:0:0 +// Minimum Persian Calendar date (Gregorian Calendar): Friday, March 22, 0622 +// Minimum Persian Calendar date (Persian Calendar): Friday, 1/1/1 0:0:0 // -// Maximum Persian Calendar date (Gregorian Calendar): Friday, December 31, 9999 -// Maximum Persian Calendar date (Persian Calendar): Friday, 10/10/9378 0:59:59 +// Maximum Persian Calendar date (Gregorian Calendar): Friday, December 31, 9999 +// Maximum Persian Calendar date (Persian Calendar): Friday, 10/13/9378 0:59:59 + // diff --git a/snippets/csharp/System.Globalization/PersianCalendar/Overview/pcal.cs b/snippets/csharp/System.Globalization/PersianCalendar/Overview/pcal.cs index 86d696bdd60..c7633db1d4a 100644 --- a/snippets/csharp/System.Globalization/PersianCalendar/Overview/pcal.cs +++ b/snippets/csharp/System.Globalization/PersianCalendar/Overview/pcal.cs @@ -6,62 +6,62 @@ class Sample { public static void Main() { - PersianCalendar jc = new PersianCalendar(); - DateTime thisDate = DateTime.Now; + PersianCalendar jc = new(); + DateTime thisDate = DateTime.Now; - //-------------------------------------------------------------------------------- - // Properties - //-------------------------------------------------------------------------------- - Console.WriteLine("\n........... Selected Properties .....................\n"); - Console.Write("Eras:"); - foreach (int era in jc.Eras) - { - Console.WriteLine(" era = {0}", era); - } - //-------------------------------------------------------------------------------- - Console.WriteLine("\nTwoDigitYearMax = {0}", jc.TwoDigitYearMax); - //-------------------------------------------------------------------------------- - // Methods - //-------------------------------------------------------------------------------- - Console.WriteLine("\n............ Selected Methods .......................\n"); + //-------------------------------------------------------------------------------- + // Properties + //-------------------------------------------------------------------------------- + Console.WriteLine("\n........... Selected Properties .....................\n"); + Console.Write("Eras:"); + foreach (int era in jc.Eras) + { + Console.WriteLine(" era = {0}", era); + } + //-------------------------------------------------------------------------------- + Console.WriteLine("\nTwoDigitYearMax = {0}", jc.TwoDigitYearMax); + //-------------------------------------------------------------------------------- + // Methods + //-------------------------------------------------------------------------------- + Console.WriteLine("\n............ Selected Methods .......................\n"); - //-------------------------------------------------------------------------------- - Console.WriteLine("GetDayOfYear: day = {0}", jc.GetDayOfYear(thisDate)); - //-------------------------------------------------------------------------------- - Console.WriteLine("GetDaysInMonth: days = {0}", - jc.GetDaysInMonth( thisDate.Year, thisDate.Month, - PersianCalendar.PersianEra)); - //-------------------------------------------------------------------------------- - Console.WriteLine("GetDaysInYear: days = {0}", - jc.GetDaysInYear(thisDate.Year, PersianCalendar.PersianEra)); - //-------------------------------------------------------------------------------- - Console.WriteLine("GetLeapMonth: leap month (if any) = {0}", - jc.GetLeapMonth(thisDate.Year, PersianCalendar.PersianEra)); - //------------------------------------------------------------- - Console.WriteLine("GetMonthsInYear: months in a year = {0}", - jc.GetMonthsInYear(thisDate.Year, PersianCalendar.PersianEra)); - //-------------------------------------------------------------------------------- - Console.WriteLine("IsLeapDay: This is a leap day = {0}", - jc.IsLeapDay(thisDate.Year, thisDate.Month, thisDate.Day, - PersianCalendar.PersianEra)); - //-------------------------------------------------------------------------------- - Console.WriteLine("IsLeapMonth: This is a leap month = {0}", - jc.IsLeapMonth(thisDate.Year, thisDate.Month, - PersianCalendar.PersianEra)); - //-------------------------------------------------------------------------------- - Console.WriteLine("IsLeapYear: 1370 is a leap year = {0}", - jc.IsLeapYear(1370, PersianCalendar.PersianEra)); - //-------------------------------------------------------------------------------- + //-------------------------------------------------------------------------------- + Console.WriteLine("GetDayOfYear: day = {0}", jc.GetDayOfYear(thisDate)); + //-------------------------------------------------------------------------------- + Console.WriteLine("GetDaysInMonth: days = {0}", + jc.GetDaysInMonth(thisDate.Year, thisDate.Month, + PersianCalendar.PersianEra)); + //-------------------------------------------------------------------------------- + Console.WriteLine("GetDaysInYear: days = {0}", + jc.GetDaysInYear(thisDate.Year, PersianCalendar.PersianEra)); + //-------------------------------------------------------------------------------- + Console.WriteLine("GetLeapMonth: leap month (if any) = {0}", + jc.GetLeapMonth(thisDate.Year, PersianCalendar.PersianEra)); + //------------------------------------------------------------- + Console.WriteLine("GetMonthsInYear: months in a year = {0}", + jc.GetMonthsInYear(thisDate.Year, PersianCalendar.PersianEra)); + //-------------------------------------------------------------------------------- + Console.WriteLine("IsLeapDay: This is a leap day = {0}", + jc.IsLeapDay(thisDate.Year, thisDate.Month, thisDate.Day, + PersianCalendar.PersianEra)); + //-------------------------------------------------------------------------------- + Console.WriteLine("IsLeapMonth: This is a leap month = {0}", + jc.IsLeapMonth(thisDate.Year, thisDate.Month, + PersianCalendar.PersianEra)); + //-------------------------------------------------------------------------------- + Console.WriteLine("IsLeapYear: 1370 is a leap year = {0}", + jc.IsLeapYear(1370, PersianCalendar.PersianEra)); + //-------------------------------------------------------------------------------- - // Get the 4-digit year for a year whose last two digits are 99. The 4-digit year - // depends on the current value of the TwoDigitYearMax property. + // Get the 4-digit year for a year whose last two digits are 99. The 4-digit year + // depends on the current value of the TwoDigitYearMax property. - Console.WriteLine("ToFourDigitYear:"); - Console.WriteLine(" If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", - jc.TwoDigitYearMax, jc.ToFourDigitYear(99)); - jc.TwoDigitYearMax = thisDate.Year; - Console.WriteLine(" If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", - jc.TwoDigitYearMax, jc.ToFourDigitYear(99)); + Console.WriteLine("ToFourDigitYear:"); + Console.WriteLine(" If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", + jc.TwoDigitYearMax, jc.ToFourDigitYear(99)); + jc.TwoDigitYearMax = thisDate.Year; + Console.WriteLine(" If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", + jc.TwoDigitYearMax, jc.ToFourDigitYear(99)); } } // The example displays the following output: @@ -88,40 +88,40 @@ public static void Main() public class CalendarConversion { - public void ConvertToday() - { - // - // Instantiate a PersianCalendar object - PersianCalendar pc = new PersianCalendar(); + public void ConvertToday() + { + // + // Instantiate a PersianCalendar object + PersianCalendar pc = new PersianCalendar(); - // Define a Gregorian date of 3/21/2007 12:47:15 - DateTime gregorianDate = new DateTime(2007, 3, 21, 00, 47, 15); - Console.WriteLine("The Gregorian calendar date is {0:G}", gregorianDate); - // Convert the Gregorian date to its equivalent date in the Persian calendar - Console.WriteLine("The Persian calendar date is {0}/{1}/{2} {3}:{4}:{5}.", - pc.GetMonth(gregorianDate), - pc.GetDayOfMonth(gregorianDate), - pc.GetYear(gregorianDate), - pc.GetHour(gregorianDate), - pc.GetMinute(gregorianDate), - pc.GetSecond(gregorianDate)); - // Convert the Persian calendar date back to the Gregorian calendar date - DateTime fromPersianDate = pc.ToDateTime( - pc.GetYear(gregorianDate), - pc.GetMonth(gregorianDate), - pc.GetDayOfMonth(gregorianDate), - pc.GetHour(gregorianDate), - pc.GetMinute(gregorianDate), - pc.GetSecond(gregorianDate), - (int) pc.GetMilliseconds(gregorianDate), - PersianCalendar.PersianEra); - Console.WriteLine("The converted Gregorian calendar date is {0:G}", fromPersianDate); + // Define a Gregorian date of 3/21/2007 12:47:15 + DateTime gregorianDate = new DateTime(2007, 3, 21, 00, 47, 15); + Console.WriteLine("The Gregorian calendar date is {0:G}", gregorianDate); + // Convert the Gregorian date to its equivalent date in the Persian calendar + Console.WriteLine("The Persian calendar date is {0}/{1}/{2} {3}:{4}:{5}.", + pc.GetMonth(gregorianDate), + pc.GetDayOfMonth(gregorianDate), + pc.GetYear(gregorianDate), + pc.GetHour(gregorianDate), + pc.GetMinute(gregorianDate), + pc.GetSecond(gregorianDate)); + // Convert the Persian calendar date back to the Gregorian calendar date + DateTime fromPersianDate = pc.ToDateTime( + pc.GetYear(gregorianDate), + pc.GetMonth(gregorianDate), + pc.GetDayOfMonth(gregorianDate), + pc.GetHour(gregorianDate), + pc.GetMinute(gregorianDate), + pc.GetSecond(gregorianDate), + (int)pc.GetMilliseconds(gregorianDate), + PersianCalendar.PersianEra); + Console.WriteLine("The converted Gregorian calendar date is {0:G}", fromPersianDate); - // The code displays the following output to the console: - // - // The Gregorian calendar date is 3/21/2007 12:47:15 AM - // The Persian calendar date is 1/1/1386 0:47:15. - // The converted Gregorian calendar date is 3/21/2007 12:47:15 AM - // - } + // The code displays the following output to the console: + // + // The Gregorian calendar date is 3/21/2007 12:47:15 AM + // The Persian calendar date is 1/1/1386 0:47:15. + // The converted Gregorian calendar date is 3/21/2007 12:47:15 AM + // + } } diff --git a/snippets/csharp/System.Globalization/TextInfo/Clone/ro.cs b/snippets/csharp/System.Globalization/TextInfo/Clone/ro.cs index e5509602279..8c6860d2563 100644 --- a/snippets/csharp/System.Globalization/TextInfo/Clone/ro.cs +++ b/snippets/csharp/System.Globalization/TextInfo/Clone/ro.cs @@ -10,8 +10,8 @@ class Sample public static void Main() { // Get the TextInfo of a predefined culture that ships with -// the .NET Framework. - CultureInfo ci = new CultureInfo("en-US"); +// .NET. + CultureInfo ci = new("en-US"); TextInfo ti1 = ci.TextInfo; // Display whether the TextInfo is read-only or not. @@ -81,4 +81,4 @@ private static void DisplayReadOnly(string caption, TextInfo ti) 3d) The set operation is invalid. */ -// \ No newline at end of file +// diff --git a/snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.cs b/snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.cs index 28d80d887f4..3aef87407c3 100644 --- a/snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.cs +++ b/snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.cs @@ -1,20 +1,16 @@ // using System; -using System.Collections.Generic; using System.Runtime.InteropServices; internal class Win32 { // The SHAutoComplete function allows you // to add auto-compete functionality to your - // Windows Forms text boxes. In .NET Framework - // 1.1 and earlier, you can use SHAutoComplete. - // Later versions have this ability built in without - // requiring platform invoke. + // Windows Forms text boxes. - // See the MSDN documentation of the - // SHAutoComplete function for the - // complete set of flags. + // For the complete set of flags, + // see the documentation of the + // SHAutoComplete function. public enum SHAutoCompleteFlags { SHACF_DEFAULT = 0x00000000, @@ -70,4 +66,4 @@ static void Run() Console.WriteLine("HRESULT handled: " + HRESULT.ToString()); } } -// \ No newline at end of file +// diff --git a/snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.cs b/snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.cs index 6ea04ec8df4..65bc5dca308 100644 --- a/snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.cs +++ b/snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.cs @@ -5,7 +5,7 @@ namespace SomeNamespace { // Force the layout of your fields to the C style struct layout. - // Without this, the .NET Framework will reorder your fields. + // Without this, .NET will reorder your fields. [StructLayout(LayoutKind.Sequential)] public struct Vertex { @@ -41,4 +41,4 @@ public static void Main() AClass.SomeMethod(); } } -// \ No newline at end of file +// diff --git a/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex5.cs b/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex5.cs index 0b4445405d1..31555c07714 100644 --- a/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex5.cs +++ b/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex5.cs @@ -3,7 +3,6 @@ unsafe struct ExampleStruct5 { - public byte b1; public byte b2; public int i3; @@ -27,19 +26,10 @@ public unsafe static void Main() } // The example displays the following output: // -// .NET 5+: // Size: 32 // b1 Offset: 0 // b2 Offset: 1 // i3 Offset: 4 // a4 Offset: 8 // d5 Offset: 16 -// -// .NET Framework: -// Size: 28 -// b1 Offset: 0 -// b2 Offset: 1 -// i3 Offset: 4 -// a4 Offset: 8 -// d5 Offset: 12 // diff --git a/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex7.cs b/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex7.cs index b6cc4a8ec9c..dd497438a50 100644 --- a/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex7.cs +++ b/snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/packex7.cs @@ -5,7 +5,6 @@ [StructLayout(LayoutKind.Sequential, Pack = 16)] unsafe struct ExampleStruct7 { - public byte b1; public byte b2; public int i3; @@ -29,19 +28,10 @@ public unsafe static void Main() } // The example displays the following output: // -// .NET 5+: // Size: 32 // b1 Offset: 0 // b2 Offset: 1 // i3 Offset: 4 // a4 Offset: 8 // d5 Offset: 16 -// -// .NET Framework: -// Size: 28 -// b1 Offset: 0 -// b2 Offset: 1 -// i3 Offset: 4 -// a4 Offset: 8 -// d5 Offset: 12 // diff --git a/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.cs b/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.cs index 2e203d8652a..eb31bc6fb26 100644 --- a/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.cs +++ b/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.cs @@ -3,51 +3,57 @@ public class Example { - public static void Main() - { - TestForEquality(); - TestForInequality(); - } - - private static void TestForEquality() - { - // - FrameworkName supportedVer1 = new FrameworkName(".NET Framework, Version=4.0"); - FrameworkName actualVersion = new FrameworkName(String.Format( - ".NET Framework, Version={0}", - Environment.Version.ToString())); - - Console.WriteLine("Supported Version: {0}", supportedVer1); - Console.WriteLine("Actual Version: {0}", actualVersion); - if (supportedVer1 == actualVersion) - Console.WriteLine("The supported and actual Framework versions are the same."); - else - Console.WriteLine("The supported and actual Framework versions are different."); - - Console.WriteLine(); - // The example displays the following output: - // The supported and actual Framework versions are different. - // - } - - private static void TestForInequality() - { - // - FrameworkName supportedVer1 = new FrameworkName(".NET Framework, Version=4.0"); - FrameworkName actualVersion = new FrameworkName(String.Format( - ".NET Framework, Version={0}", - Environment.Version.ToString())); - - Console.WriteLine("Supported Version: {0}", supportedVer1); - Console.WriteLine("Actual Version: {0}", actualVersion); - if (supportedVer1 != actualVersion) - Console.WriteLine("The supported and actual Framework versions are different."); - else - Console.WriteLine("The supported and actual Framework versions are the same."); - - Console.WriteLine(); - // The example displays the following output: - // The supported and actual Framework versions are different. - // - } + public static void Main() + { + TestForEquality(); + TestForInequality(); + } + + private static void TestForEquality() + { + // + FrameworkName version = new(".NET, Version=10.0"); + FrameworkName actualVersion = new($".NET, Version={Environment.Version}"); + + Console.WriteLine($"Given Version: {version}"); + Console.WriteLine($"Actual Version: {actualVersion}"); + if (version == actualVersion) + Console.WriteLine("The versions are the same."); + else + Console.WriteLine("The versions are different."); + + Console.WriteLine(); + + // The example displays output similar to the following: + + // Given Version: .NET,Version=v10.0 + // Actual Version: .NET,Version=v10.0.10 + // The versions are different. + + // + } + + private static void TestForInequality() + { + // + FrameworkName version = new(".NET, Version=10.0"); + FrameworkName actualVersion = new($".NET, Version={Environment.Version}"); + + Console.WriteLine($"Given Version: {version}"); + Console.WriteLine($"Actual Version: {actualVersion}"); + if (version != actualVersion) + Console.WriteLine("The versions are different."); + else + Console.WriteLine("The versions are the same."); + + Console.WriteLine(); + + // The example displays output similar to the following: + + // Given Version: .NET,Version=v10.0 + // Actual Version: .NET,Version=v10.0.10 + // The versions are different. + + // + } } diff --git a/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Project.csproj b/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Project.csproj index a369cfa8a80..ffb97e9872d 100644 --- a/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Project.csproj +++ b/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Project.csproj @@ -1,7 +1,7 @@ - Library + Exe net10.0 diff --git a/snippets/csharp/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.cs b/snippets/csharp/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.cs index f6e9bd05732..61525081bba 100644 --- a/snippets/csharp/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.cs +++ b/snippets/csharp/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.cs @@ -156,8 +156,7 @@ protected override void OnStart(string[] args) // Stop this service. protected override void OnStop() { - // New in .NET Framework version 2.0. - this.RequestAdditionalTime(4000); + RequestAdditionalTime(4000); // Signal the worker thread to exit. if ((workerThread != null) && (workerThread.IsAlive)) { diff --git a/snippets/csharp/System.Text/EncodingInfo/Overview/encodinginfo.cs b/snippets/csharp/System.Text/EncodingInfo/Overview/encodinginfo.cs index c14e5789bd1..e0a0cbc2399 100644 --- a/snippets/csharp/System.Text/EncodingInfo/Overview/encodinginfo.cs +++ b/snippets/csharp/System.Text/EncodingInfo/Overview/encodinginfo.cs @@ -41,162 +41,19 @@ public static void Main() { } } } -/* -The example produces the following output when run on .NET Core: -Info.CodePage Info.Name Info.DisplayName -1200 utf-16 Unicode -1201 utf-16BE Unicode (Big-Endian) -12000 utf-32 Unicode (UTF-32) -12001 utf-32BE Unicode (UTF-32 Big-Endian) -20127 us-ascii US-ASCII -28591 iso-8859-1 Western European (ISO) -65000 utf-7 Unicode (UTF-7) -65001 utf-8 Unicode (UTF-8) - -The example produces the following output when run on .NET Framework: +/* +The example produces the following output: Info.CodePage Info.Name Info.DisplayName -37 IBM037 IBM EBCDIC (US-Canada) -437 IBM437 OEM United States -500 IBM500 IBM EBCDIC (International) -708 ASMO-708 Arabic (ASMO 708) -720 DOS-720 Arabic (DOS) -737 ibm737 Greek (DOS) -775 ibm775 Baltic (DOS) -850 ibm850 Western European (DOS) -852 ibm852 Central European (DOS) -855 IBM855 OEM Cyrillic -857 ibm857 Turkish (DOS) -858 IBM00858 OEM Multilingual Latin I -860 IBM860 Portuguese (DOS) -861 ibm861 Icelandic (DOS) -862 DOS-862 Hebrew (DOS) -863 IBM863 French Canadian (DOS) -864 IBM864 Arabic (864) -865 IBM865 Nordic (DOS) -866 cp866 Cyrillic (DOS) -869 ibm869 Greek, Modern (DOS) -870 IBM870 IBM EBCDIC (Multilingual Latin-2) -874 windows-874 Thai (Windows) -875 cp875 IBM EBCDIC (Greek Modern) -932 shift_jis Japanese (Shift-JIS) -936 gb2312 Chinese Simplified (GB2312) -949 ks_c_5601-1987 Korean -950 big5 Chinese Traditional (Big5) -1026 IBM1026 IBM EBCDIC (Turkish Latin-5) -1047 IBM01047 IBM Latin-1 -1140 IBM01140 IBM EBCDIC (US-Canada-Euro) -1141 IBM01141 IBM EBCDIC (Germany-Euro) -1142 IBM01142 IBM EBCDIC (Denmark-Norway-Euro) -1143 IBM01143 IBM EBCDIC (Finland-Sweden-Euro) -1144 IBM01144 IBM EBCDIC (Italy-Euro) -1145 IBM01145 IBM EBCDIC (Spain-Euro) -1146 IBM01146 IBM EBCDIC (UK-Euro) -1147 IBM01147 IBM EBCDIC (France-Euro) -1148 IBM01148 IBM EBCDIC (International-Euro) -1149 IBM01149 IBM EBCDIC (Icelandic-Euro) -1200 utf-16 Unicode -1201 utf-16BE Unicode (Big-Endian) -1250 windows-1250 Central European (Windows) -1251 windows-1251 Cyrillic (Windows) -1252 Windows-1252 Western European (Windows) -1253 windows-1253 Greek (Windows) -1254 windows-1254 Turkish (Windows) -1255 windows-1255 Hebrew (Windows) -1256 windows-1256 Arabic (Windows) -1257 windows-1257 Baltic (Windows) -1258 windows-1258 Vietnamese (Windows) -1361 Johab Korean (Johab) -10000 macintosh Western European (Mac) -10001 x-mac-japanese Japanese (Mac) -10002 x-mac-chinesetrad Chinese Traditional (Mac) -10003 x-mac-korean Korean (Mac) -10004 x-mac-arabic Arabic (Mac) -10005 x-mac-hebrew Hebrew (Mac) -10006 x-mac-greek Greek (Mac) -10007 x-mac-cyrillic Cyrillic (Mac) -10008 x-mac-chinesesimp Chinese Simplified (Mac) -10010 x-mac-romanian Romanian (Mac) -10017 x-mac-ukrainian Ukrainian (Mac) -10021 x-mac-thai Thai (Mac) -10029 x-mac-ce Central European (Mac) -10079 x-mac-icelandic Icelandic (Mac) -10081 x-mac-turkish Turkish (Mac) -10082 x-mac-croatian Croatian (Mac) -12000 utf-32 Unicode (UTF-32) -12001 utf-32BE Unicode (UTF-32 Big-Endian) -20000 x-Chinese-CNS Chinese Traditional (CNS) -20001 x-cp20001 TCA Taiwan -20002 x-Chinese-Eten Chinese Traditional (Eten) -20003 x-cp20003 IBM5550 Taiwan -20004 x-cp20004 TeleText Taiwan -20005 x-cp20005 Wang Taiwan -20105 x-IA5 Western European (IA5) -20106 x-IA5-German German (IA5) -20107 x-IA5-Swedish Swedish (IA5) -20108 x-IA5-Norwegian Norwegian (IA5) -20127 us-ascii US-ASCII -20261 x-cp20261 T.61 -20269 x-cp20269 ISO-6937 -20273 IBM273 IBM EBCDIC (Germany) -20277 IBM277 IBM EBCDIC (Denmark-Norway) -20278 IBM278 IBM EBCDIC (Finland-Sweden) -20280 IBM280 IBM EBCDIC (Italy) -20284 IBM284 IBM EBCDIC (Spain) -20285 IBM285 IBM EBCDIC (UK) -20290 IBM290 IBM EBCDIC (Japanese katakana) -20297 IBM297 IBM EBCDIC (France) -20420 IBM420 IBM EBCDIC (Arabic) -20423 IBM423 IBM EBCDIC (Greek) -20424 IBM424 IBM EBCDIC (Hebrew) -20833 x-EBCDIC-KoreanExtended IBM EBCDIC (Korean Extended) -20838 IBM-Thai IBM EBCDIC (Thai) -20866 koi8-r Cyrillic (KOI8-R) -20871 IBM871 IBM EBCDIC (Icelandic) -20880 IBM880 IBM EBCDIC (Cyrillic Russian) -20905 IBM905 IBM EBCDIC (Turkish) -20924 IBM00924 IBM Latin-1 -20932 EUC-JP Japanese (JIS 0208-1990 and 0212-1990) -20936 x-cp20936 Chinese Simplified (GB2312-80) -20949 x-cp20949 Korean Wansung -21025 cp1025 IBM EBCDIC (Cyrillic Serbian-Bulgarian) -21866 koi8-u Cyrillic (KOI8-U) -28591 iso-8859-1 Western European (ISO) -28592 iso-8859-2 Central European (ISO) -28593 iso-8859-3 Latin 3 (ISO) -28594 iso-8859-4 Baltic (ISO) -28595 iso-8859-5 Cyrillic (ISO) -28596 iso-8859-6 Arabic (ISO) -28597 iso-8859-7 Greek (ISO) -28598 iso-8859-8 Hebrew (ISO-Visual) -28599 iso-8859-9 Turkish (ISO) -28603 iso-8859-13 Estonian (ISO) -28605 iso-8859-15 Latin 9 (ISO) -29001 x-Europa Europa -38598 iso-8859-8-i Hebrew (ISO-Logical) -50220 iso-2022-jp Japanese (JIS) -50221 csISO2022JP Japanese (JIS-Allow 1 byte Kana) -50222 iso-2022-jp Japanese (JIS-Allow 1 byte Kana - SO/SI) -50225 iso-2022-kr Korean (ISO) -50227 x-cp50227 Chinese Simplified (ISO-2022) -51932 euc-jp Japanese (EUC) -51936 EUC-CN Chinese Simplified (EUC) -51949 euc-kr Korean (EUC) -52936 hz-gb-2312 Chinese Simplified (HZ) -54936 GB18030 Chinese Simplified (GB18030) -57002 x-iscii-de ISCII Devanagari -57003 x-iscii-be ISCII Bengali -57004 x-iscii-ta ISCII Tamil -57005 x-iscii-te ISCII Telugu -57006 x-iscii-as ISCII Assamese -57007 x-iscii-or ISCII Oriya -57008 x-iscii-ka ISCII Kannada -57009 x-iscii-ma ISCII Malayalam -57010 x-iscii-gu ISCII Gujarati -57011 x-iscii-pa ISCII Punjabi -65000 utf-7 Unicode (UTF-7) -65001 utf-8 Unicode (UTF-8) +1200 utf-16 Unicode +1201 utf-16BE Unicode (Big-Endian) +12000 utf-32 Unicode (UTF-32) +12001 utf-32BE Unicode (UTF-32 Big-Endian) +20127 us-ascii US-ASCII +28591 iso-8859-1 Western European (ISO) +65000 utf-7 Unicode (UTF-7) +65001 utf-8 Unicode (UTF-8) */ // diff --git a/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs b/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs index 560ccd6d6bc..6fc1ab7fcb0 100644 --- a/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs +++ b/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs @@ -50,7 +50,7 @@ Ensure sb1 has a capacity of at least 50 characters. b1) sb1.Length = 3, sb1.Capacity = 50 b2) sb2.Length = 3, sb2.Capacity = 16 b3) sb1.ToString() = "abc", sb2.ToString() = "abc" -b4) sb1 equals sb2: True (False on .NET Framework) +b4) sb1 equals sb2: True Set the length of sb1 to zero. Set the capacity of sb2 to 51 characters. diff --git a/snippets/csharp/System.Threading/SpinWait/Overview/spinwait.cs b/snippets/csharp/System.Threading/SpinWait/Overview/spinwait.cs index 2ae8355e29b..b5fd297ff13 100644 --- a/snippets/csharp/System.Threading/SpinWait/Overview/spinwait.cs +++ b/snippets/csharp/System.Threading/SpinWait/Overview/spinwait.cs @@ -28,7 +28,7 @@ static void Main() sw.SpinOnce(); } - // As of .NET Framework 4: After some initial spinning, SpinWait.SpinOnce() will yield every time. + // After some initial spinning, SpinWait.SpinOnce() will yield every time. Console.WriteLine("SpinWait called {0} times, yielded {1} times", sw.Count, numYields); }); @@ -43,4 +43,4 @@ static void Main() Task.WaitAll(t1, t2); } } -// \ No newline at end of file +// diff --git a/snippets/csharp/System.Threading/ThreadStart/Overview/source.cs b/snippets/csharp/System.Threading/ThreadStart/Overview/source.cs index 1d65a4bda90..7d67938d882 100644 --- a/snippets/csharp/System.Threading/ThreadStart/Overview/source.cs +++ b/snippets/csharp/System.Threading/ThreadStart/Overview/source.cs @@ -4,51 +4,50 @@ class Test { - static void Main() + static void Main() { // To start a thread using a static thread procedure, use the // class name and method name when you create the ThreadStart - // delegate. Beginning in version 2.0 of the .NET Framework, - // it is not necessary to create a delegate explicitly. - // Specify the name of the method in the Thread constructor, + // delegate. It's not necessary to create a delegate explicitly. + // Specify the name of the method in the Thread constructor, // and the compiler selects the correct delegate. For example: // // Thread newThread = new Thread(Work.DoWork); // - ThreadStart threadDelegate = new ThreadStart(Work.DoWork); - Thread newThread = new Thread(threadDelegate); + ThreadStart threadDelegate = new(Work.DoWork); + Thread newThread = new(threadDelegate); newThread.Start(); - // To start a thread using an instance method for the thread - // procedure, use the instance variable and method name when - // you create the ThreadStart delegate. Beginning in version - // 2.0 of the .NET Framework, the explicit delegate is not - // required. - // - Work w = new Work(); - w.Data = 42; + // To start a thread using an instance method for the thread + // procedure, use the instance variable and method name when + // you create the ThreadStart delegate. + Work w = new() + { + Data = 42 + }; threadDelegate = new ThreadStart(w.DoMoreWork); newThread = new Thread(threadDelegate); newThread.Start(); } } -class Work +class Work { - public static void DoWork() + public static void DoWork() { - Console.WriteLine("Static thread procedure."); + Console.WriteLine("Static thread procedure."); } public int Data; - public void DoMoreWork() + public void DoMoreWork() { - Console.WriteLine("Instance thread procedure. Data={0}", Data); + Console.WriteLine("Instance thread procedure. Data={0}", Data); } } -/* This code example produces the following output (the order +/* This code example produces the following output (the order of the lines might vary): Static thread procedure. Instance thread procedure. Data=42 */ -// \ No newline at end of file + +// diff --git a/snippets/csharp/System.Windows/Application/Overview/CSharp.csproj b/snippets/csharp/System.Windows/Application/Overview/CSharp.csproj index 5849c290b5b..d938b08ed22 100644 --- a/snippets/csharp/System.Windows/Application/Overview/CSharp.csproj +++ b/snippets/csharp/System.Windows/Application/Overview/CSharp.csproj @@ -1,107 +1,11 @@ - + - Debug - AnyCPU - {D4982CD9-4444-4BB5-B4AC-2D9AB41B87DA} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WinExe + net10.0-windows SDKSample CSharp - 4 - winexe - - v4.8 - http://localhost/CSharp/ - true - Web - true - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - true - false - false - - 10.0.20821 + true + enable + SDKSample.App - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - - - false - true - .\bin\Release\ - TRACE - - - - - - - - - - - 4.0 - - - - - - - - - - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - - - - - - - - MSBuild:Compile - Designer - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - - \ No newline at end of file + diff --git a/snippets/csharp/System.Windows/Application/Overview/Properties/AssemblyInfo.cs b/snippets/csharp/System.Windows/Application/Overview/Properties/AssemblyInfo.cs index a5bef1700cd..1a1d3e0a97a 100644 --- a/snippets/csharp/System.Windows/Application/Overview/Properties/AssemblyInfo.cs +++ b/snippets/csharp/System.Windows/Application/Overview/Properties/AssemblyInfo.cs @@ -12,17 +12,9 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("CSharp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CSharp")] -[assembly: AssemblyCopyright("Copyright @ Microsoft 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -//In order to begin building localizable applications, set +//To begin building localizable applications, set //CultureYouAreCodingWith in your .csproj file //inside a . For example, if you are using US english //in your source files, set the to en-US. Then uncomment @@ -49,4 +41,4 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] +// [assembly: AssemblyVersion("1.0.0.0")] diff --git a/snippets/csharp/System/Console/Overview/example3.cs b/snippets/csharp/System/Console/Overview/example3.cs index 852dbee4cc5..05e7487ae35 100644 --- a/snippets/csharp/System/Console/Overview/example3.cs +++ b/snippets/csharp/System/Console/Overview/example3.cs @@ -42,8 +42,8 @@ private static void Main(string[] args) return; } - if (setOutputEncodingToUnicode) { - // This won't work before .NET Framework 4.5. + if (setOutputEncodingToUnicode) + { try { // Set encoding using endianness of this system. // We're interested in displaying individual Char objects, so diff --git a/snippets/csharp/System/Convert/ToBoolean/system.convert snippet.cs b/snippets/csharp/System/Convert/ToBoolean/system.convert snippet.cs index 588a0840725..343d3880bc4 100644 --- a/snippets/csharp/System/Convert/ToBoolean/system.convert snippet.cs +++ b/snippets/csharp/System/Convert/ToBoolean/system.convert snippet.cs @@ -5,7 +5,7 @@ namespace BasicSnippetC { class ConvertSnippet { static void Main(string[] args) { - + ConvertSnippet snippet = new ConvertSnippet(); double doubleVal; @@ -68,7 +68,7 @@ public void ConvertBytes(byte byteVal) { ConvertByteDecimal(byteVal); ConvertByteSingle(byteVal); } - + // public void ConvertDoubleBool(double doubleVal) { bool boolVal; @@ -108,7 +108,7 @@ public void ConvertDoubleByte(double doubleVal) { // public void ConvertDoubleInt(double doubleVal) { - + int intVal = 0; // Double to int conversion can overflow. try { @@ -127,12 +127,12 @@ public void ConvertDoubleInt(double doubleVal) { intVal, doubleVal); } // - + // public void ConvertDoubleDecimal(decimal decimalVal){ - + double doubleVal; - + // Decimal to double conversion cannot overflow. doubleVal = System.Convert.ToDouble(decimalVal); System.Console.WriteLine("{0} as a double is: {1}", @@ -153,7 +153,7 @@ public void ConvertDoubleDecimal(decimal decimalVal){ // // - public void CovertDoubleFloat(double doubleVal) { + public void CovertDoubleFloat(double doubleVal) { float floatVal = 0; // Double to float conversion cannot overflow. @@ -167,10 +167,10 @@ public void CovertDoubleFloat(double doubleVal) { floatVal, doubleVal); } // - + // public void ConvertDoubleString(double doubleVal) { - + string stringVal; // A conversion from Double to string cannot overflow. @@ -212,7 +212,7 @@ public void ConvertLongChar(long longVal) { System.Console.WriteLine( "Overflow in long-to-char conversion."); } - + // A conversion from Char to long cannot overflow. longVal = System.Convert.ToInt64(charVal); System.Console.WriteLine("{0} as an Int64 is {1}", @@ -235,7 +235,7 @@ public void ConvertLongByte(long longVal) { System.Console.WriteLine( "Overflow in long-to-byte conversion."); } - + // A conversion from Byte to long cannot overflow. longVal = System.Convert.ToInt64(byteVal); System.Console.WriteLine("{0} as an Int64 is {1}", @@ -247,7 +247,7 @@ public void ConvertLongByte(long longVal) { public void ConvertLongDecimal(long longVal) { decimal decimalVal; - + // Long to decimal conversion cannot overflow. decimalVal = System.Convert.ToDecimal(longVal); System.Console.WriteLine("{0} as a decimal is {1}", @@ -270,12 +270,12 @@ public void ConvertLongDecimal(long longVal) { public void ConvertLongFloat(long longVal) { float floatVal; - + // A conversion from Long to float cannot overflow. floatVal = System.Convert.ToSingle(longVal); System.Console.WriteLine("{0} as a float is {1}", longVal, floatVal); - + // A conversion from float to long can overflow. try { longVal = System.Convert.ToInt64(floatVal); @@ -291,7 +291,7 @@ public void ConvertLongFloat(long longVal) { // public void ConvertStringBoolean(string stringVal) { - + bool boolVal = false; try { @@ -321,7 +321,7 @@ public void ConvertStringBoolean(string stringVal) { // public void ConvertStringByte(string stringVal) { byte byteVal = 0; - + try { byteVal = System.Convert.ToByte(stringVal); System.Console.WriteLine("{0} as a byte is: {1}", @@ -346,7 +346,7 @@ public void ConvertStringByte(string stringVal) { byteVal, stringVal); } // - + // public void ConvertStringChar(string stringVal) { char charVal = 'a'; @@ -371,11 +371,11 @@ public void ConvertStringChar(string stringVal) { stringVal); } // - + // public void ConvertStringDecimal(string stringVal) { decimal decimalVal = 0; - + try { decimalVal = System.Convert.ToDecimal(stringVal); System.Console.WriteLine( @@ -398,13 +398,13 @@ public void ConvertStringDecimal(string stringVal) { stringVal = System.Convert.ToString(decimalVal); System.Console.WriteLine( "The decimal as a string is {0}.", stringVal); - } + } // // public void ConvertStringFloat(string stringVal) { float floatVal = 0; - + try { floatVal = System.Convert.ToSingle(stringVal); System.Console.WriteLine( @@ -433,7 +433,7 @@ public void ConvertStringFloat(string stringVal) { // public void ConvertCharDecimal(char charVal) { Decimal decimalVal = 0; - + // Char to decimal conversion is not supported and will always // throw an InvalidCastException. try { @@ -441,8 +441,7 @@ public void ConvertCharDecimal(char charVal) { } catch (System.InvalidCastException) { System.Console.WriteLine( - "Char-to-Decimal conversion is not supported " + - "by the .NET Framework."); + "Char-to-Decimal conversion is not supported by .NET."); } //Decimal to char conversion is also not supported. @@ -451,8 +450,7 @@ public void ConvertCharDecimal(char charVal) { } catch (System.InvalidCastException) { System.Console.WriteLine( - "Decimal-to-Char conversion is not supported " + - "by the .NET Framework."); + "Decimal-to-Char conversion is not supported by .NET."); } } // @@ -513,7 +511,7 @@ public void ConvertBoolean() { DateTime dateTime = new DateTime(year, month, day, hour, minute, second, millisecond); - + bool boolVal; // System.InvalidCastException is always thrown. @@ -522,7 +520,7 @@ public void ConvertBoolean() { } catch (System.InvalidCastException) { System.Console.WriteLine("Conversion from DateTime to " + - "Boolean is not supported by the .NET Framework."); + "Boolean is not supported by .NET."); } } // diff --git a/snippets/csharp/System/Single/Overview/Program.cs b/snippets/csharp/System/Single/Overview/Program.cs new file mode 100644 index 00000000000..5a31894d3c4 --- /dev/null +++ b/snippets/csharp/System/Single/Overview/Program.cs @@ -0,0 +1 @@ +Example.Main(); diff --git a/snippets/csharp/System/Single/Overview/Project.csproj b/snippets/csharp/System/Single/Overview/Project.csproj index 258b56c95b9..f99395b4b2b 100644 --- a/snippets/csharp/System/Single/Overview/Project.csproj +++ b/snippets/csharp/System/Single/Overview/Project.csproj @@ -3,7 +3,6 @@ Exe net10.0 - Example1 diff --git a/snippets/csharp/System/Single/Overview/comparison2.cs b/snippets/csharp/System/Single/Overview/comparison2.cs index 3282246945f..c18df56a7fa 100644 --- a/snippets/csharp/System/Single/Overview/comparison2.cs +++ b/snippets/csharp/System/Single/Overview/comparison2.cs @@ -11,10 +11,9 @@ public static void Main() value2 = ((float)Math.Sqrt(value2)) / 3.51f; Console.WriteLine($"{value1} = {value2}: {value1.Equals(value2)}"); - // The example displays the following output on .NET: + // The example displays the following output on modern .NET: // 10.201438 = 10.201439: False - // The example displays the following output on .NET Framework: - // 10.20144 = 10.20144: False + // } } diff --git a/snippets/csharp/System/Single/Overview/precisionlist3.cs b/snippets/csharp/System/Single/Overview/precisionlist3.cs index d05493e8b93..c8f2421707d 100644 --- a/snippets/csharp/System/Single/Overview/precisionlist3.cs +++ b/snippets/csharp/System/Single/Overview/precisionlist3.cs @@ -18,8 +18,7 @@ public static void Main() } } -// The example displays the following output on .NET: +// The example displays the following output on modern .NET: // The sum of the values (27.650002) does not equal the total (27.65). -// The example displays the following output on .NET Framework: -// The sum of the values (27.65) does not equal the total (27.65). + // diff --git a/snippets/csharp/System/Single/Overview/precisionlist4a.cs b/snippets/csharp/System/Single/Overview/precisionlist4a.cs deleted file mode 100644 index 299b38273f9..00000000000 --- a/snippets/csharp/System/Single/Overview/precisionlist4a.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.IO; - -public class Example10 -{ - public static void Main() - { - // - StreamWriter sw = new(@"./Singles.dat"); - float[] values = { 3.2f / 1.11f, 1.0f / 3f, (float)Math.PI }; - for (int ctr = 0; ctr < values.Length; ctr++) - { - sw.Write(values[ctr].ToString()); - if (ctr != values.Length - 1) - sw.Write("|"); - } - sw.Close(); - - float[] restoredValues = new float[values.Length]; - StreamReader sr = new(@"./Singles.dat"); - string temp = sr.ReadToEnd(); - string[] tempStrings = temp.Split('|'); - for (int ctr = 0; ctr < tempStrings.Length; ctr++) - restoredValues[ctr] = float.Parse(tempStrings[ctr]); - - for (int ctr = 0; ctr < values.Length; ctr++) - Console.WriteLine($"{values[ctr]} {(values[ctr].Equals(restoredValues[ctr]) ? "=" : "<>")} {restoredValues[ctr]}"); - - // The example displays the following output on .NET Framework: - // 2.882883 <> 2.882883 - // 0.3333333 <> 0.3333333 - // 3.141593 <> 3.141593 - // - } -} diff --git a/snippets/csharp/System/String/IndexOf/ignorable21.cs b/snippets/csharp/System/String/IndexOf/ignorable21.cs index 36e0ee1abab..29b182f331b 100644 --- a/snippets/csharp/System/String/IndexOf/ignorable21.cs +++ b/snippets/csharp/System/String/IndexOf/ignorable21.cs @@ -7,21 +7,21 @@ public static void Main() { string s1 = "ani\u00ADmal"; string s2 = "animal"; - + // Find the index of the soft hyphen. Console.WriteLine(s1.IndexOf("\u00AD")); Console.WriteLine(s2.IndexOf("\u00AD")); - + // Find the index of the soft hyphen followed by "n". Console.WriteLine(s1.IndexOf("\u00ADn")); Console.WriteLine(s2.IndexOf("\u00ADn")); - + // Find the index of the soft hyphen followed by "m". Console.WriteLine(s1.IndexOf("\u00ADm")); Console.WriteLine(s2.IndexOf("\u00ADm")); - // The example displays the following output - // if run under the .NET Framework 4 or later: + // The example displays the following output: + // // 0 // 0 // 1 diff --git a/snippets/csharp/System/TimeSpan/Parse/parsefailure1.cs b/snippets/csharp/System/TimeSpan/Parse/parsefailure1.cs deleted file mode 100644 index 8ddbd82d5f0..00000000000 --- a/snippets/csharp/System/TimeSpan/Parse/parsefailure1.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -public class Example3 -{ - public static void Main() - { - // - string[] values = { "000000006", "12.12:12:12.12345678" }; - foreach (string value in values) - { - try { - TimeSpan interval = TimeSpan.Parse(value); - Console.WriteLine($"{value} --> {interval}"); - } - catch (FormatException) { - Console.WriteLine($"{value}: Bad Format"); - } - catch (OverflowException) { - Console.WriteLine($"{value}: Overflow"); - } - } - - // Output from .NET Framework 3.5 and earlier versions: - // 000000006 --> 6.00:00:00 - // 12.12:12:12.12345678: Bad Format - // Output from .NET Framework 4 and later versions or .NET Core: - // 000000006: Overflow - // 12.12:12:12.12345678: Overflow - // - } -} diff --git a/snippets/csharp/System/Type/Assembly/type_assembly.cs b/snippets/csharp/System/Type/Assembly/type_assembly.cs index 81a90a550ad..6174c11a0ba 100644 --- a/snippets/csharp/System/Type/Assembly/type_assembly.cs +++ b/snippets/csharp/System/Type/Assembly/type_assembly.cs @@ -1,10 +1,10 @@ -// -using System; +using System; class MyAssemblyClass { public static void Main() { + // Type objType = typeof(Array); // Print the assembly full name. @@ -12,11 +12,14 @@ public static void Main() // Print the assembly qualified name. Console.WriteLine($"Assembly qualified name:\n {objType.AssemblyQualifiedName}."); + + // The example displays output similar to the following: + // + // Assembly full name: + // System.Private.CoreLib, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e. + // Assembly qualified name: + // System.Array, System.Private.CoreLib, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e. + + // } } -// The example displays the following output if run under the .NET Framework 4.5: -// Assembly full name: -// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. -// Assembly qualified name: -// System.Array, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. -// diff --git a/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.fs b/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.fs index 4a6df39ee9f..fb2364d5ad2 100644 --- a/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.fs +++ b/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.fs @@ -1,7 +1,4 @@ module netasync -// System.Diagnostics -// -// Requires .NET Framework version 1.2 or higher. // The following example uses the net view command to list the // available network resources available on a remote computer, diff --git a/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.fs b/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.fs index ee5220c9a34..0da50396734 100644 --- a/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.fs +++ b/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.fs @@ -1,7 +1,4 @@ module nmakeasync -// System.Diagnostics -// -// Requires .NET Framework version 1.2 or higher. // Define the namespaces used by this sample. open System diff --git a/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.fs b/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.fs index 135a8d86d10..54b8d766648 100644 --- a/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.fs +++ b/snippets/fsharp/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.fs @@ -1,7 +1,4 @@ module sortasync -// System.Diagnostics -// -// Requires .NET Framework version 1.2 or higher. // The following example uses the sort command to sort a list // of input text lines, and displays the sorted list to the console. diff --git a/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs b/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs index f75123c98f6..b9919d55d82 100644 --- a/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs +++ b/snippets/fsharp/System.Text/StringBuilder/Capacity/cap.fs @@ -38,17 +38,17 @@ printfn $"c4) sb1 equals sb2: {sb1.Equals sb2}" // a4) sb1 equals sb2: True // // Ensure sb1 has a capacity of at least 50 characters. -// +// // b1) sb1.Length = 3, sb1.Capacity = 50 // b2) sb2.Length = 3, sb2.Capacity = 16 // b3) sb1.ToString() = "abc", sb2.ToString() = "abc" -// b4) sb1 equals sb2: True (False on .NET Framework) -// +// b4) sb1 equals sb2: True +// // Set the length of sb1 to zero. // Set the capacity of sb2 to 51 characters. -// +// // c1) sb1.Length = 0, sb1.Capacity = 50 // c2) sb2.Length = 3, sb2.Capacity = 51 // c3) sb1.ToString() = "", sb2.ToString() = "abc" // c4) sb1 equals sb2: False -// \ No newline at end of file +// diff --git a/snippets/fsharp/System/Console/Overview/example3.fs b/snippets/fsharp/System/Console/Overview/example3.fs index 5ff62571827..8b97c7c9e5d 100644 --- a/snippets/fsharp/System/Console/Overview/example3.fs +++ b/snippets/fsharp/System/Console/Overview/example3.fs @@ -117,7 +117,6 @@ let main args = | None -> () | Some parsedArgs -> if parsedArgs.setOutputEncodingToUnicode then - // This won't work before .NET Framework 4.5. try // Set encoding using endianness of this system. // We're interested in displaying individual Char objects, so diff --git a/snippets/fsharp/System/Double/Overview/precision1.fs b/snippets/fsharp/System/Double/Overview/precision1.fs index 7af7fc844d3..f8250712965 100644 --- a/snippets/fsharp/System/Double/Overview/precision1.fs +++ b/snippets/fsharp/System/Double/Overview/precision1.fs @@ -12,13 +12,17 @@ let fromParse = Double.Parse "-4.42330604244772E-305" printfn $"Double value from literal: {fromLiteral,29:R}" printfn $"Double value from variable: {fromVariable,28:R}" printfn $"Double value from Parse method: {fromParse,24:R}" -// On 32-bit versions of the .NET Framework, the output is: + +// On 32-bit versions of .NET, the output is: + // Double value from literal: -4.42330604244772E-305 // Double value from variable: -4.42330604244772E-305 // Double value from Parse method: -4.42330604244772E-305 // -// On other versions of the .NET Framework, the output is: +// On other versions of .NET, the output is: + // Double value from literal: -4.4233060424477198E-305 // Double value from variable: -4.4233060424477198E-305 // Double value from Parse method: -4.42330604244772E-305 -// \ No newline at end of file + +// diff --git a/snippets/fsharp/System/String/IndexOf/ignorable21.fs b/snippets/fsharp/System/String/IndexOf/ignorable21.fs index e294c897051..634e3ed78b3 100644 --- a/snippets/fsharp/System/String/IndexOf/ignorable21.fs +++ b/snippets/fsharp/System/String/IndexOf/ignorable21.fs @@ -15,12 +15,13 @@ printfn $"""{s2.IndexOf "\u00ADn"}""" printfn $"""{s1.IndexOf "\u00ADm"}""" printfn $"""{s2.IndexOf "\u00ADm"}""" -// The example displays the following output -// if run under the .NET Framework 4 or later: +// The example displays the following output: + // 0 // 0 // 1 // 1 // 4 // 3 + // diff --git a/snippets/fsharp/System/TimeSpan/Parse/parsefailure1.fs b/snippets/fsharp/System/TimeSpan/Parse/parsefailure1.fs index 54ff371765d..f8857ccec90 100644 --- a/snippets/fsharp/System/TimeSpan/Parse/parsefailure1.fs +++ b/snippets/fsharp/System/TimeSpan/Parse/parsefailure1.fs @@ -7,17 +7,14 @@ let values = [| "000000006"; "12.12:12:12.12345678" |] for value in values do try let interval = TimeSpan.Parse value - printfn $"{value} --> {interval}" + printfn $"{value} --> {interval}" with | :? FormatException -> printfn $"{value}: Bad Format" | :? OverflowException -> printfn $"{value}: Overflow" -// Output from .NET Framework 3.5 and earlier versions: -// 000000006 --> 6.00:00:00 -// 12.12:12:12.12345678: Bad Format -// Output from .NET Framework 4 and later versions or .NET Core: +// Output: // 000000006: Overflow // 12.12:12:12.12345678: Overflow -// \ No newline at end of file +// diff --git a/snippets/fsharp/System/Type/Assembly/type_assembly.fs b/snippets/fsharp/System/Type/Assembly/type_assembly.fs index 0c256d12309..ba98e5ee73e 100644 --- a/snippets/fsharp/System/Type/Assembly/type_assembly.fs +++ b/snippets/fsharp/System/Type/Assembly/type_assembly.fs @@ -8,9 +8,12 @@ printfn $"Assembly full name:\n {objType.Assembly.FullName}." // Print the assembly qualified name. printfn $"Assembly qualified name:\n {objType.AssemblyQualifiedName}." -// The example displays the following output if run under the .NET Framework 4.5: + +// The example displays output similar to the following: +// // Assembly full name: -// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. +// System.Private.CoreLib, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e. // Assembly qualified name: -// System.Array, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. -// \ No newline at end of file +// System.Array, System.Private.CoreLib, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e. + +// diff --git a/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb b/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb deleted file mode 100644 index 95188e6484c..00000000000 --- a/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb +++ /dev/null @@ -1,1102 +0,0 @@ - -Option Explicit On -Option Strict On - -' -Imports System.IO -' - -Imports System.Drawing -Imports System.Windows.Forms -Imports Microsoft.VisualBasic.FileIO - -Class Class00ad6fbd924e4a49af32d505fe69ea32 - ' 00ad6fbd-924e-4a49-af32-d505fe69ea32 - ' My.Computer.FileSystem.RenameFile Method - - Public Sub Method1() - ' - My.Computer.FileSystem.RenameFile("C:\Test.txt", "SecondTest.txt") - ' - End Sub - -End Class - -Class Class0351a2ca24d843b5bb399b99e6401cff - ' 0351a2ca-24d8-43b5-bb39-9b99e6401cff - ' How to: Create a Directory in Visual Basic - - Public Sub Method2() - ' - My.Computer.FileSystem.CreateDirectory( - "C:\Documents and Settings\All Users\Documents\NewDirectory") - ' - End Sub - -End Class - -Class Class07637b38bd9949b18cc0dc37cdb14dba - ' 07637b38-bd99-49b1-8cc0-dc37cdb14dba - ' My.Computer.FileSystem.DeleteFile Method - - Public Sub Method3() - ' - My.Computer.FileSystem.DeleteFile("C:\test.txt") - ' - End Sub - - Public Sub Method4() - ' - My.Computer.FileSystem.DeleteFile( - "C:\test.txt", - FileIO.UIOption.AllDialogs, - FileIO.RecycleOption.SendToRecycleBin, - FileIO.UICancelOption.ThrowException) - ' - End Sub - - Public Sub Method5() - ' - My.Computer.FileSystem.DeleteFile( - "C:\test.txt", - FileIO.UIOption.OnlyErrorDialogs, - FileIO.RecycleOption.SendToRecycleBin, - FileIO.UICancelOption.ThrowException) - ' - End Sub - -End Class - -Class Class0c50a18fc24e4266a95276bce924ad3e - ' 0c50a18f-c24e-4266-a952-76bce924ad3e - ' How to: Determine How Many Files Are in a Directory in Visual Basic - - Public Sub Method6() - ' - Dim counter = My.Computer.FileSystem.GetFiles("C:\TestDir") - MsgBox("number of files is " & CStr(counter.Count)) - ' - End Sub - - Public Sub Method7() - ' - Dim counter = My.Computer.FileSystem.GetFiles("C:\TestDir") - ' - End Sub - - Public Sub Method8() - Dim counter = My.Computer.FileSystem.GetFiles("C:\TestDir") - ' - MsgBox("number of files is " & CStr(counter.Count)) - ' - End Sub - -End Class - -Class Class0ea7e0c82cb24bf5a00d7b6e3c08a3bc - ' 0ea7e0c8-2cb2-4bf5-a00d-7b6e3c08a3bc - ' How to: Rename a File in Visual Basic - - Public Sub Method9() - ' - ' Change "c:\test.txt" to the path and filename for the file that - ' you want to rename. - My.Computer.FileSystem.RenameFile("C:\Test.txt", "SecondTest.txt") - ' - End Sub - -End Class - -Class Class0f26d1efc0a044458eb09b7d0490411c - ' 0f26d1ef-c0a0-4445-8eb0-9b7d0490411c - ' How to: Move a Directory in Visual Basic - - Public Sub Method10() - ' - My.Computer.FileSystem.MoveDirectory("C:\Dir1", "C:\Dir2") - ' - End Sub - - Public Sub Method11() - ' - My.Computer.FileSystem.MoveDirectory("C:\Dir1", "C:\Dir2", True) - ' - End Sub - -End Class - -Class Class10d9a542698c4150ada9033527605b7f - ' 10d9a542-698c-4150-ada9-033527605b7f - ' My.Computer.FileSystem.GetTempFileName Method - - Public Sub Method12() - ' - MsgBox("The file is located at " & - My.Computer.FileSystem.GetTempFileName) - ' - End Sub - -End Class - -Class Class14700cb39d2946e2af8d61970d7e251b - ' 14700cb3-9d29-46e2-af8d-61970d7e251b - ' My.Computer.FileSystem.RenameDirectory Method - - Public Sub Method13() - ' - My.Computer.FileSystem.RenameDirectory("C:MyDocuments\Test", "SecondTest") - ' - End Sub - -End Class - -Class Class1c726124781d49769baaed46814ff3fe - ' 1c726124-781d-4976-9baa-ed46814ff3fe - ' How to: Write Text to Files in MyDocuments (Visual Basic) - - Public Sub Method14() - Dim filepath As String = "filepath" - ' - My.Computer.FileSystem.WriteAllText(filePath, "some text", True) - ' - End Sub - -End Class - -Class Class26560d017dda44578e9521db23d71aea - ' 26560d01-7dda-4457-8e95-21db23d71aea - ' How to: Retrieve the Contents of the MyDocuments Folder in Visual Basic - - Public Sub Method15() - ' - Dim path As String - Dim patients As String - path = My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\" & "Patients.txt" - patients = My.Computer.FileSystem.ReadAllText(path) - ' - End Sub - -End Class - -Class Class2a370bd710ba4219afc44519d031eb6c - ' 2a370bd7-10ba-4219-afc4-4519d031eb6c - ' How to: Copy a Directory to Another Directory in Visual Basic - - Public Sub Method16() - ' - My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", True) - ' - End Sub - -End Class - -Class Class2c1688d2a60c4e689a1a4006917b28e1 - ' 2c1688d2-a60c-4e68-9a1a-4006917b28e1 - ' My.Computer.FileSystem.CreateDirectory Method - - Public Sub Method17() - ' - My.Computer.FileSystem.CreateDirectory( - "C:\Documents and Settings\All Users\Documents\NewDirectory") - ' - End Sub - -End Class - -Class Class2ebefb41a88946a594068688329288c3 - ' 2ebefb41-a889-46a5-9406-8688329288c3 - ' My.Computer.FileSystem.CurrentDirectory Property - - Public Sub Method18() - ' - MsgBox(My.Computer.FileSystem.CurrentDirectory) - ' - End Sub - - Public Sub Method19() - ' - My.Computer.FileSystem.CurrentDirectory = "C:\TestDirectory" - ' - End Sub - -End Class - -Class Class3c2a7073f7b540c0b3973c9f3d43caeb - ' 3c2a7073-f7b5-40c0-b397-3c9f3d43caeb - ' How to: Determine a Drive's Physical Free Space in Visual Basic - - Public Sub Method20() - ' - Dim cdrive As System.IO.DriveInfo - cdrive = My.Computer.FileSystem.GetDriveInfo("C:\") - MsgBox("Total free space: " & CStr(cdrive.TotalFreeSpace)) - ' - End Sub - -End Class - -Class Class3d201ebc54994ee286d0c2d8f023701d - ' 3d201ebc-5499-4ee2-86d0-c2d8f023701d - ' My.Computer.FileSystem.GetName Method - - Public Sub Method21() - ' - MsgBox("The filename is: " & - My.Computer.FileSystem.GetName("C:\testdirectory\testfile")) - ' - End Sub - -End Class - -Class Class4b7217693e454be7b7feb08dc4141b44 - ' 4b721769-3e45-4be7-b7fe-b08dc4141b44 - ' How to: Delete a File in Visual Basic - - Public Sub Method22() - ' - My.Computer.FileSystem.DeleteFile("C:\test.txt") - ' - End Sub - -End Class - -Class Class4c14545654534bdaaab5578dc8bee59a - ' 4c145456-5453-4bda-aab5-578dc8bee59a - ' My.Computer.FileSystem Object - - Public Sub Method23() - ' - Dim logInfo As System.IO.DirectoryInfo - If My.Computer.FileSystem.DirectoryExists("C:\backup\logs") Then - logInfo = My.Computer.FileSystem.GetDirectoryInfo( - "C:\backup\logs") - End If - ' - End Sub - -End Class - -Class Class53a7457b581541adb37d28537c1fb77a - ' 53a7457b-5815-41ad-b37d-28537c1fb77a - ' How to: Move a File in Visual Basic - - Public Sub Method24() - ' - My.Computer.FileSystem.MoveFile("C:\TestDir1\test.txt", - "C:\TestDir2\test.txt") - ' - End Sub - - Public Sub Method25() - ' - My.Computer.FileSystem.MoveFile("C:\TestDir1\test.txt", - "C:\TestDir2\nexttest.txt", - FileIO.UIOption.AllDialogs, - FileIO.UICancelOption.ThrowException) - ' - End Sub - -End Class - -Class Class585f14af16694efd83c55e576a487d5d - ' 585f14af-1669-4efd-83c5-5e576a487d5d - ' My.Computer.FileSystem.SpecialDirectories.MyMusic Property - - Public Sub Method26() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.MyMusic) - ' - End Sub - -End Class - -Class Class59fae125de5b4c96883c209f4a55112c - ' 59fae125-de5b-4c96-883c-209f4a55112c - ' How to: Write to a Binary File in Visual Basic - - Public Sub Method27() - Dim customerQuery As Byte() = {0} - ' - Dim CustomerData As Byte() = (From c In customerQuery).ToArray() - - My.Computer.FileSystem.WriteAllBytes( - "C:\MyDocuments\CustomerData", CustomerData, True) - ' - End Sub - -End Class - - - -Class Class68d88e077f2748deb7438d7baf5b590e - ' 68d88e07-7f27-48de-b743-8d7baf5b590e - ' My.Computer.FileSystem.SpecialDirectories.Temp Property - - Public Sub Method31() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.Temp) - ' - End Sub - -End Class - -Class Class6c8ba7e8dd37485392bf762b67c98160 - ' 6c8ba7e8-dd37-4853-92bf-762b67c98160 - ' How to: Get the Collection of Files in a Directory in Visual Basic - - Public Sub Method32() - Dim listBox1 As New System.Windows.Forms.ListBox - ' - For Each foundFile As String In My.Computer.FileSystem.GetFiles( - My.Computer.FileSystem.SpecialDirectories.MyDocuments) - - listBox1.Items.Add(foundFile) - Next - ' - End Sub - -End Class - -Class Class76a7ee5aed55479880737592aee2ff47 - ' 76a7ee5a-ed55-4798-8073-7592aee2ff47 - ' My.Computer.FileSystem.ReadAllBytes Method - - Public Sub Method33() - ' - My.Computer.FileSystem.ReadAllBytes( - "C:/Documents and Settings/selfportrait.jpg") - ' - End Sub - -End Class - -Class Class780c7afca03c4b01865a510fe331b1cc - ' 780c7afc-a03c-4b01-865a-510fe331b1cc - ' How to: Rename a Directory in Visual Basic - - Public Sub Method34() - ' - My.Computer.FileSystem.RenameDirectory("C:MyDocuments\Test", - "SecondTest") - ' - End Sub - -End Class - -Class Class7d2109ebf98a4389b43d30f384aaa7d5 - ' 7d2109eb-f98a-4389-b43d-30f384aaa7d5 - ' Walkthrough: Manipulating Files Using .NET Framework Methods - - - Public Sub Method36() - ' - Dim fw As StreamWriter - ' - fw = New StreamWriter("C:\MyDiary.txt", True) - End Sub - - Public Sub Method37() - Dim fw As StreamWriter - Dim entry As New System.Windows.Forms.TextBox - fw = New StreamWriter("C:\MyDiary.txt", True) - ' - Dim ReadString As String - Try - 'Pass the file path and name to the StreamWriter constructor. - 'Indicate that Append is True, so file will not be overwritten. - fw = New StreamWriter("C:\MyDiary.txt", True) - ReadString = Entry.Text - fw.WriteLine(ReadString) - Finally - 'Close the file. - fw.Close() - End Try - ' - End Sub - - Public Sub Method38() - Dim fw As StreamWriter - Dim entry As New System.Windows.Forms.TextBox - fw = New StreamWriter("C:\MyDiary.txt", True) - ' - If (Entry.Text = "" Or Entry.Text = "Please enter something.") Then - Entry.Text = "Please enter something." - Return - End If - ' - End Sub - - Public Sub Method39() - Dim fw As StreamWriter - Dim entry As New System.Windows.Forms.TextBox - fw = New StreamWriter("C:\MyDiary.txt", True) - ' - Dim Today As DateTime - Today = Now - fw.Write(CStr(Today)) - fw.Write(ControlChars.CrLf) - ' - End Sub - - Public Sub Method40() - Dim fw As StreamWriter - Dim entry As New System.Windows.Forms.TextBox - fw = New StreamWriter("C:\MyDiary.txt", True) - ' - Entry.Text = "" - ' - End Sub - - Public Sub Method41() - Dim pickentries As New System.Windows.Forms.ListBox - ' - Dim fr As StreamReader = Nothing - Dim FileString As String - FileString = "" - Try - fr = New System.IO.StreamReader("C:\MyDiary.txt") - PickEntries.Items.Clear() - PickEntries.Enabled = True - Do - FileString = fr.ReadLine - If IsDate(FileString) Then - PickEntries.Items.Add(FileString) - End If - Loop Until (FileString Is Nothing) - Finally - If fr IsNot Nothing Then - fr.Close() - End If - End Try - PickEntries.Enabled = True - ' - End Sub - - Public Sub Method42() - Dim pickentries As New System.Windows.Forms.ComboBox - Dim displayentry As New System.Windows.Forms.Button - ' - Dim fr As StreamReader - Dim ReadString As String - 'Make sure ReadString begins empty. - ReadString = "" - Dim FileString As String - fr = New StreamReader("C:\MyDiary.txt") - 'If no entry has been selected, show the whole file. - If PickEntries.Enabled = False Or PickEntries.SelectedText Is Nothing Then - Do - 'Read a line from the file into FileString. - FileString = fr.ReadLine - 'add it to ReadString - ReadString = ReadString & ControlChars.CrLf & FileString - Loop Until (FileString = Nothing) - Else - 'An entry has been selected, find the line that matches. - Do - - FileString = fr.ReadLine - Loop Until FileString = CStr(PickEntries.SelectedItem) - FileString = CStr(PickEntries.SelectedItem) & ControlChars.CrLf - ReadString = FileString & fr.ReadLine - - 'Read from the file until EOF or another Date is found. - Do Until ((fr.Peek < 0) Or (IsDate(fr.ReadLine))) - ReadString = ReadString & fr.ReadLine - Loop - End If - fr.Close() - DisplayEntry.Visible = True - DisplayEntry.Text = ReadString - ' - End Sub - - Public Sub Method43() - Dim deleteentry As New System.Windows.Forms.Button - - ' - DeleteEntry.enabled = True - ' - End Sub - - Public Sub Method44() - Dim displayentry As New System.Windows.Forms.TextBox - Dim pickentries As New System.Windows.Forms.ComboBox - Dim deleteentry As New System.Windows.Forms.TextBox - - ' - Dim fr As StreamReader - Dim ReadString As String - Dim WriteString As String - Dim ConfirmDelete As MsgBoxResult - fr = New StreamReader("C:\MyDiary.txt") - ReadString = fr.ReadLine - ' Read through the textfile - Do Until (fr.Peek < 0) - ReadString = ReadString & vbCrLf & fr.ReadLine - Loop - WriteString = Replace(ReadString, DisplayEntry.Text, "") - fr.Close() - ' Check to make sure the user wishes to delete the entry - ConfirmDelete = MsgBox("Do you really wish to delete this entry?", - MsgBoxStyle.OKCancel) - If ConfirmDelete = MsgBoxResult.OK Then - File.Delete("C:\MyDiary.txt") - Dim fw As StreamWriter = File.CreateText("C:\MyDiary.txt") - fw.WriteLine(WriteString) - fw.Close() - ' Reset controls on the form - DisplayEntry.Text = "" - PickEntries.Text = "" - PickEntries.Items.Clear() - PickEntries.Enabled = False - DeleteEntry.Enabled = False - End If - ' - End Sub - - Public Sub Method45() - Dim editentry As New System.Windows.Forms.Button - ' - EditEntry.Enabled = True - ' - End Sub - - Public Sub Method46() - Dim entry As New System.Windows.Forms.TextBox - Dim displayentry As New System.Windows.Forms.TextBox - Dim submitedit As New System.Windows.Forms.Button - ' - Entry.Text = DisplayEntry.Text - SubmitEdit.Enabled = True - ' - End Sub - - Public Sub Method47() - Dim entry As New System.Windows.Forms.TextBox - Dim displayentry As New System.Windows.Forms.TextBox - Dim editentry As New System.Windows.Forms.Button - Dim submitedit As New System.Windows.Forms.Button - ' - Dim fr As StreamReader - Dim ReadString As String - Dim WriteString As String - If Entry.Text = "" Then - MsgBox("Use Delete to Delete an Entry") - Return - End If - fr = New StreamReader("C:\MyDiary.txt") - ReadString = fr.ReadLine - Do Until (fr.Peek < 0) - ReadString = ReadString & vbCrLf & fr.ReadLine - Loop - WriteString = Replace(ReadString, DisplayEntry.Text, Entry.Text) - fr.Close() - File.Delete("C:\MyDiary.txt") - Dim fw As StreamWriter = File.CreateText("C:\MyDiary.txt") - fw.WriteLine(WriteString) - fw.Close() - DisplayEntry.Text = Entry.Text - Entry.Text = "" - EditEntry.Enabled = False - SubmitEdit.Enabled = False - ' - End Sub - -End Class - -Class Classab01af4109ca4206b81d876379a18e3b - ' ab01af41-09ca-4206-b81d-876379a18e3b - ' My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData Property - - Public Sub Method48() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData) - ' - End Sub - -End Class - -Class Classaedb6fd5dca3415388b601b9796329c3 - ' aedb6fd5-dca3-4153-88b6-01b9796329c3 - ' My.Computer.FileSystem.CopyDirectory Method - - Public Sub Method49() - ' - My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", True) - ' - End Sub - -End Class - -Class Classb1a24dc1eac84e228ffacc3bacbaf826 - ' b1a24dc1-eac8-4e22-8ffa-cc3bacbaf826 - ' My.Computer.FileSystem.WriteAllBytes Method - - Public Sub Method50() - Dim customerdata As Byte() = {0} - ' - My.Computer.FileSystem.WriteAllBytes( - "C:\MyDocuments\CustomerData", CustomerData, True) - ' - End Sub - -End Class - -Class Classb2fdda86e66642c297069527e9fa68ff - ' b2fdda86-e666-42c2-9706-9527e9fa68ff - ' How to: Create a Copy of a File in the Same Directory in Visual Basic - - Public Sub Method51() - ' - My.Computer.FileSystem.CopyFile("C:\TestFolder\test.txt", - "C:\TestFolder\test2.txt", Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, FileIO.UICancelOption.DoNothing) - ' - End Sub - - Public Sub Method52() - ' - My.Computer.FileSystem.CopyFile("C:\TestFolder\test.txt", - "C:\TestFolder\test2.txt", True) - ' - End Sub - -End Class - -Class Classb55a2a7967e84a05b88bc2dee1fc5b2f - ' b55a2a79-67e8-4a05-b88b-c2dee1fc5b2f - ' My.Computer.FileSystem.SpecialDirectories.MyDocuments Property - - Public Sub Method53() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.MyDocuments) - ' - End Sub - -End Class - -Class Classc1bd99c98160456ab5ab60a49139b923 - ' c1bd99c9-8160-456a-b5ab-60a49139b923 - ' How to: Parse File Paths in Visual Basic - - Public Sub Method54() - ' - Dim testFile As System.IO.FileInfo - testFile = My.Computer.FileSystem.GetFileInfo("C:\TestFolder1\test1.txt") - Dim folderPath As String = testFile.DirectoryName - MsgBox(folderPath) - Dim fileName As String = testFile.Name - MsgBox(fileName) - ' - - ' - Dim fullPath As String - fullPath = My.Computer.FileSystem.CombinePath(folderPath, fileName) - MsgBox(fullPath) - ' - End Sub - -End Class - -Class Classc8038bac8e59467d85d9a5d5e6367737 - ' c8038bac-8e59-467d-85d9-a5d5e6367737 - ' My.Computer.FileSystem.DeleteDirectory Method - - Public Sub Method56() - ' - My.Computer.FileSystem.DeleteDirectory( - "C:\OldDirectory", - FileIO.DeleteDirectoryOption.ThrowIfDirectoryNonEmpty) - ' - End Sub - - Public Sub Method57() - ' - My.Computer.FileSystem.DeleteDirectory( - "C:\OldDirectory", - FileIO.DeleteDirectoryOption.DeleteAllContents) - ' - End Sub - - Public Sub Method58() - ' - My.Computer.FileSystem.DeleteDirectory( - "C:\OldDirectory", - FileIO.UIOption.AllDialogs, - FileIO.RecycleOption.DeletePermanently, - FileIO.UICancelOption.ThrowException) - ' - End Sub - - Public Sub Method59() - ' - My.Computer.FileSystem.DeleteDirectory( - "C:\OldDirectory", - FileIO.UIOption.AllDialogs, - FileIO.RecycleOption.SendToRecycleBin, - FileIO.UICancelOption.ThrowException) - ' - End Sub - -End Class - -Class Classc8f1380032514f11b47a5f0489989ba7 - ' c8f13800-3251-4f11-b47a-5f0489989ba7 - ' My.Computer.FileSystem.SpecialDirectories.Desktop Property - - Public Sub Method60() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.Desktop) - ' - End Sub - -End Class - -Class Classc98e98f7fc4e4f7abe917c532c858df0 - ' c98e98f7-fc4e-4f7a-be91-7c532c858df0 - ' My.Computer.FileSystem.SpecialDirectories.Programs Property - - Public Sub Method61() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.Programs) - ' - End Sub - -End Class - -Class Classcae775659f784e468e42eb2f9f8e1ffd - Inherits System.Windows.Forms.Form - ' cae77565-9f78-4e46-8e42-eb2f9f8e1ffd - ' Walkthrough: Manipulating Files and Directories in Visual Basic - Dim DirectoryTextBox As New System.Windows.Forms.TextBox - Dim FilePickComboBox As New System.Windows.Forms.ComboBox - Dim LastAccessCheckBox As New System.Windows.Forms.CheckBox - Dim SaveCheckBox As New System.Windows.Forms.CheckBox - Dim FileLengthCheckBox As New System.Windows.Forms.CheckBox - - ' Dim strFirstline As String - 'Dim firstline As String - 'Dim lastaccess As Date - 'Dim foundFile As New System.IO.FileInfo("test.txt") - 'Dim length As Long - - Private Sub Form1_Load() Handles Me.Load - ' - DirectoryTextBox.Text = My.Computer.FileSystem.CurrentDirectory - ' - End Sub - - Public Sub btnSubmit_Click() - - Dim fileList As System.Collections.ObjectModel.ReadOnlyCollection(Of String) - - Dim errorMessage = "" - - ' - ' newPath holds the path the user has entered. - Dim newPath = DirectoryTextBox.Text - ' Change the location to newPath. - My.Computer.FileSystem.CurrentDirectory = newPath - ' - - - ' - Try - ' - - My.Computer.FileSystem.CurrentDirectory = newPath - - ' - ' This checks to make sure the path is not blank. - Catch ex As Exception When newPath = "" - ErrorMessage = "You must enter a path." - ' This catches errors caused by a path that is not valid. - Catch - ErrorMessage = "You must enter a valid path. If trying " & - "to access a different drive, remember to include the drive " & - "letter." - Finally - ' Display the error message only if one exists. - If errorMessage <> Nothing Then - MsgBox(errorMessage) - End If - End Try - ' - - ' - fileList = My.Computer.FileSystem.GetFiles( - My.Computer.FileSystem.CurrentDirectory, - FileIO.SearchOption.SearchTopLevelOnly, "*.txt") - For Each foundFile In fileList - FilePickComboBox.Items.Add(foundFile) - Next - ' - End Sub - - Public Sub btnExamine_Click() - ' - Dim thisFile = - My.Computer.FileSystem.GetFileInfo(CStr(FilePickComboBox.SelectedItem)) - ' - - ' - Dim stringlength = "The file's length, in bytes, is: " - Dim stringLastAccess = "The file was last accessed on: " - Dim lastAccess As Date - Dim length As Long - Dim firstLine = "" - Dim finalString = "" - - If FilePickComboBox.SelectedItem Is Nothing Then - MsgBox("You must select a file to examine.") - Exit Sub - End If - - Dim newName = CStr(FilePickComboBox.SelectedItem) - ' - - ' - ' Check last access time. - If LastAccessCheckBox.Checked = True Then - lastAccess = thisFile.LastAccessTime - End If - ' - ' - ' Add to the message box. - finalString = finalString & stringLastAccess & lastAccess & "." & - vbCrLf - ' - - ' - ' Check length. - If FileLengthCheckBox.Checked = True Then - length = thisFile.Length - End If - ' - ' - ' Add to the message box. - finalString = finalString & stringlength & CStr(Length) & "." & - vbCrLf - ' - - ' - ' Add to the message box. - finalString &= firstLine & vbCrLf - ' - - ' - ' Check to see whether results should be saved. - If SaveCheckBox.Checked = True AndAlso finalString <> "" Then - My.Computer.FileSystem.WriteAllText("log.txt", finalString, True) - End If - ' - End Sub - -End Class - -Class Classcfba872bf268400f983a2e4525845874 - ' cfba872b-f268-400f-983a-2e4525845874 - ' My.Computer.FileSystem.SpecialDirectories.MyPictures Property - - Public Sub Method77() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.MyPictures) - ' - End Sub - -End Class - -Class Classd2b1269e24b642e09414ae708db282d8 - ' d2b1269e-24b6-42e0-9414-ae708db282d8 - ' How to: Read From a Binary File in Visual Basic - - Public Sub Method78() - Dim PictureBox1 As New PictureBox - ' - Dim bytes = My.Computer.FileSystem.ReadAllBytes( - "C:/Documents and Settings/selfportrait.jpg") - PictureBox1.Image = Image.FromStream(New IO.MemoryStream(bytes)) - ' - End Sub - - ' - ' This method does not trap for exceptions. If an exception is - ' encountered opening the file to be copied or writing to the - ' destination location, then the exception will be thrown to - ' the requestor. - Public Sub CopyBinaryFile(ByVal path As String, - ByVal copyPath As String, - ByVal bufferSize As Integer, - ByVal overwrite As Boolean) - - Dim inputFile = IO.File.Open(path, IO.FileMode.Open) - - If overwrite AndAlso My.Computer.FileSystem.FileExists(copyPath) Then - My.Computer.FileSystem.DeleteFile(copyPath) - End If - - ' Adjust array length for VB array declaration. - Dim bytes = New Byte(bufferSize - 1) {} - - While inputFile.Read(bytes, 0, bufferSize) > 0 - My.Computer.FileSystem.WriteAllBytes(copyPath, bytes, True) - End While - - inputFile.Close() - End Sub - ' - -End Class - -Class Classd5b61ecef32746fba82ad6b102dbc0ca - ' d5b61ece-f327-46fb-a82a-d6b102dbc0ca - ' My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData Property - - Public Sub Method79() - ' - MsgBox( - My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData) - ' - End Sub - -End Class - -Class Classd5f375c3094b4011843817a31bc6df2b - ' d5f375c3-094b-4011-8438-17a31bc6df2b - ' My.Computer.FileSystem.SpecialDirectories Object - - Public Sub Method80() - ' - Dim filePath As String - filePath = My.Computer.FileSystem.SpecialDirectories.Desktop - MsgBox(filePath) - ' - End Sub - -End Class - -Class Classe03f46b0dfbf450491fe8e46b0e7cb1d - ' e03f46b0-dfbf-4504-91fe-8e46b0e7cb1d - ' My.Computer.FileSystem.MoveDirectory Method - - Public Sub Method81() - ' - My.Computer.FileSystem.MoveDirectory("C:\Directory1", "C:\Directory2") - ' - End Sub - - Public Sub Method82() - ' - My.Computer.FileSystem.MoveDirectory("C:\Directory1", "C:\Directory2", - True) - ' - End Sub - -End Class - -Class Classe80452a8e9b74532a20e97edb859d121 - ' e80452a8-e9b7-4532-a20e-97edb859d121 - ' How to: Delete a Directory in Visual Basic - - Public Sub Method83() - ' - My.Computer.FileSystem.DeleteDirectory("C:\OldDirectory", - FileIO.DeleteDirectoryOption.ThrowIfDirectoryNonEmpty) - ' - End Sub - - Public Sub Method84() - ' - My.Computer.FileSystem.DeleteDirectory("C:\OldDirectory", - FileIO.DeleteDirectoryOption.DeleteAllContents) - ' - End Sub - - Public Sub Method85() - ' - My.Computer.FileSystem.DeleteDirectory("C:\OldDirectory", FileIO.UIOption.AllDialogs, FileIO.RecycleOption.SendToRecycleBin) - ' - End Sub - -End Class - -Class Classf13ecad9b95f49239f05c061a1617756 - ' f13ecad9-b95f-4923-9f05-c061a1617756 - ' My.Computer.FileSystem.MoveFile Method - - Public Sub Method86() - ' - My.Computer.FileSystem.MoveFile("C:\TestDir1\test.txt", "C:\TestDir2\test.txt") - ' - End Sub - - Public Sub Method87() - ' - My.Computer.FileSystem.MoveFile("C:\TestDir1\test.txt", "C:\TestDir2\test2.txt") - ' - End Sub - -End Class - -Class Classf205d2adbbe54d558a40acda21aa82dd - ' f205d2ad-bbe5-4d55-8a40-acda21aa82dd - ' How to: Copy Files with a Specific Pattern to a Directory in Visual Basic - - Public Sub Method88() - Dim foundfile As String = "x" - - ' - My.Computer.FileSystem.CopyFile(foundFile, "C:\testdirectory\" & My.Computer.FileSystem.GetName(foundFile)) - ' - End Sub - - Public Sub Method89() - Dim i As Integer - For i = 1 To 5 - ' - Next - ' - End Sub - -End Class - -Class Class7bb0d83e875a4b158935bdc24e71ef98 - ' 7bb0d83e-875a-4b15-8935-bdc24e71ef98 - ' My.Computer.FileSystem.SpecialDirectories.ProgramFiles Property - - Public Sub Method90() - ' - MsgBox(My.Computer.FileSystem.SpecialDirectories.ProgramFiles) - ' - End Sub - -End Class - -Class Classe02587a6e85494d7f9392beae2c7f3903 - '02587a6e-8549-4d7f-9392-beae2c7f3903 - ' My.Computer.FileSystem.CopyDirectory Method - Public Sub Method94() - ' - My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2") - ' - End Sub -End Class - -Class Classe664cd9b1a9174Ffc96ed789c60582205 - ' 664cd9b1-a917-4ffc-96ed-789c60582205 - ' My.Computer.FileSystem.CopyDirectory Method - Public Sub Method92() - ' - My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", UIOption.AllDialogs) - ' - End Sub -End Class - -Class Classe9df56b2b8eb34f9ba184c2bb529eeaa7 - ' 9df56b2b-8eb3-4f9b-a184-c2bb529eeaa7 - ' My.Computer.FileSystem.CopyDirectory Method - Public Sub Method93() - ' - My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", UIOption.AllDialogs, UICancelOption.DoNothing) - ' - End Sub -End Class diff --git a/snippets/visualbasic/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.vb b/snippets/visualbasic/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.vb index ecce48f6222..91da2dd0421 100644 --- a/snippets/visualbasic/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.vb +++ b/snippets/visualbasic/System.CodeDom.Compiler/CodeDomProvider/CreateProvider/source.vb @@ -1,10 +1,8 @@ ' System.CodeDom.Compiler.CompilerInfo -' -' Requires .NET Framework version 2.0 or higher. ' ' The following example displays compiler configuration settings. ' Command-line arguments are used to specify a compiler language, -' file extension, or provider type. For the given input, the +' file extension, or provider type. For the given input, the ' example determines the corresponding code compiler settings. ' ' @@ -39,16 +37,16 @@ Namespace CodeDomCompilerInfoSample Dim queryCommand As String = "" Dim queryArg As String = "" Dim iNumArguments As Integer = args.Length - + ' Get input command-line arguments. If iNumArguments > 0 Then queryCommand = args(0).ToUpper(CultureInfo.InvariantCulture) - + If iNumArguments > 1 Then queryArg = args(1) End If End If - + ' Determine which method to call. Console.WriteLine() Select Case queryCommand @@ -62,13 +60,13 @@ Namespace CodeDomCompilerInfoSample ' Display settings for the configured language provider. DisplayCompilerInfoForConfigLanguage(queryArg) Case "ALL" - ' Display compiler information for all configured + ' Display compiler information for all configured ' language providers. DisplayAllCompilerInfo() Case Else - ' There was no command-line argument, or the + ' There was no command-line argument, or the ' command-line argument was not recognized. - ' Display the C#, Visual Basic and JScript + ' Display the C#, Visual Basic and JScript ' compiler information. DisplayCSharpCompilerInfo() DisplayVBCompilerInfo() @@ -76,14 +74,14 @@ Namespace CodeDomCompilerInfoSample End Select End Sub - - + + Shared Sub DisplayCSharpCompilerInfo() - + ' ' Get the provider for Microsoft.CSharp Dim provider = CodeDomProvider.CreateProvider("CSharp") - + ' Display the C# language provider information. Console.WriteLine("CSharp provider is {0}", _ provider.ToString()) @@ -91,17 +89,17 @@ Namespace CodeDomCompilerInfoSample provider.GetHashCode().ToString()) Console.WriteLine(" Default file extension: {0}", _ provider.FileExtension) - + ' Console.WriteLine() End Sub - - + + Shared Sub DisplayVBCompilerInfo() ' ' Get the provider for Microsoft.VisualBasic Dim provider = CodeDomProvider.CreateProvider("VisualBasic") - + ' Display the Visual Basic language provider information. Console.WriteLine("Visual Basic provider is {0}", _ provider.ToString()) @@ -109,20 +107,20 @@ Namespace CodeDomCompilerInfoSample provider.GetHashCode().ToString()) Console.WriteLine(" Default file extension: {0}", _ provider.FileExtension) - + ' Console.WriteLine() End Sub - - + + Shared Sub DisplayJScriptCompilerInfo() ' ' Get the provider for JScript. Dim provider As CodeDomProvider - + Try provider = CodeDomProvider.CreateProvider("js") - + ' Display the JScript language provider information. Console.WriteLine("JScript language provider is {0}", _ provider.ToString()) @@ -138,9 +136,9 @@ Namespace CodeDomCompilerInfoSample ' End Sub - + Shared Sub DisplayCompilerInfoUsingExtension(fileExtension As String) - ' + ' If Not fileExtension.StartsWith(".") Then fileExtension = "." + fileExtension End If @@ -149,24 +147,24 @@ Namespace CodeDomCompilerInfoSample If CodeDomProvider.IsDefinedExtension(fileExtension) Then Dim provider As CodeDomProvider Dim language As String = CodeDomProvider.GetLanguageFromExtension(fileExtension) - + Console.WriteLine("The language ""{0}"" is associated with file extension ""{1}""", _ language, fileExtension) Console.WriteLine() - + ' Check for a corresponding language provider. If CodeDomProvider.IsDefinedLanguage(language) Then provider = CodeDomProvider.CreateProvider(language) - + ' Display information about this language provider. Console.WriteLine("Language provider: {0}", _ provider.ToString()) Console.WriteLine() - + ' Get the compiler settings for this language. Dim langCompilerInfo As CompilerInfo = CodeDomProvider.GetCompilerInfo(language) Dim langCompilerConfig As CompilerParameters = langCompilerInfo.CreateDefaultCompilerParameters() - + Console.WriteLine(" Compiler options: {0}", _ langCompilerConfig.CompilerOptions) Console.WriteLine(" Compiler warning level: {0}", _ @@ -176,18 +174,18 @@ Namespace CodeDomCompilerInfoSample ' Tell the user that the language provider was not found. Console.WriteLine("There is no language provider associated with input file extension ""{0}"".", fileExtension) End If - ' + ' End Sub - - + + Shared Sub DisplayCompilerInfoForLanguage(language As String) - ' + ' Dim provider As CodeDomProvider - - ' Check for a provider corresponding to the input language. + + ' Check for a provider corresponding to the input language. If CodeDomProvider.IsDefinedLanguage(language) Then provider = CodeDomProvider.CreateProvider(language) - + ' Display information about this language provider. Console.WriteLine("Language provider: {0}", _ provider.ToString()) @@ -195,11 +193,11 @@ Namespace CodeDomCompilerInfoSample Console.WriteLine(" Default file extension: {0}", _ provider.FileExtension) Console.WriteLine() - + ' Get the compiler settings for this language. Dim langCompilerInfo As CompilerInfo = CodeDomProvider.GetCompilerInfo(language) Dim langCompilerConfig As CompilerParameters = langCompilerInfo.CreateDefaultCompilerParameters() - + Console.WriteLine(" Compiler options: {0}", _ langCompilerConfig.CompilerOptions) Console.WriteLine(" Compiler warning level: {0}", _ @@ -209,20 +207,20 @@ Namespace CodeDomCompilerInfoSample Console.WriteLine("There is no provider configured for input language ""{0}"".", _ language) End If - ' + ' End Sub - + Shared Sub DisplayCompilerInfoForConfigLanguage(configLanguage As String) ' Dim info As CompilerInfo = CodeDomProvider.GetCompilerInfo(configLanguage) - + ' Check whether there is a provider configured for this language. If info.IsCodeDomProviderTypeValid Then ' Get a provider instance using the configured type information. Dim provider As CodeDomProvider provider = CType(Activator.CreateInstance(info.CodeDomProviderType), CodeDomProvider) - + ' Display information about this language provider. Console.WriteLine("Language provider: {0}", _ provider.ToString()) @@ -230,10 +228,10 @@ Namespace CodeDomCompilerInfoSample Console.WriteLine(" Default file extension: {0}", _ provider.FileExtension) Console.WriteLine() - + ' Get the compiler settings for this language. Dim langCompilerConfig As CompilerParameters = info.CreateDefaultCompilerParameters() - + Console.WriteLine(" Compiler options: {0}", _ langCompilerConfig.CompilerOptions) Console.WriteLine(" Compiler warning level: {0}", _ @@ -244,10 +242,10 @@ Namespace CodeDomCompilerInfoSample End If ' End Sub - - + + Shared Sub DisplayAllCompilerInfo() - ' + ' Dim allCompilerInfo As CompilerInfo() = CodeDomProvider.GetAllCompilerInfo() Dim info As CompilerInfo For Each info In allCompilerInfo @@ -256,27 +254,27 @@ Namespace CodeDomCompilerInfoSample Dim defaultExtension As String Dim provider As CodeDomProvider = info.CreateProvider() - + ' Display information about this configured provider. Console.WriteLine("Language provider: {0}", _ provider.ToString()) Console.WriteLine() - + Console.WriteLine(" Supported file extension(s):") Dim extension As String For Each extension In info.GetExtensions() Console.WriteLine(" {0}", extension) Next extension - + defaultExtension = provider.FileExtension If Not defaultExtension.StartsWith(".") Then defaultExtension = "." + defaultExtension End If - + Console.WriteLine(" Default file extension: {0}", _ defaultExtension) Console.WriteLine() - + Console.WriteLine(" Supported language(s):") Dim language As String For Each language In info.GetLanguages() @@ -286,19 +284,19 @@ Namespace CodeDomCompilerInfoSample Console.WriteLine(" Default language: {0}", _ defaultLanguage) Console.WriteLine() - + ' Get the compiler settings for this provider. Dim langCompilerConfig As CompilerParameters = info.CreateDefaultCompilerParameters() - + Console.WriteLine(" Compiler options: {0}", _ langCompilerConfig.CompilerOptions) Console.WriteLine(" Compiler warning level: {0}", _ langCompilerConfig.WarningLevel) Console.WriteLine() Next info - ' + ' End Sub End Class End Namespace 'CodeDomCompilerInfoSample -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.vb b/snippets/visualbasic/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.vb index 9c55498ecbc..82df0583fdc 100644 --- a/snippets/visualbasic/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.vb +++ b/snippets/visualbasic/System.ComponentModel/ITypeDescriptorContext/Overview/instancedescriptor.vb @@ -6,11 +6,11 @@ Imports System.Globalization Imports System.Reflection Namespace Microsoft.Samples.InstanceDescriptorSample - ' This sample shows how to support code generation for a custom type + ' This sample shows how to support code generation for a custom type ' of object using a type converter and InstanceDescriptor objects. ' - ' To use this code, copy it to a file and add the file to a project. - ' Then add a component to the project and declare a Triangle field and + ' To use this code, copy it to a file and add the file to a project. + ' Then add a component to the project and declare a Triangle field and ' a public property with accessors for the Triangle field on the component. ' ' The Triangle property will be persisted using code generation. @@ -58,8 +58,8 @@ Namespace Microsoft.Samples.InstanceDescriptorSample ' A TypeConverter for the Triangle object. Note that you can make it internal, ' private, or any scope you want and the designers will still be able to use ' it through the TypeDescriptor object. This type converter provides the - ' capability to convert to an InstanceDescriptor. This object can be used by - ' the .NET Framework to generate source code that creates an instance of a + ' capability to convert to an InstanceDescriptor. This object can be used by + ' .NET to generate source code that creates an instance of a ' Triangle object. Friend Class TriangleConverter @@ -87,9 +87,9 @@ Namespace Microsoft.Samples.InstanceDescriptorSample ' Always call base, even if you can't convert. Return MyBase.ConvertTo(context, culture, value, destinationType) - End Function - End Class - End Class + End Function + End Class + End Class Public Class TestComponent Inherits System.ComponentModel.Component @@ -112,4 +112,4 @@ Namespace Microsoft.Samples.InstanceDescriptorSample End Class End Namespace -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.vb b/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.vb index 7cbdbae6f48..30878e5558c 100644 --- a/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.vb +++ b/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/net_async.vb @@ -1,10 +1,8 @@ ' System.Diagnostics ' -' Requires .NET Framework version 1.2 or higher. -' -' The following example uses the net view command to list the -' available network resources available on a remote computer, +' The following example uses the net view command to list the +' available network resources available on a remote computer, ' and displays the results to the console. Specifying the optional ' error log file redirects error output to that file. @@ -18,7 +16,7 @@ Imports System.Threading Imports System.ComponentModel Namespace ProcessAsyncStreamSamples - + Class ProcessAsyncErrorRedirection ' Define static variables shared by class methods. Private Shared streamError As StreamWriter = Nothing @@ -26,20 +24,20 @@ Namespace ProcessAsyncStreamSamples Private Shared netOutput As StringBuilder = Nothing Private Shared errorRedirect As Boolean = False Private Shared errorsWritten As Boolean = False - + Public Shared Sub RedirectNetCommandStreams() Dim netArguments As String Dim netProcess As Process - + ' Get the input computer name. Console.WriteLine("Enter the computer name for the net view command:") netArguments = Console.ReadLine().ToUpper(CultureInfo.InvariantCulture) If String.IsNullOrEmpty(netArguments) Then - ' Default to the help command if there is + ' Default to the help command if there is ' not an input argument. netArguments = "/?" End If - + ' Check if errors should be redirected to a file. errorsWritten = False Console.WriteLine("Enter a fully qualified path to an error log file") @@ -48,7 +46,7 @@ Namespace ProcessAsyncStreamSamples If Not String.IsNullOrEmpty(netErrorFile) Then errorRedirect = True End If - + ' Note that at this point, netArguments and netErrorFile ' are set with user input. If the user did not specify ' an error file, then errorRedirect is set to false. @@ -56,23 +54,23 @@ Namespace ProcessAsyncStreamSamples ' Initialize the process and its StartInfo properties. netProcess = New Process() netProcess.StartInfo.FileName = "Net.exe" - + ' Build the net command argument list. netProcess.StartInfo.Arguments = String.Format("view {0}", _ netArguments) - + ' Set UseShellExecute to false for redirection. netProcess.StartInfo.UseShellExecute = False - - ' Redirect the standard output of the net command. + + ' Redirect the standard output of the net command. ' Read the stream asynchronously using an event handler. netProcess.StartInfo.RedirectStandardOutput = True AddHandler netProcess.OutputDataReceived, _ AddressOf NetOutputDataHandler netOutput = new StringBuilder() - + If errorRedirect Then - ' Redirect the error output of the net command. + ' Redirect the error output of the net command. netProcess.StartInfo.RedirectStandardError = True AddHandler netProcess.ErrorDataReceived, _ AddressOf NetErrorDataHandler @@ -80,39 +78,39 @@ Namespace ProcessAsyncStreamSamples ' Do not redirect the error output. netProcess.StartInfo.RedirectStandardError = False End If - + Console.WriteLine(ControlChars.Lf + "Starting process: NET {0}", _ netProcess.StartInfo.Arguments) If errorRedirect Then Console.WriteLine("Errors will be written to the file {0}", _ netErrorFile) End If - + ' Start the process. netProcess.Start() - + ' Start the asynchronous read of the standard output stream. netProcess.BeginOutputReadLine() - + If errorRedirect Then ' Start the asynchronous read of the standard ' error stream. netProcess.BeginErrorReadLine() End If - + ' Let the net command run, collecting the output. netProcess.WaitForExit() - + If Not streamError Is Nothing Then ' Close the error file. streamError.Close() - Else + Else ' Set errorsWritten to false if the stream is not ' open. Either there are no errors, or the error ' file could not be opened. errorsWritten = False End If - + If netOutput.Length > 0 Then ' If the process wrote more than just ' white space, write the output to the console. @@ -122,9 +120,9 @@ Namespace ProcessAsyncStreamSamples Console.WriteLine(netOutput) Console.WriteLine() End If - + If errorsWritten Then - ' Signal that the error file had something + ' Signal that the error file had something ' written to it. Dim errorOutput As String() errorOutput = File.ReadAllLines(netErrorFile) @@ -137,15 +135,15 @@ Namespace ProcessAsyncStreamSamples For Each errLine in errorOutput Console.WriteLine(" {0}", errLine) Next - + Console.WriteLine() End If End If - + netProcess.Close() - End Sub - - + End Sub + + Private Shared Sub NetOutputDataHandler(sendingProcess As Object, _ outLine As DataReceivedEventArgs) @@ -154,9 +152,9 @@ Namespace ProcessAsyncStreamSamples ' Add the text to the collected output. netOutput.Append(Environment.NewLine + " " + outLine.Data) End If - End Sub - - + End Sub + + Private Shared Sub NetErrorDataHandler(sendingProcess As Object, _ errLine As DataReceivedEventArgs) @@ -168,7 +166,7 @@ Namespace ProcessAsyncStreamSamples If Not errorsWritten Then If streamError Is Nothing Then ' Open the file. - Try + Try streamError = New StreamWriter(netErrorFile, true) Catch e As Exception Console.WriteLine("Could not open error file!") @@ -188,28 +186,28 @@ Namespace ProcessAsyncStreamSamples errorsWritten = True End If - + If Not streamError Is Nothing Then - + ' Write redirected errors to the file. streamError.WriteLine(errLine.Data) streamError.Flush() End If End If - End Sub - End Class -End Namespace + End Sub + End Class +End Namespace ' Namespace ProcessAsyncStreamSamples - + Class ProcessSampleMain ' The main entry point for the application. Shared Sub Main() Try ProcessAsyncErrorRedirection.RedirectNetCommandStreams() - + Catch e As InvalidOperationException Console.WriteLine("Exception:") Console.WriteLine(e.ToString()) diff --git a/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.vb b/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.vb index ba87fb1f0fe..2b8c0530d62 100644 --- a/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.vb +++ b/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/nmake_async.vb @@ -1,7 +1,4 @@ ' System.Diagnostics -' -' Requires .NET Framework version 1.2 or higher. -' ' ' Define the namespaces used by this sample. @@ -18,12 +15,12 @@ Class ProcessNMakeStreamRedirection Private Shared logMutex As Mutex = New Mutex() Private Shared maxLogLines As Integer = 25 Private Shared currentLogLines As Integer = 0 - - + + Public Shared Sub RedirectNMakeCommandStreams() Dim nmakeArguments As String = Nothing Dim nmakeProcess As Process - + ' Get the input nmake command-line arguments. Console.WriteLine("Enter the NMake command line arguments" + _ " (@commandfile or /f makefile, etc):") @@ -31,7 +28,7 @@ Class ProcessNMakeStreamRedirection If Not String.IsNullOrEmpty(inputText) Then nmakeArguments = inputText End If - + Console.WriteLine("Enter max line limit for log file (default is 25):") inputText = Console.ReadLine() If Not String.IsNullOrEmpty(inputText) Then @@ -41,26 +38,26 @@ Class ProcessNMakeStreamRedirection End If Console.WriteLine("Output beyond {0} lines will be ignored.", _ maxLogLines) - + ' Initialize the process and its StartInfo properties. nmakeProcess = New Process() nmakeProcess.StartInfo.FileName = "NMake.exe" - + ' Build the nmake command argument list. If Not String.IsNullOrEmpty(nmakeArguments) Then nmakeProcess.StartInfo.Arguments = nmakeArguments End If - + ' Set UseShellExecute to false for redirection. nmakeProcess.StartInfo.UseShellExecute = False - - ' Redirect the standard output of the nmake command. + + ' Redirect the standard output of the nmake command. ' Read the stream asynchronously using an event handler. nmakeProcess.StartInfo.RedirectStandardOutput = True AddHandler nmakeProcess.OutputDataReceived, _ AddressOf NMakeOutputDataHandler - - ' Redirect the error output of the nmake command. + + ' Redirect the error output of the nmake command. nmakeProcess.StartInfo.RedirectStandardError = True AddHandler nmakeProcess.ErrorDataReceived, _ AddressOf NMakeErrorDataHandler @@ -68,10 +65,10 @@ Class ProcessNMakeStreamRedirection logMutex.WaitOne() currentLogLines = 0 - + ' Write a header to the log file. Const buildLogFile As String = "NmakeCmd.Txt" - Try + Try buildLogStream = new StreamWriter(buildLogFile, true) Catch e As Exception Console.WriteLine("Could not open output file {0}", buildLogFile) @@ -82,25 +79,25 @@ Class ProcessNMakeStreamRedirection End Try If Not buildLogStream Is Nothing Then - + Console.WriteLine("Nmake output logged to {0}", _ buildLogFile) - + buildLogStream.WriteLine() buildLogStream.WriteLine(DateTime.Now.ToString()) - + If Not String.IsNullOrEmpty(nmakeArguments) Then buildLogStream.Write("Command line = NMake {0}", _ nmakeArguments) - Else + Else buildLogStream.Write("Command line = Nmake") End If - + buildLogStream.WriteLine() buildLogStream.Flush() - + logMutex.ReleaseMutex() - + ' Start the process. Console.WriteLine() Console.WriteLine("\nStarting Nmake command...") @@ -112,7 +109,7 @@ Class ProcessNMakeStreamRedirection ' Start the asynchronous read of the output stream. nmakeProcess.BeginOutputReadLine() - + ' Let the nmake command run, collecting the output. nmakeProcess.WaitForExit() @@ -120,12 +117,12 @@ Class ProcessNMakeStreamRedirection buildLogStream.Close() logMutex.Dispose() End If - End Sub - + End Sub + Private Shared Sub NMakeOutputDataHandler(sendingProcess As Object, _ outLine As DataReceivedEventArgs) - ' Collect the output, displaying it to the screen and + ' Collect the output, displaying it to the screen and ' logging it to the output file. Cancel the read ' operation when the maximum line limit is reached. @@ -134,35 +131,35 @@ Class ProcessNMakeStreamRedirection currentLogLines = currentLogLines + 1 If currentLogLines > maxLogLines Then - + ' Display the line to the console. ' Skip writing the line to the log file. Console.WriteLine("StdOut: {0}", outLine.Data) Else If currentLogLines = maxLogLines Then - + LogToFile("StdOut", "", _ true) - + ' Stop reading the output streams. - Dim p As Process = sendingProcess + Dim p As Process = sendingProcess If Not (p Is Nothing) Then p.CancelOutputRead() p.CancelErrorRead() End If - Else + Else ' Write the line to the log file. LogToFile("StdOut", outLine.Data, true) End If logMutex.ReleaseMutex() End If - - End Sub - + + End Sub + Private Shared Sub NMakeErrorDataHandler(sendingProcess As Object, _ errLine As DataReceivedEventArgs) - ' Collect the error output, displaying it to the screen and + ' Collect the error output, displaying it to the screen and ' logging it to the output file. Cancel the error output ' read operation when the maximum line limit is reached. @@ -171,31 +168,31 @@ Class ProcessNMakeStreamRedirection currentLogLines = currentLogLines + 1 If currentLogLines > maxLogLines Then - + ' Display the line to the console. ' Skip writing the line to the log file. Console.WriteLine("StdErr: {0}", errLine.Data) Else If currentLogLines = maxLogLines Then - + LogToFile("StdErr", "", _ true) - + ' Stop reading the output streams. - Dim p As Process = sendingProcess + Dim p As Process = sendingProcess If Not (p Is Nothing) Then p.CancelOutputRead() p.CancelErrorRead() End If - Else + Else ' Write the line to the log file. LogToFile("StdErr", errLine.Data, true) End If logMutex.ReleaseMutex() End If - + End Sub - + Private Shared Sub LogToFile(logPrefix As String, _ logText As String, _ echoToConsole As String) @@ -212,29 +209,29 @@ Class ProcessNMakeStreamRedirection End If If Not buildLogStream Is Nothing Then - + buildLogStream.WriteLine("[{0}] {1}", _ DateTime.Now.ToString(), logString.ToString()) buildLogStream.Flush() End If - + If echoToConsole Then Console.WriteLine(logString.ToString()) End If - - End Sub -End Class + + End Sub +End Class ' Namespace ProcessAsyncStreamSamples - + Class ProcessSampleMain ' The main entry point for the application. Shared Sub Main() Try ProcessNMakeStreamRedirection.RedirectNMakeCommandStreams() - + Catch e As InvalidOperationException Console.WriteLine("Exception:") Console.WriteLine(e.ToString()) diff --git a/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.vb b/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.vb index 6d6cb32fe3a..0143c24bc3a 100644 --- a/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.vb +++ b/snippets/visualbasic/System.Diagnostics/DataReceivedEventArgs/Overview/sort_async.vb @@ -1,11 +1,7 @@ ' System.Diagnostics -' -' Requires .NET Framework version 1.2 or higher. -' ' The following example uses the sort command to sort a list -' of input text lines, and displays the sorted list to the console. - +' of input text lines, and displays the sorted list to the console. ' ' Define the namespaces used by this sample. @@ -33,7 +29,7 @@ Namespace ProcessAsyncStreamSamples ' Set UseShellExecute to false for redirection. sortProcess.StartInfo.UseShellExecute = False - ' Redirect the standard output of the sort command. + ' Redirect the standard output of the sort command. ' Read the stream asynchronously using an event handler. sortProcess.StartInfo.RedirectStandardOutput = True sortOutput = New StringBuilder() @@ -54,7 +50,7 @@ Namespace ProcessAsyncStreamSamples ' Start the asynchronous read of the sort output stream. sortProcess.BeginOutputReadLine() - ' Prompt the user for input text lines. Write each + ' Prompt the user for input text lines. Write each ' line to the redirected input stream of the sort command. Console.WriteLine("Ready to sort up to 50 lines of text") diff --git a/snippets/visualbasic/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.vb b/snippets/visualbasic/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.vb index 10d163b87f4..70e45180977 100644 --- a/snippets/visualbasic/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.vb +++ b/snippets/visualbasic/System.Globalization/CultureInfo/CreateSpecificCulture/createspecificculture2.vb @@ -11,11 +11,11 @@ Public Class Example ' Display the header. Console.WriteLine("{0,-53}{1}", "CULTURE", "SPECIFIC CULTURE") - ' Get each neutral culture in the .NET Framework. + ' Get each neutral culture in .NET. Dim cultures() As CultureInfo = CultureInfo.GetCultures(CultureTypes.NeutralCultures) ' Sort the returned array by name. Array.Sort(Of CultureInfo)(cultures, New NamePropertyComparer(Of CultureInfo)()) - + ' Determine the specific culture associated with each neutral culture. For Each culture As CultureInfo In cultures Console.Write("{0,-12} {1,-40}", culture.Name, culture.EnglishName) @@ -24,7 +24,7 @@ Public Class Example Catch e As ArgumentException Console.WriteLine("(no associated specific culture)") End Try - Next + Next End Sub End Class @@ -37,15 +37,15 @@ Public Class NamePropertyComparer(Of T) : Implements IComparer(Of T) Else Return -1 End If - End If + End If Dim pX As PropertyInfo = x.GetType().GetProperty("Name") - Dim pY As PropertyInfo = y.GetType().GetProperty("Name") + Dim pY As PropertyInfo = y.GetType().GetProperty("Name") Return String.Compare(CStr(pX.GetValue(x, Nothing)), CStr(pY.GetValue(y, Nothing))) End Function End Class ' The example displays the following output on a Windows system. This output has been cropped for brevity. ' CULTURE SPECIFIC CULTURE - Invariant Language (Invariant Country) + Invariant Language (Invariant Country) ' aa Afar aa-ET ' af Afrikaans af-ZA ' agq Aghem agq-CM diff --git a/snippets/visualbasic/System.Globalization/PersianCalendar/Overview/calendar2.vb b/snippets/visualbasic/System.Globalization/PersianCalendar/Overview/calendar2.vb index cc9800396fc..20ae61f2a73 100644 --- a/snippets/visualbasic/System.Globalization/PersianCalendar/Overview/calendar2.vb +++ b/snippets/visualbasic/System.Globalization/PersianCalendar/Overview/calendar2.vb @@ -6,104 +6,90 @@ Module Example Dim pc As New PersianCalendar() Dim thisDate As Date = Date.Now - ' Display the current date using the Gregorian and Persian calendars. + ' Display the current date using the Gregorian and Persian calendars. Console.WriteLine("Today in the Gregorian Calendar: {0:dddd}, {0}", thisDate) - Console.WriteLine("Today in the Persian Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}", + Console.WriteLine("Today in the Persian Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}", pc.GetDayOfWeek(thisDate), pc.GetMonth(thisDate), - pc.GetDayOfMonth(thisDate), + pc.GetDayOfMonth(thisDate), pc.GetYear(thisDate), pc.GetHour(thisDate), pc.GetMinute(thisDate), pc.GetSecond(thisDate)) Console.WriteLine() - + ' Create a date using the Gregorian calendar. thisDate = New DateTime(2013, 5, 28, 10, 35, 0) Console.WriteLine("Gregorian Calendar: {0:D} ", thisDate) - Console.WriteLine("Persian Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}", + Console.WriteLine("Persian Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}", pc.GetDayOfWeek(thisDate), pc.GetMonth(thisDate), - pc.GetDayOfMonth(thisDate), + pc.GetDayOfMonth(thisDate), pc.GetYear(thisDate), pc.GetHour(thisDate), pc.GetMinute(thisDate), pc.GetSecond(thisDate)) Console.WriteLine() - + ' Create a date using the Persian calendar. thisDate = pc.ToDateTime(1395, 4, 22, 12, 30, 0, 0) Console.WriteLine("Gregorian Calendar: {0:D} ", thisDate) - Console.WriteLine("Persian Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}", + Console.WriteLine("Persian Calendar: {0}, {1}/{2}/{3} {4}:{5}:{6}", pc.GetDayOfWeek(thisDate), pc.GetMonth(thisDate), - pc.GetDayOfMonth(thisDate), + pc.GetDayOfMonth(thisDate), pc.GetYear(thisDate), pc.GetHour(thisDate), pc.GetMinute(thisDate), pc.GetSecond(thisDate)) Console.WriteLine() - + ' Show the Persian Calendar date range. - Console.WriteLine("Minimum Persian Calendar date (Gregorian Calendar): {0:D} ", + Console.WriteLine("Minimum Persian Calendar date (Gregorian Calendar): {0:D} ", pc.MinSupportedDateTime) - Console.WriteLine("Minimum Persian Calendar date (Persian Calendar): " + - "{0}, {1}/{2}/{3} {4}:{5}:{6}", - pc.GetDayOfWeek(pc.MinSupportedDateTime), - pc.GetMonth(pc.MinSupportedDateTime), - pc.GetDayOfMonth(pc.MinSupportedDateTime), - pc.GetYear(pc.MinSupportedDateTime), - pc.GetHour(pc.MinSupportedDateTime), - pc.GetMinute(pc.MinSupportedDateTime), + Console.WriteLine("Minimum Persian Calendar date (Persian Calendar): " + + "{0}, {1}/{2}/{3} {4}:{5}:{6}", + pc.GetDayOfWeek(pc.MinSupportedDateTime), + pc.GetMonth(pc.MinSupportedDateTime), + pc.GetDayOfMonth(pc.MinSupportedDateTime), + pc.GetYear(pc.MinSupportedDateTime), + pc.GetHour(pc.MinSupportedDateTime), + pc.GetMinute(pc.MinSupportedDateTime), pc.GetSecond(pc.MinSupportedDateTime)) Console.WriteLine() - - Console.WriteLine("Maximum Persian Calendar date (Gregorian Calendar): {0:D} ", + + Console.WriteLine("Maximum Persian Calendar date (Gregorian Calendar): {0:D} ", pc.MaxSupportedDateTime) - Console.WriteLine("Maximum Persian Calendar date (Persian Calendar): " + - "{0}, {1}/{2}/{3} {4}:{5}:{6}", - pc.GetDayOfWeek(pc.MaxSupportedDateTime), - pc.GetMonth(pc.MaxSupportedDateTime), - pc.GetDayOfMonth(pc.MaxSupportedDateTime), - pc.GetYear(pc.MaxSupportedDateTime), - pc.GetHour(pc.MinSupportedDateTime), - pc.GetMinute(pc.MaxSupportedDateTime), + Console.WriteLine("Maximum Persian Calendar date (Persian Calendar): " + + "{0}, {1}/{2}/{3} {4}:{5}:{6}", + pc.GetDayOfWeek(pc.MaxSupportedDateTime), + pc.GetMonth(pc.MaxSupportedDateTime), + pc.GetDayOfMonth(pc.MaxSupportedDateTime), + pc.GetYear(pc.MaxSupportedDateTime), + pc.GetHour(pc.MinSupportedDateTime), + pc.GetMinute(pc.MaxSupportedDateTime), pc.GetSecond(pc.MaxSupportedDateTime)) Console.WriteLine() End Sub -End Module -' The example displays the following output when run under the .NET Framework 4.6: -' Today in the Gregorian Calendar: Monday, 2/4/2013 9:11:36 AM -' Today in the Persian Calendar: Monday, 11/16/1391 9:11:36 -' -' Gregorian Calendar: Tuesday, May 28, 2013 -' Persian Calendar: Tuesday, 3/7/1392 10:35:0 -' -' Gregorian Calendar: Tuesday, July 12, 2016 -' Persian Calendar: Tuesday, 4/22/1395 12:30:0 -' -' Minimum Persian Calendar date (Gregorian Calendar): Friday, March 22, 0622 -' Minimum Persian Calendar date (Persian Calendar): Friday, 1/1/1 0:0:0 -' -' Maximum Persian Calendar date (Gregorian Calendar): Friday, December 31, 9999 -' Maximum Persian Calendar date (Persian Calendar): Friday, 10/13/9378 0:59:59 -' -' The example displays the following output when run under versions of -' the .NET Framework before the .NET Framework 4.6: -' Today in the Gregorian Calendar: Monday, 2/4/2013 9:11:36 AM -' Today in the Persian Calendar: Monday, 11/16/1391 9:11:36 +End Module + +' The example displays output similar to the following: + +' Today in the Gregorian Calendar: Thursday, 7/30/2026 4:19:25 PM +' Today in the Persian Calendar: Thursday, 5/8/1405 16:19:25 ' -' Gregorian Calendar: Tuesday, May 28, 2013 -' Persian Calendar: Tuesday, 3/7/1392 10:35:0 +' Gregorian Calendar: Tuesday, May 28, 2013 +' Persian Calendar: Tuesday, 3/7/1392 10:35:0 ' -' Gregorian Calendar: Tuesday, July 12, 2016 -' Persian Calendar: Tuesday, 4/22/1395 12:30:0 +' Gregorian Calendar: Tuesday, July 12, 2016 +' Persian Calendar: Tuesday, 4/22/1395 12:30:0 ' -' Minimum Persian Calendar date (Gregorian Calendar): Thursday, March 21, 0622 -' Minimum Persian Calendar date (Persian Calendar): Thursday, 1/1/1 0:0:0 +' Minimum Persian Calendar date (Gregorian Calendar): Friday, March 22, 0622 +' Minimum Persian Calendar date (Persian Calendar): Friday, 1/1/1 0:0:0 ' -' Maximum Persian Calendar date (Gregorian Calendar): Friday, December 31, 9999 -' Maximum Persian Calendar date (Persian Calendar): Friday, 10/10/9378 0:59:59 +' Maximum Persian Calendar date (Gregorian Calendar): Friday, December 31, 9999 +' Maximum Persian Calendar date (Persian Calendar): Friday, 10/13/9378 0:59:59 + ' diff --git a/snippets/visualbasic/System.Globalization/TextInfo/Clone/ro.vb b/snippets/visualbasic/System.Globalization/TextInfo/Clone/ro.vb index 77710a04327..a2088bcbf71 100644 --- a/snippets/visualbasic/System.Globalization/TextInfo/Clone/ro.vb +++ b/snippets/visualbasic/System.Globalization/TextInfo/Clone/ro.vb @@ -5,39 +5,39 @@ Imports System.Globalization Class Sample - Public Shared Sub Main() - ' Get the TextInfo of a predefined culture that ships with - ' the .NET Framework. + Public Shared Sub Main() + ' Get the TextInfo of a predefined culture that ships with + ' .NET. Dim ci As New CultureInfo("en-US") Dim ti1 As TextInfo = ci.TextInfo - + ' Display whether the TextInfo is read-only or not. DisplayReadOnly("1) The original TextInfo object", ti1) Console.WriteLine() - + ' Create a clone of the original TextInfo and cast the clone to a TextInfo type. Console.WriteLine("2a) Create a clone of the original TextInfo object...") Dim ti2 As TextInfo = CType(ti1.Clone(), TextInfo) - + ' Display whether the clone is read-only. DisplayReadOnly("2b) The TextInfo clone", ti2) - + ' Set the ListSeparator property on the TextInfo clone. Console.WriteLine("2c) The original value of the clone's ListSeparator " & _ "property is ""{0}"".", ti2.ListSeparator) ti2.ListSeparator = "/" - Console.WriteLine("2d) The new value of the clone's ListSeparator " & _ + Console.WriteLine("2d) The new value of the clone's ListSeparator " & _ "property is ""{0}""." & vbCrLf, ti2.ListSeparator) - + ' Create a read-only clone of the original TextInfo. Console.WriteLine("3a) Create a read-only clone of the original TextInfo object...") Dim ti3 As TextInfo = TextInfo.ReadOnly(ti1) - + ' Display whether the read-only clone is actually read-only. DisplayReadOnly("3b) The TextInfo clone", ti3) - + ' Try to set the ListSeparator property of a read-only TextInfo object. Use the - ' IsReadOnly property again to determine whether to attempt the set operation. You + ' IsReadOnly property again to determine whether to attempt the set operation. You ' could use a try-catch block instead and catch an InvalidOperationException when ' the set operation fails, but that programming technique is inefficient. Console.WriteLine("3c) Try to set the read-only clone's LineSeparator property.") @@ -46,19 +46,19 @@ Class Sample Else ' This clause is not executed. ti3.ListSeparator = "/" - Console.WriteLine("3d) The new value of the clone's ListSeparator " & _ + Console.WriteLine("3d) The new value of the clone's ListSeparator " & _ "property is ""{0}""." & vbCrLf, ti2.ListSeparator) End If - + End Sub - + Private Shared Sub DisplayReadOnly(ByVal caption As String, ByVal ti As TextInfo) Dim middle As String If ti.IsReadOnly = True Then middle = "" - Else + Else middle = "not " - End If + End If Console.WriteLine("{0} is {1}read-only.", caption, middle) End Sub End Class @@ -78,4 +78,4 @@ End Class '3c) Try to set the read-only clone's LineSeparator property. '3d) The set operation is invalid. ' -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.vb b/snippets/visualbasic/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.vb index c6a32481dc3..d9331696926 100644 --- a/snippets/visualbasic/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.vb +++ b/snippets/visualbasic/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/example.vb @@ -6,30 +6,24 @@ Imports System.Runtime.InteropServices Module Win32 - ' The SHAutoComplete function allows you + ' The SHAutoComplete function allows you ' to add auto-compete functionality to your - ' Windows Forms text boxes. In .NET Framework - ' 1.1 and earlier, you can use SHAutoComplete. - ' Later versions have this ability built in without - ' requiring platform invoke. - ' See the MSDN documentation of the - ' SHAutoComplete function for the - ' complete set of flags. + ' Windows Forms text boxes. Public Enum SHAutoCompleteFlags SHACF_DEFAULT = &H1 SHACF_FILESYSTEM = &H1 - End Enum + End Enum - ' Use the DllImportAttribute to import the SHAutoComplete function. + ' Use the DllImportAttribute to import the SHAutoComplete function. ' Set the PreserveSig to false to specify exception errors. _ Public Sub SHAutoComplete(ByVal hwndEdit As IntPtr, ByVal dwFlags As SHAutoCompleteFlags) End Sub - ' Use the DllImportAttribute to import the SHAutoComplete function. + ' Use the DllImportAttribute to import the SHAutoComplete function. ' Use the default value of the PreserveSig field to specify HRESULT errors. _ Public Function SHAutoCompleteHRESULT(ByVal hwndEdit As IntPtr, ByVal dwFlags As SHAutoCompleteFlags) As Integer @@ -49,9 +43,9 @@ Module Program Sub Run() ' Create a null (nothing in Visual Basic) IntPtr ' to pass to the SHAutoComplete method. Doing so - ' creates a failure and demonstrates the two ways - ' that the PreserveSig property allows you to handle - ' failures. + ' creates a failure and demonstrates the two ways + ' that the PreserveSig property allows you to handle + ' failures. ' Normally, you would pass a handle to a managed ' Windows Forms text box. Dim iPtr As New IntPtr(0) @@ -74,4 +68,4 @@ Module Program End Sub End Module -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.vb b/snippets/visualbasic/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.vb index 8094e36924a..7fb41f89a87 100644 --- a/snippets/visualbasic/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.vb +++ b/snippets/visualbasic/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/marshalas.sizeparamindex.vb @@ -6,8 +6,8 @@ Imports SomeNamespace Namespace SomeNamespace ' Force the layout of your fields to the C style struct layout. - ' Without this, the .NET Framework will reorder your fields. - + ' Without this, .NET will reorder your fields. + _ Structure Vertex Dim x As Decimal @@ -22,7 +22,7 @@ Namespace SomeNamespace Declare Auto Sub SomeUnsafeMethod Lib "somelib.dll" ( _ data() As Vertex, _ - size As Long ) + size As Long ) Public Sub SomeMethod() Dim verts(3) As Vertex diff --git a/snippets/visualbasic/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.vb b/snippets/visualbasic/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.vb index 10aacbbc053..6fcb9c67e6e 100644 --- a/snippets/visualbasic/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.vb +++ b/snippets/visualbasic/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.vb @@ -8,46 +8,52 @@ Module Example TestForEquality() TestForInequality() End Sub - + Private Sub TestForEquality() ' - Dim supportedVer1 As New FrameworkName(".NET Framework, Version=4.0") - Dim actualVersion As New FrameworkName(String.Format(".NET Framework, Version={0}", - Environment.Version.ToString())) - - Console.WriteLine("Supported Version: {0}", supportedVer1) - Console.WriteLine("Actual Version: {0}", actualVersion) - If supportedVer1 = actualVersion Then - Console.WriteLine("The supported and actual Framework versions are the same.") + Dim version As New FrameworkName(".NET, Version=10.0") + Dim actualVersion As New FrameworkName($".NET, Version={Environment.Version}") + + Console.WriteLine($"Given Version: {version}") + Console.WriteLine($"Actual Version: {actualVersion}") + If version = actualVersion Then + Console.WriteLine("The versions are the same.") Else - Console.WriteLine("The supported and actual Framework versions are different.") - End If + Console.WriteLine("The versions are different.") + End If + Console.WriteLine() - ' The example displays the following output: - ' Supported Version: .NET Framework,Version=v4.0 - ' Actual Version: .NET Framework,Version=v4.0.30319.18010 - ' The supported and actual Framework versions are different. - ' + + ' The example displays output similar to the following: + + ' Given Version: .NET,Version=v10.0 + ' Actual Version: .NET,Version=v10.0.10 + ' The versions are different. + + ' End Sub - + Private Sub TestForInequality() ' - Dim supportedVer1 As New FrameworkName(".NET Framework, Version=4.0") - Dim actualVersion As New FrameworkName(String.Format(".NET Framework, Version={0}", - Environment.Version.ToString())) - - Console.WriteLine("Supported Version: {0}", supportedVer1) - Console.WriteLine("Actual Version: {0}", actualVersion) - If supportedVer1 <> actualVersion Then - Console.WriteLine("The supported and actual Framework versions are different.") + Dim version As New FrameworkName(".NET, Version=10.0") + Dim actualVersion As New FrameworkName($".NET, Version={Environment.Version}") + + Console.WriteLine($"Given Version: {version}") + Console.WriteLine($"Actual Version: {actualVersion}") + If version <> actualVersion Then + Console.WriteLine("The versions are different.") Else - Console.WriteLine("The supported and actual Framework versions are the same.") - End If + Console.WriteLine("The versions are the same.") + End If + Console.WriteLine() - ' The example displays the following output: - ' Supported Version: .NET Framework,Version=v4.0 - ' Actual Version: .NET Framework,Version=v4.0.30319.18010 - ' The supported and actual Framework versions are different. + + ' The example displays output similar to the following: + + ' Given Version: .NET,Version=v10.0 + ' Actual Version: .NET,Version=v10.0.10 + ' The versions are different. + ' End Sub End Module diff --git a/snippets/visualbasic/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.vb b/snippets/visualbasic/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.vb index 582577243fb..ef65a22b56a 100644 --- a/snippets/visualbasic/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.vb +++ b/snippets/visualbasic/System.ServiceProcess/SessionChangeDescription/Overview/simpleservice.vb @@ -113,7 +113,7 @@ Public Class SimpleService SetServiceStatus(handle, myServiceStatus) System.Diagnostics.EventLog.WriteEntry("SimpleService", "Starting SimpleService") - ' Get arguments from the ImagePath string value for the service's registry + ' Get arguments from the ImagePath string value for the service's registry ' key (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SimpleService). ' These arguments are not used by this sample, this code is only intended to ' demonstrate how to obtain the arguments. @@ -143,7 +143,6 @@ Public Class SimpleService ' ' Stop this service. Protected Overrides Sub OnStop() - ' New in .NET Framework version 2.0. Me.RequestAdditionalTime(4000) ' Signal the worker thread to exit. If Not (workerThread Is Nothing) AndAlso workerThread.IsAlive Then @@ -299,8 +298,8 @@ Public Class SimpleService End Sub ' - ' Define a simple method that runs as the worker thread for - ' the service. + ' Define a simple method that runs as the worker thread for + ' the service. Public Sub ServiceWorkerMethod() #If LOGEVENTS Then System.Diagnostics.EventLog.WriteEntry("SimpleService.WorkerThread", DateTime.Now.ToLongTimeString() + " - Starting the service worker thread.") @@ -319,7 +318,7 @@ Public Class SimpleService Catch ' Another thread has signalled that this worker ' thread must terminate. Typically, this occurs when - ' the main service thread receives a service stop + ' the main service thread receives a service stop ' command. ' Write a trace line indicating that the worker thread ' is exiting. Notice that this simple thread does @@ -335,4 +334,4 @@ Public Class SimpleService End Sub End Class -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System.Text/EncodingInfo/Overview/encodinginfo.vb b/snippets/visualbasic/System.Text/EncodingInfo/Overview/encodinginfo.vb index 508916ce403..ca380322f9b 100644 --- a/snippets/visualbasic/System.Text/EncodingInfo/Overview/encodinginfo.vb +++ b/snippets/visualbasic/System.Text/EncodingInfo/Overview/encodinginfo.vb @@ -24,21 +24,21 @@ Public Class SamplesEncoding Console.Write(" ") Else Console.Write("*** ") - End If + End If Console.Write("{0,-25}", ei.Name) If ei.CodePage = e.CodePage Then Console.Write(" ") Else Console.Write("*** ") - End If + End If Console.Write("{0,-25}", ei.DisplayName) If ei.CodePage = e.CodePage Then Console.Write(" ") Else Console.Write("*** ") - End If + End If Console.WriteLine() Next ei @@ -46,159 +46,16 @@ Public Class SamplesEncoding End Class -' The example displays the following output when run on .NET Core: +' The example displays the following output: ' ' Info.CodePage Info.Name Info.DisplayName -' 1200 utf-16 Unicode -' 1201 utf-16BE Unicode (Big-Endian) -' 12000 utf-32 Unicode (UTF-32) -' 12001 utf-32BE Unicode (UTF-32 Big-Endian) -' 20127 us-ascii US-ASCII -' 28591 iso-8859-1 Western European (ISO) -' 65000 utf-7 Unicode (UTF-7) -' 65001 utf-8 Unicode (UTF-8) -' -' The example displays the following output when run on the .NET Framework: -' -' Info.CodePage Info.Name Info.DisplayName -' 37 IBM037 IBM EBCDIC (US-Canada) -' 437 IBM437 OEM United States -' 500 IBM500 IBM EBCDIC (International) -' 708 ASMO-708 Arabic (ASMO 708) -' 720 DOS-720 Arabic (DOS) -' 737 ibm737 Greek (DOS) -' 775 ibm775 Baltic (DOS) -' 850 ibm850 Western European (DOS) -' 852 ibm852 Central European (DOS) -' 855 IBM855 OEM Cyrillic -' 857 ibm857 Turkish (DOS) -' 858 IBM00858 OEM Multilingual Latin I -' 860 IBM860 Portuguese (DOS) -' 861 ibm861 Icelandic (DOS) -' 862 DOS-862 Hebrew (DOS) -' 863 IBM863 French Canadian (DOS) -' 864 IBM864 Arabic (864) -' 865 IBM865 Nordic (DOS) -' 866 cp866 Cyrillic (DOS) -' 869 ibm869 Greek, Modern (DOS) -' 870 IBM870 IBM EBCDIC (Multilingual Latin-2) -' 874 windows-874 Thai (Windows) -' 875 cp875 IBM EBCDIC (Greek Modern) -' 932 shift_jis Japanese (Shift-JIS) -' 936 gb2312 Chinese Simplified (GB2312) -' 949 ks_c_5601-1987 Korean -' 950 big5 Chinese Traditional (Big5) -' 1026 IBM1026 IBM EBCDIC (Turkish Latin-5) -' 1047 IBM01047 IBM Latin-1 -' 1140 IBM01140 IBM EBCDIC (US-Canada-Euro) -' 1141 IBM01141 IBM EBCDIC (Germany-Euro) -' 1142 IBM01142 IBM EBCDIC (Denmark-Norway-Euro) -' 1143 IBM01143 IBM EBCDIC (Finland-Sweden-Euro) -' 1144 IBM01144 IBM EBCDIC (Italy-Euro) -' 1145 IBM01145 IBM EBCDIC (Spain-Euro) -' 1146 IBM01146 IBM EBCDIC (UK-Euro) -' 1147 IBM01147 IBM EBCDIC (France-Euro) -' 1148 IBM01148 IBM EBCDIC (International-Euro) -' 1149 IBM01149 IBM EBCDIC (Icelandic-Euro) -' 1200 utf-16 Unicode -' 1201 utf-16BE Unicode (Big-Endian) -' 1250 windows-1250 Central European (Windows) -' 1251 windows-1251 Cyrillic (Windows) -' 1252 Windows-1252 Western European (Windows) -' 1253 windows-1253 Greek (Windows) -' 1254 windows-1254 Turkish (Windows) -' 1255 windows-1255 Hebrew (Windows) -' 1256 windows-1256 Arabic (Windows) -' 1257 windows-1257 Baltic (Windows) -' 1258 windows-1258 Vietnamese (Windows) -' 1361 Johab Korean (Johab) -' 10000 macintosh Western European (Mac) -' 10001 x-mac-japanese Japanese (Mac) -' 10002 x-mac-chinesetrad Chinese Traditional (Mac) -' 10003 x-mac-korean Korean (Mac) -' 10004 x-mac-arabic Arabic (Mac) -' 10005 x-mac-hebrew Hebrew (Mac) -' 10006 x-mac-greek Greek (Mac) -' 10007 x-mac-cyrillic Cyrillic (Mac) -' 10008 x-mac-chinesesimp Chinese Simplified (Mac) -' 10010 x-mac-romanian Romanian (Mac) -' 10017 x-mac-ukrainian Ukrainian (Mac) -' 10021 x-mac-thai Thai (Mac) -' 10029 x-mac-ce Central European (Mac) -' 10079 x-mac-icelandic Icelandic (Mac) -' 10081 x-mac-turkish Turkish (Mac) -' 10082 x-mac-croatian Croatian (Mac) -' 12000 utf-32 Unicode (UTF-32) -' 12001 utf-32BE Unicode (UTF-32 Big-Endian) -' 20000 x-Chinese-CNS Chinese Traditional (CNS) -' 20001 x-cp20001 TCA Taiwan -' 20002 x-Chinese-Eten Chinese Traditional (Eten) -' 20003 x-cp20003 IBM5550 Taiwan -' 20004 x-cp20004 TeleText Taiwan -' 20005 x-cp20005 Wang Taiwan -' 20105 x-IA5 Western European (IA5) -' 20106 x-IA5-German German (IA5) -' 20107 x-IA5-Swedish Swedish (IA5) -' 20108 x-IA5-Norwegian Norwegian (IA5) -' 20127 us-ascii US-ASCII -' 20261 x-cp20261 T.61 -' 20269 x-cp20269 ISO-6937 -' 20273 IBM273 IBM EBCDIC (Germany) -' 20277 IBM277 IBM EBCDIC (Denmark-Norway) -' 20278 IBM278 IBM EBCDIC (Finland-Sweden) -' 20280 IBM280 IBM EBCDIC (Italy) -' 20284 IBM284 IBM EBCDIC (Spain) -' 20285 IBM285 IBM EBCDIC (UK) -' 20290 IBM290 IBM EBCDIC (Japanese katakana) -' 20297 IBM297 IBM EBCDIC (France) -' 20420 IBM420 IBM EBCDIC (Arabic) -' 20423 IBM423 IBM EBCDIC (Greek) -' 20424 IBM424 IBM EBCDIC (Hebrew) -' 20833 x-EBCDIC-KoreanExtended IBM EBCDIC (Korean Extended) -' 20838 IBM-Thai IBM EBCDIC (Thai) -' 20866 koi8-r Cyrillic (KOI8-R) -' 20871 IBM871 IBM EBCDIC (Icelandic) -' 20880 IBM880 IBM EBCDIC (Cyrillic Russian) -' 20905 IBM905 IBM EBCDIC (Turkish) -' 20924 IBM00924 IBM Latin-1 -' 20932 EUC-JP Japanese (JIS 0208-1990 and 0212-1990) -' 20936 x-cp20936 Chinese Simplified (GB2312-80) -' 20949 x-cp20949 Korean Wansung -' 21025 cp1025 IBM EBCDIC (Cyrillic Serbian-Bulgarian) -' 21866 koi8-u Cyrillic (KOI8-U) -' 28591 iso-8859-1 Western European (ISO) -' 28592 iso-8859-2 Central European (ISO) -' 28593 iso-8859-3 Latin 3 (ISO) -' 28594 iso-8859-4 Baltic (ISO) -' 28595 iso-8859-5 Cyrillic (ISO) -' 28596 iso-8859-6 Arabic (ISO) -' 28597 iso-8859-7 Greek (ISO) -' 28598 iso-8859-8 Hebrew (ISO-Visual) -' 28599 iso-8859-9 Turkish (ISO) -' 28603 iso-8859-13 Estonian (ISO) -' 28605 iso-8859-15 Latin 9 (ISO) -' 29001 x-Europa Europa -' 38598 iso-8859-8-i Hebrew (ISO-Logical) -' 50220 iso-2022-jp Japanese (JIS) -' 50221 csISO2022JP Japanese (JIS-Allow 1 byte Kana) -' 50222 iso-2022-jp Japanese (JIS-Allow 1 byte Kana - SO/SI) -' 50225 iso-2022-kr Korean (ISO) -' 50227 x-cp50227 Chinese Simplified (ISO-2022) -' 51932 euc-jp Japanese (EUC) -' 51936 EUC-CN Chinese Simplified (EUC) -' 51949 euc-kr Korean (EUC) -' 52936 hz-gb-2312 Chinese Simplified (HZ) -' 54936 GB18030 Chinese Simplified (GB18030) -' 57002 x-iscii-de ISCII Devanagari -' 57003 x-iscii-be ISCII Bengali -' 57004 x-iscii-ta ISCII Tamil -' 57005 x-iscii-te ISCII Telugu -' 57006 x-iscii-as ISCII Assamese -' 57007 x-iscii-or ISCII Oriya -' 57008 x-iscii-ka ISCII Kannada -' 57009 x-iscii-ma ISCII Malayalam -' 57010 x-iscii-gu ISCII Gujarati -' 57011 x-iscii-pa ISCII Punjabi -' 65000 utf-7 Unicode (UTF-7) -' 65001 utf-8 Unicode (UTF-8) -' \ No newline at end of file +' 1200 utf-16 Unicode +' 1201 utf-16BE Unicode (Big-Endian) +' 12000 utf-32 Unicode (UTF-32) +' 12001 utf-32BE Unicode (UTF-32 Big-Endian) +' 20127 us-ascii US-ASCII +' 28591 iso-8859-1 Western European (ISO) +' 65000 utf-7 Unicode (UTF-7) +' 65001 utf-8 Unicode (UTF-8) + +' diff --git a/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb b/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb index ec8fcad704e..2ee81c2de5e 100644 --- a/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb +++ b/snippets/visualbasic/System.Text/StringBuilder/Capacity/cap.vb @@ -9,57 +9,57 @@ Class Sample Public Shared Sub Main() Dim sb1 As New StringBuilder("abc") Dim sb2 As New StringBuilder("abc", 16) - + Console.WriteLine() Console.WriteLine("a1) sb1.Length = {0}, sb1.Capacity = {1}", sb1.Length, sb1.Capacity) Console.WriteLine("a2) sb2.Length = {0}, sb2.Capacity = {1}", sb2.Length, sb2.Capacity) Console.WriteLine("a3) sb1.ToString() = ""{0}"", sb2.ToString() = ""{1}""", _ sb1.ToString(), sb2.ToString()) Console.WriteLine("a4) sb1 equals sb2: {0}", sb1.Equals(sb2)) - + Console.WriteLine() Console.WriteLine("Ensure sb1 has a capacity of at least 50 characters.") sb1.EnsureCapacity(50) - + Console.WriteLine() Console.WriteLine("b1) sb1.Length = {0}, sb1.Capacity = {1}", sb1.Length, sb1.Capacity) Console.WriteLine("b2) sb2.Length = {0}, sb2.Capacity = {1}", sb2.Length, sb2.Capacity) Console.WriteLine("b3) sb1.ToString() = ""{0}"", sb2.ToString() = ""{1}""", _ sb1.ToString(), sb2.ToString()) Console.WriteLine("b4) sb1 equals sb2: {0}", sb1.Equals(sb2)) - + Console.WriteLine() Console.WriteLine("Set the length of sb1 to zero.") Console.WriteLine("Set the capacity of sb2 to 51 characters.") sb1.Length = 0 sb2.Capacity = 51 - + Console.WriteLine() Console.WriteLine("c1) sb1.Length = {0}, sb1.Capacity = {1}", sb1.Length, sb1.Capacity) Console.WriteLine("c2) sb2.Length = {0}, sb2.Capacity = {1}", sb2.Length, sb2.Capacity) Console.WriteLine("c3) sb1.ToString() = ""{0}"", sb2.ToString() = ""{1}""", _ sb1.ToString(), sb2.ToString()) Console.WriteLine("c4) sb1 equals sb2: {0}", sb1.Equals(sb2)) - End Sub + End Sub End Class 'The example displays the following output: ' a1) sb1.Length = 3, sb1.Capacity = 16 ' a2) sb2.Length = 3, sb2.Capacity = 16 ' a3) sb1.ToString() = "abc", sb2.ToString() = "abc" ' a4) sb1 equals sb2: True -' +' ' Ensure sb1 has a capacity of at least 50 characters. -' +' ' b1) sb1.Length = 3, sb1.Capacity = 50 ' b2) sb2.Length = 3, sb2.Capacity = 16 ' b3) sb1.ToString() = "abc", sb2.ToString() = "abc" -' b4) sb1 equals sb2: True (False on .NET Framework) -' +' b4) sb1 equals sb2: True +' ' Set the length of sb1 to zero. ' Set the capacity of sb2 to 51 characters. -' +' ' c1) sb1.Length = 0, sb1.Capacity = 50 ' c2) sb2.Length = 3, sb2.Capacity = 51 ' c3) sb1.ToString() = "", sb2.ToString() = "abc" ' c4) sb1 equals sb2: False -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System.Threading/SpinWait/Overview/spinwait.vb b/snippets/visualbasic/System.Threading/SpinWait/Overview/spinwait.vb index 0ce95d56c40..06649b64ed5 100644 --- a/snippets/visualbasic/System.Threading/SpinWait/Overview/spinwait.vb +++ b/snippets/visualbasic/System.Threading/SpinWait/Overview/spinwait.vb @@ -26,7 +26,7 @@ Module SpinWaitDemo sw.SpinOnce() End While - ' As of .NET Framework 4: After some initial spinning, SpinWait.SpinOnce() will yield every time. + ' After some initial spinning, SpinWait.SpinOnce() will yield every time. Console.WriteLine("SpinWait called {0} times, yielded {1} times", sw.Count, numYields) End Sub) @@ -42,4 +42,4 @@ Module SpinWaitDemo End Sub End Module -' \ No newline at end of file +' diff --git a/snippets/visualbasic/System/Console/Overview/example3.vb b/snippets/visualbasic/System/Console/Overview/example3.vb index d18c90ab074..c5cf97dab78 100644 --- a/snippets/visualbasic/System/Console/Overview/example3.vb +++ b/snippets/visualbasic/System/Console/Overview/example3.vb @@ -23,36 +23,35 @@ Public Module DisplayChars If Not UInt32.TryParse(args(0), NumberStyles.HexNumber, Nothing, rangeStart) Then Throw New ArgumentException(String.Format("{0} is not a valid hexadecimal number.", args(0))) End If - + If Not UInt32.TryParse(args(1), NumberStyles.HexNumber, Nothing, rangeEnd) Then Throw New ArgumentException(String.Format("{0} is not a valid hexadecimal number.", args(1))) End If - + Boolean.TryParse(args(2), setOutputEncodingToUnicode) Case Else - Console.WriteLine("Usage: {0} <{1}> <{2}> [{3}]", - Environment.GetCommandLineArgs()(0), - "startingCodePointInHex", - "endingCodePointInHex", + Console.WriteLine("Usage: {0} <{1}> <{2}> [{3}]", + Environment.GetCommandLineArgs()(0), + "startingCodePointInHex", + "endingCodePointInHex", "") Exit Sub End Select - + If setOutputEncodingToUnicode Then - ' This won't work before .NET Framework 4.5. - Try + Try ' Set encoding Imports endianness of this system. - ' We're interested in displaying individual Char objects, so + ' We're interested in displaying individual Char objects, so ' we don't want a Unicode BOM or exceptions to be thrown on ' invalid Char values. - Console.OutputEncoding = New UnicodeEncoding(Not BitConverter.IsLittleEndian, False) + Console.OutputEncoding = New UnicodeEncoding(Not BitConverter.IsLittleEndian, False) Console.WriteLine("{0}Output encoding set to UTF-16", vbCrLf) Catch e As IOException Console.OutputEncoding = New UTF8Encoding() Console.WriteLine("Output encoding set to UTF-8") End Try Else - Console.WriteLine("The console encoding is {0} (code page {1})", + Console.WriteLine("The console encoding is {0} (code page {1})", Console.OutputEncoding.EncodingName, Console.OutputEncoding.CodePage) End If @@ -69,7 +68,7 @@ Public Module DisplayChars Const upperRange As UInteger = &h10FFFF Const surrogateStart As UInteger = &hD800 Const surrogateEnd As UInteger = &hDFFF - + If rangeEnd <= rangeStart Then Dim t As UInteger = rangeStart rangeStart = rangeEnd @@ -79,7 +78,7 @@ Public Module DisplayChars ' Check whether the start or end range is outside of last plane. If rangeStart > upperRange Then Throw New ArgumentException(String.Format("0x{0:X5} is outside the upper range of Unicode code points (0x{1:X5})", - rangeStart, upperRange)) + rangeStart, upperRange)) End If If rangeEnd > upperRange Then Throw New ArgumentException(String.Format("0x{0:X5} is outside the upper range of Unicode code points (0x{0:X5})", @@ -87,10 +86,10 @@ Public Module DisplayChars End If ' Since we're using 21-bit code points, we can't use U+D800 to U+DFFF. If (rangeStart < surrogateStart And rangeEnd > surrogateStart) OrElse (rangeStart >= surrogateStart And rangeStart <= surrogateEnd ) - Throw New ArgumentException(String.Format("0x{0:X5}-0x{1:X5} includes the surrogate pair range 0x{2:X5}-0x{3:X5}", - rangeStart, rangeEnd, surrogateStart, surrogateEnd)) + Throw New ArgumentException(String.Format("0x{0:X5}-0x{1:X5} includes the surrogate pair range 0x{2:X5}-0x{3:X5}", + rangeStart, rangeEnd, surrogateStart, surrogateEnd)) End If - + Dim last As UInteger = RoundUpToMultipleOf(&h10, rangeEnd) Dim first As UInteger = RoundDownToMultipleOf(&h10, rangeStart) @@ -106,11 +105,11 @@ Public Module DisplayChars Console.Write(" {0} ", Convert.ToChar(&h20)) Else If rangeEnd < cur Then Console.Write(" {0} ", Convert.ToChar(&h20)) - Else + Else ' the cast to int is safe, since we know that val <= upperRange. Dim chars As String = Char.ConvertFromUtf32(CInt(cur)) ' Display a space for code points that are not valid characters. - If CharUnicodeInfo.GetUnicodeCategory(chars(0)) = + If CharUnicodeInfo.GetUnicodeCategory(chars(0)) = UnicodeCategory.OtherNotAssigned Then Console.Write(" {0} ", Convert.ToChar(&h20)) ' Display a space for code points in the private use area. @@ -120,14 +119,14 @@ Public Module DisplayChars ' Is surrogate pair a valid character? ' Note that the console will interpret the high and low surrogate ' as separate (and unrecognizable) characters. - Else If chars.Length > 1 AndAlso CharUnicodeInfo.GetUnicodeCategory(chars, 0) = + Else If chars.Length > 1 AndAlso CharUnicodeInfo.GetUnicodeCategory(chars, 0) = UnicodeCategory.OtherNotAssigned Then Console.Write(" {0} ", Convert.ToChar(&h20)) Else - Console.Write(" {0} ", chars) - End If + Console.Write(" {0} ", chars) + End If End If - + Select Case c Case 3, 11 Console.Write("-") diff --git a/snippets/visualbasic/System/Convert/ToBoolean/system.convert snippet.vb b/snippets/visualbasic/System/Convert/ToBoolean/system.convert snippet.vb index 6101a103fc3..966b06423a9 100644 --- a/snippets/visualbasic/System/Convert/ToBoolean/system.convert snippet.vb +++ b/snippets/visualbasic/System/Convert/ToBoolean/system.convert snippet.vb @@ -51,7 +51,7 @@ boolVal = System.Convert.ToBoolean(dateTime) Catch exception As System.InvalidCastException System.Console.WriteLine("Conversion from DateTime to " + _ - "Boolean is not supported by the .NET Framework.") + "Boolean is not supported by .NET.") End Try End Sub ' @@ -118,7 +118,7 @@ Catch exception As System.InvalidCastException System.Console.WriteLine( _ "Char-to-Decimal conversion is not supported " + _ - "by the .NET Framework.") + "by .NET.") End Try 'Decimal to char conversion is also not supported. @@ -127,7 +127,7 @@ Catch exception As System.InvalidCastException System.Console.WriteLine( _ "Decimal-to-Char conversion is not supported " + _ - "by the .NET Framework.") + "by .NET.") End Try End Sub ' @@ -139,7 +139,7 @@ ConvertDoubleDecimal(CDec(doubleVal)) CovertDoubleFloat(doubleVal) ConvertDoubleString(doubleVal) - End Sub + End Sub ' Public Sub ConvertDoubleBool(ByVal doubleVal As Double) @@ -187,7 +187,7 @@ doubleVal = System.Convert.ToDouble(decimalVal) System.Console.WriteLine("{0} as a Double is: {1}", _ decimalVal, doubleVal) - + ' Conversion from Double to Decimal can overflow. Try decimalVal = System.Convert.ToDecimal(doubleVal) @@ -243,7 +243,7 @@ Dim stringVal As String - ' A conversion from Double to String cannot overflow. + ' A conversion from Double to String cannot overflow. stringVal = System.Convert.ToString(doubleVal) System.Console.WriteLine("{0} as a String is: {1}", _ doubleVal, stringVal) diff --git a/snippets/visualbasic/System/Single/Overview/PrecisionList4a.vb b/snippets/visualbasic/System/Single/Overview/PrecisionList4a.vb deleted file mode 100644 index 7e9692ec3f7..00000000000 --- a/snippets/visualbasic/System/Single/Overview/PrecisionList4a.vb +++ /dev/null @@ -1,37 +0,0 @@ -' Visual Basic .NET Document -Option Strict On - -Imports System.IO - -Module Example11 - Public Sub Main() - ' - Dim sw As New StreamWriter(".\Singles.dat") - Dim values() As Single = {3.2 / 1.11, 1.0 / 3, CSng(Math.PI)} - For ctr As Integer = 0 To values.Length - 1 - sw.Write(values(ctr).ToString()) - If ctr <> values.Length - 1 Then sw.Write("|") - Next - sw.Close() - - Dim restoredValues(values.Length - 1) As Single - Dim sr As New StreamReader(".\Singles.dat") - Dim temp As String = sr.ReadToEnd() - Dim tempStrings() As String = temp.Split("|"c) - For ctr As Integer = 0 To tempStrings.Length - 1 - restoredValues(ctr) = Single.Parse(tempStrings(ctr)) - Next - - For ctr As Integer = 0 To values.Length - 1 - Console.WriteLine("{0} {2} {1}", values(ctr), - restoredValues(ctr), - If(values(ctr).Equals(restoredValues(ctr)), "=", "<>")) - Next - - ' The example displays the following output on .NET Framework: - ' 2.882883 <> 2.882883 - ' 0.3333333 <> 0.3333333 - ' 3.141593 <> 3.141593 - ' - End Sub -End Module diff --git a/snippets/visualbasic/System/Single/Overview/comparison2.vb b/snippets/visualbasic/System/Single/Overview/comparison2.vb index d56467bdaa7..3f74f29eb87 100644 --- a/snippets/visualbasic/System/Single/Overview/comparison2.vb +++ b/snippets/visualbasic/System/Single/Overview/comparison2.vb @@ -11,10 +11,9 @@ Module Example2 Console.WriteLine("{0} = {1}: {2}", value1, value2, value1.Equals(value2)) - ' The example displays the following output on .NET: + ' The example displays the following output: ' 10.201438 = 10.201439: False - ' The example displays the following output on .NET Framework: - ' 10.20144 = 10.20144: False + ' End Sub End Module diff --git a/snippets/visualbasic/System/Single/Overview/precisionlist3.vb b/snippets/visualbasic/System/Single/Overview/precisionlist3.vb index c859ea1c29a..b5f439115f5 100644 --- a/snippets/visualbasic/System/Single/Overview/precisionlist3.vb +++ b/snippets/visualbasic/System/Single/Overview/precisionlist3.vb @@ -17,9 +17,9 @@ Module PrecisionList3 End If End Sub - ' The example displays the following output on .NET: + ' The example displays the following output: + ' The sum of the values (27.650002) does not equal the total (27.65). - ' The example displays the following output on .NET Framework: - ' The sum of the values (27.65) does not equal the total (27.65). + ' End Module diff --git a/snippets/visualbasic/System/String/IndexOf/ignorable21.vb b/snippets/visualbasic/System/String/IndexOf/ignorable21.vb index f81bc9531e0..2e903c98a9c 100644 --- a/snippets/visualbasic/System/String/IndexOf/ignorable21.vb +++ b/snippets/visualbasic/System/String/IndexOf/ignorable21.vb @@ -7,22 +7,21 @@ Module Example Dim softHyphen As String = ChrW(&h00AD) Dim s1 As String = "ani" + softHyphen + "mal" Dim s2 As String = "animal" - + ' Find the index of the soft hyphen. Console.WriteLine(s1.IndexOf(softHyphen)) Console.WriteLine(s2.IndexOf(softHyphen)) - + ' Find the index of the soft hyphen followed by "n". Console.WriteLine(s1.IndexOf(softHyphen + "n")) Console.WriteLine(s2.IndexOf(softHyphen + "n")) - + ' Find the index of the soft hyphen followed by "m". Console.WriteLine(s1.IndexOf(softHyphen + "m")) Console.WriteLine(s2.IndexOf(softHyphen + "m")) End Sub End Module -' The example displays the following output -' if run under the .NET Framework 4 or later: +' The example displays the following output: ' 0 ' 0 ' 1 diff --git a/snippets/visualbasic/System/TimeSpan/Parse/parsefailure1.vb b/snippets/visualbasic/System/TimeSpan/Parse/parsefailure1.vb index 9aeb188c916..d04cd1c8e6e 100644 --- a/snippets/visualbasic/System/TimeSpan/Parse/parsefailure1.vb +++ b/snippets/visualbasic/System/TimeSpan/Parse/parsefailure1.vb @@ -13,12 +13,9 @@ Module Example Console.WriteLine("{0}: Bad Format", value) Catch e As OverflowException Console.WriteLine("{0}: Overflow", value) - End Try + End Try Next - ' Output from .NET Framework 3.5 and earlier versions: - ' 000000006 --> 6.00:00:00 - ' 12.12:12:12.12345678: Bad Format - ' Output from .NET Framework 4: + ' Output: ' 000000006: Overflow ' 12.12:12:12.12345678: Overflow ' diff --git a/snippets/visualbasic/System/Type/Assembly/type_assembly.vb b/snippets/visualbasic/System/Type/Assembly/type_assembly.vb index f14d3b68369..312b82ff816 100644 --- a/snippets/visualbasic/System/Type/Assembly/type_assembly.vb +++ b/snippets/visualbasic/System/Type/Assembly/type_assembly.vb @@ -10,9 +10,12 @@ Class Example Console.WriteLine($"Assembly qualified name:{vbCrLf} {objType.AssemblyQualifiedName}.") End Sub End Class -' The example displays the following output if run under the .NET Framework 4.5: + +' The example displays output similar to the following: +' ' Assembly full name: -' mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. +' System.Private.CoreLib, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e. ' Assembly qualified name: -' System.Array, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. +' System.Array, System.Private.CoreLib, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e. + ' diff --git a/xml/Microsoft.VisualBasic.Devices/ServerComputer.xml b/xml/Microsoft.VisualBasic.Devices/ServerComputer.xml index 45d8d3fc24b..ad49227e469 100644 --- a/xml/Microsoft.VisualBasic.Devices/ServerComputer.xml +++ b/xml/Microsoft.VisualBasic.Devices/ServerComputer.xml @@ -214,22 +214,15 @@ ## Availability by Project Type -|Project type|Available| -|------------------|---------------| -|Windows Forms Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Forms Control Library|**Yes**| -|Web Control Library|**Yes**| -|Windows Service|**Yes**| -|Web Site|**Yes**| - - - -## Examples - This example checks to determine whether the folder `C:\backup\logs` exists and checks its properties. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet23"::: +| Project type | Available | +|-------------------------------|-----------| +| Windows Forms Application | **Yes** | +| Class Library | **Yes** | +| Console Application | **Yes** | +| Windows Forms Control Library | **Yes** | +| Web Control Library | **Yes** | +| Windows Service | **Yes** | +| Web Site | **Yes** | ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml b/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml index 7b8845d1e48..4159ccaf5dd 100644 --- a/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml +++ b/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml @@ -68,13 +68,6 @@ |Read from the **MyDocuments** directory|[How to: Retrieve the Contents of the My Documents Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-retrieve-the-contents-of-the-my-documents-directory)| |Parse a file path|[How to: Parse File Paths](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-parse-file-paths)| - - -## Examples - This example checks to determine whether the folder `C:\backup\logs` exists and checks its properties. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet23"::: - ]]> @@ -230,20 +223,7 @@ When copying files within a directory, exceptions may be thrown that are caused by a specific file. When such exceptions are thrown, they are consolidated into a single exception whose `Data` property holds entries in the form of an in which the file or directory path is the key and the specific exception message is contained in the corresponding value. Use `For…Each` to enumerate through the entries. - The following table lists an example of a task involving the `My.Computer.FileSystem.CopyDirectory` method. - -|To|See| -|-|-| -|Copy a directory|[How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - - -## Examples - The following example copies the contents of directory `TestDirectory1` into `TestDirectory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet94"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. +To copy a directory, see [How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory). ]]> @@ -301,20 +281,7 @@ When copying files within a directory, exceptions may be thrown that are caused by a specific file. When such exceptions are thrown, they are consolidated into a single exception whose `Data` property holds entries in the form of an in which the file or directory path is the key and the specific exception message is contained in the corresponding value. Use `For…Each` to enumerate through the entries. - The following table lists an example of a task involving the `My.Computer.FileSystem.CopyDirectory` method. - -|To|See| -|-|-| -|Copy a directory|[How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - - -## Examples - The following example copies the contents of directory `TestDirectory1` into `TestDirectory2`, showing progress dialog and any error dialog. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet92"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. +To copy a directory, see [How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory). ]]> @@ -375,20 +342,7 @@ When copying files within a directory, exceptions may be thrown that are caused by a specific file, such as a file existing during a merge while `overwrite` is set to `False`. When such exceptions are thrown, they are consolidated into a single exception whose `Data` property holds entries in the form of an in which the file or directory path is the key and the specific exception message is contained in the corresponding value. Use `For…Each` to enumerate through the entries. - The following table lists an example of a task involving the `My.Computer.FileSystem.CopyDirectory` method. - -|To|See| -|-|-| -|Copy a directory|[How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - - -## Examples - The following example copies the contents of directory `TestDirectory1` into `TestDirectory2`, overwriting existing files. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet49"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. +To copy a directory, see [How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory). ]]> @@ -448,20 +402,7 @@ When copying files within a directory, exceptions may be thrown that are caused by a specific file. When such exceptions are thrown, they are consolidated into a single exception whose `Data` property holds entries in the form of an in which the file or directory path is the key and the specific exception message is contained in the corresponding value. Use `For…Each` to enumerate through the entries. - The following table lists an example of a task involving the `My.Computer.FileSystem.CopyDirectory` method. - -|To|See| -|-|-| -|Copy a directory|[How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - - -## Examples - The following example copies the contents of directory `TestDirectory1` into `TestDirectory2`, showing progress dialog and any error dialog, and does nothing if the user clicks **Cancel** during the operation. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet93"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. +To copy a directory, see [How to: Copy a Directory to Another Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory). ]]> @@ -827,18 +768,7 @@ ## Remarks If the directory already exists, no exception is thrown. - The following table lists an example of a task involving the `My.Computer.FileSystem.CreateDirectory` method. - -|To|See| -|-|-| -|Create a directory|[How to: Create a Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-create-a-directory)| - - - -## Examples - This example creates the directory, `NewDirectory`, in `C:\Documents and Settings\All Users\Documents`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet17"::: +To create a directory, see [How to: Create a Directory in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-create-a-directory). ]]> @@ -884,17 +814,6 @@ ## Remarks `CurrentDirectory` is a system-wide environment variable. - - -## Examples - This example returns the current directory and displays it in a message box. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet18"::: - - This example sets the current directory to `C:\TestDirectory`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet19"::: - ]]> The path is not valid. @@ -937,28 +856,7 @@ Directory to be deleted. Specifies what should be done when a directory that is to be deleted contains files or directories. Default is . Deletes a directory. - - - + To be added. The path is a zero-length string, is malformed, contains only white space, or contains invalid characters (including wildcard characters). The path is a device path (starts with \\\\.\\). is or an empty string. @@ -1010,25 +908,6 @@ ## Remarks The `showUI` and `recycle` parameters are not supported in applications that are not user interactive, such as Windows Services. - - -## Examples - The example deletes the directory `OldDirectory` only if it is empty. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet56"::: - - This example deletes the directory `OldDirectory` and all of its contents. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet57"::: - - This example deletes the directory `OldDirectory` and all of its contents, asking the user to confirm the deletion, but does not send the contents to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet58"::: - - This example deletes the directory `OldDirectory` and all of its contents, sending them to the **Recycle Bin**, but does not show the progress of the operation. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet59"::: - ]]> The path is a zero-length string, is malformed, contains only white space, or contains invalid characters (including wildcard characters). The path is a device path (starts with \\\\.\\). @@ -1085,25 +964,6 @@ ## Remarks The `showUI`, `recycle`, and `onUserCancel` parameters are not supported in applications that are not user interactive, such as Windows Services. - - -## Examples - The example deletes the directory `OldDirectory` only if it is empty. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet56"::: - - This example deletes the directory `OldDirectory` and all of its contents. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet57"::: - - This example deletes the directory `OldDirectory` and all of its contents, asking the user to confirm the deletion, but does not send the contents to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet58"::: - - This example deletes the directory `OldDirectory` and all of its contents, sending them to the **Recycle Bin**, but does not show the progress of the operation. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet59"::: - ]]> The path is a zero-length string, is malformed, contains only white space, or contains invalid characters (including wildcard characters). The path is a device path (starts with \\\\.\\). @@ -1157,27 +1017,7 @@ @@ -1231,26 +1071,7 @@ ## Remarks The `showUI` and `recycle` parameters are not supported in applications that are not user interactive, such as Windows Services. - The following table lists an example of a task involving the `My.Computer.FileSystem.DeleteFile` method. - -|To|See| -|-|-| -|To delete a file|[How to: Delete a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file)| - - - -## Examples - This example deletes the file `Test.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet3"::: - - This example deletes the file `Test.txt` and allows the user to confirm that the file should be deleted. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet4"::: - - This example deletes the file `Test.txt` and sends it to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet5"::: +To delete a file, see [How to: Delete a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file). ]]> @@ -1308,26 +1129,7 @@ ## Remarks The `showUI`, `recycle`, and `onUserCancel` parameters are not supported in applications that are not user interactive, such as Windows Services. - The following table lists an example of a task involving the `My.Computer.FileSystem.DeleteFile` method. - -|To|See| -|-|-| -|To delete a file|[How to: Delete a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file)| - - - -## Examples - This example deletes the file `Test.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet3"::: - - This example deletes the file `Test.txt` and allows the user to confirm that the file should be deleted. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet4"::: - - This example deletes the file `Test.txt` and sends it to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet5"::: +To delete a file, see [How to: Delete a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file). ]]> @@ -2165,20 +1967,7 @@ The `GetName` method ignores a slash mark occurring at the end of the path. - The following table lists an example of a task involving the `My.Computer.FileSystem.GetFileName` method. - -|To|See| -|-|-| -|Parse a file path|[How to: Parse File Paths in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-parse-file-paths)| - - - -## Examples - The following example parses a file path and returns the name of the file. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet21"::: - - Replace the path `C:\Testdirectory\Testfile` with the path you wish to parse. +To parse a file path, see [How to: Parse File Paths in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-parse-file-paths). ]]> @@ -2270,13 +2059,6 @@ ## Remarks This method can be used to create a temporary file. - - -## Examples - This example creates a temp file and returns its path. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet12"::: - ]]> @@ -2323,17 +2105,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2389,17 +2160,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2457,17 +2217,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2525,17 +2274,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2601,22 +2339,7 @@ The `MoveFile` method preserves ACEs (Access Control Entries) only when moving the file within the same volume. This includes inherited ACEs, which become direct ACEs when moved (direct ACEs take precedence over inherited ACEs). If a file is moved between volumes, ACEs will not be copied. - The following table lists an example of a task involving the `My.Computer.FileSystem.MoveFile` method. - -|To|See| -|-|-| -|Move a file|[How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: +To move a file, see [How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file). ]]> @@ -2671,22 +2394,7 @@ The `MoveFile` method preserves ACEs (Access Control Entries) only when moving the file within the same volume. This includes inherited ACEs, which become direct ACEs when moved (direct ACEs take precedence over inherited ACEs). If a file is moved between volumes, ACEs will not be copied. - The following table lists an example of a task involving the `My.Computer.FileSystem.MoveFile` method. - -|To|See| -|-|-| -|Move a file|[How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: +To move a file, see [How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file). ]]> @@ -2743,22 +2451,7 @@ The `MoveFile` method preserves ACEs (Access Control Entries) only when moving the file within the same volume. This includes inherited ACEs, which become direct ACEs when moved (direct ACEs take precedence over inherited ACEs). If a file is moved between volumes, ACEs will not be copied. - The following table lists an example of a task involving the `My.Computer.FileSystem.MoveFile` method. - -|To|See| -|-|-| -|Move a file|[How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: +To move a file, see [How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file). ]]> @@ -2815,22 +2508,7 @@ The `MoveFile` method preserves ACEs (Access Control Entries) only when moving the file within the same volume. This includes inherited ACEs, which become direct ACEs when moved (direct ACEs take precedence over inherited ACEs). If a file is moved between volumes, ACEs will not be copied. - The following table lists an example of a task involving the `My.Computer.FileSystem.MoveFile` method. - -|To|See| -|-|-| -|Move a file|[How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: +To move a file, see [How to: Move a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file). ]]> @@ -3368,18 +3046,7 @@ Do not make decisions about the contents of the file based on the name of the file. For example, the file Form1.vb may not be a Visual Basic source file. Verify all inputs before using the data in your application. - The following table lists an example of a task involving the `My.Computer.FileSystem.ReadAllBytes` method. - -|To|See| -|-|-| -|Read from a binary file|[How to: Read From Binary Files in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-binary-files)| - - - -## Examples - This example reads from the file `C:/Documents and Settings/selfportrait.jpg.` - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet33"::: +To read from a binary file, see [How to: Read From Binary Files in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-binary-files). ]]> @@ -3516,13 +3183,7 @@ Do not make decisions about the contents of the file based on the name of the file. For example, the file Form1.vb may not be a Visual Basic source file. Verify all inputs before using the data in your application. - The following table lists an example of a task involving the `My.Computer.FileSystem.ReadAllText` method. - -|To|See| -|-|-| -|Read from a text file|[How to: Read From Text Files in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-text-files)| - - +To read from a text file, see [How to: Read From Text Files in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-text-files). ## Examples This example reads the contents of `Test.txt` into a string and then displays it in a message box. @@ -3585,13 +3246,6 @@ ## Remarks This method cannot be used to move a directory; use the `MoveDirectory` method to move and rename the directory. - - -## Examples - This example renames the `Test` directory to `SecondTest`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet13"::: - ]]> @@ -3648,20 +3302,7 @@ ## Remarks This method cannot be used to move a file; use the method to move and rename the file. - The following table lists an example of a task involving the `My.Computer.FileSystem.RenameFile` method. - -|To|See| -|-|-| -|Rename a file|[How to: Rename a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file)| - - - -## Examples - This example renames the file `Test.txt` to `SecondTest.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet1"::: - - Change "`C:\Test.txt`" to the path and file name of the file that you want to rename. +To rename a file, see [How to: Rename a File in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file). ]]> @@ -3724,18 +3365,7 @@ > [!NOTE] > The `WriteAllBytes` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllBytes` method is simpler than code that uses a object. However, if you are adding data to a file using a loop, a object can provide better performance because you only have to open and close the file once. - The following table lists an example of a task involving the `My.Computer.FileSystem.WriteAllBytes` method. - -|To|See| -|-|-| -|Write to a binary file|[How to: Write to Binary Files in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-write-to-binary-files)| - - - -## Examples - This example appends the data array `CustomerData` to the file `CollectedData`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet50"::: +To write to a binary file, see [How to: Write to Binary Files in Visual Basic](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-write-to-binary-files). ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/SpecialDirectories.xml b/xml/Microsoft.VisualBasic.FileIO/SpecialDirectories.xml index 1ad6d763761..d7e53468f8a 100644 --- a/xml/Microsoft.VisualBasic.FileIO/SpecialDirectories.xml +++ b/xml/Microsoft.VisualBasic.FileIO/SpecialDirectories.xml @@ -35,38 +35,31 @@ Provides properties for accessing commonly referenced directories. - exception is thrown. - - No backslash (\\) appears at the end of the path. - - The following table lists examples of tasks involving the `My.Computer.FileSystem.SpecialDirectories` object. - -|To|See| -|-|-| -|Read from the MyDocuments directory|[How to: Retrieve the Contents of the My Documents Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-retrieve-the-contents-of-the-my-documents-directory)| - -## Availability by Project Type - -|Project type|Available| -|-|-| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|**Yes**| -|Windows Service|**Yes**| -|Web Site|**Yes**| - - - -## Examples - This example returns the `filePath` for the user's Desktop directory and displays it. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet80"::: - + exception is thrown. + + No backslash (\\) appears at the end of the path. + + The following table lists examples of tasks involving the `My.Computer.FileSystem.SpecialDirectories` object. + +|To|See| +|-|-| +|Read from the MyDocuments directory|[How to: Retrieve the Contents of the My Documents Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-retrieve-the-contents-of-the-my-documents-directory)| + +## Availability by Project Type + +| Project type | Available | +|-------------------------|-----------| +| Windows Application | **Yes** | +| Class Library | **Yes** | +| Console Application | **Yes** | +| Windows Control Library | **Yes** | +| Web Control Library | **Yes** | +| Windows Service | **Yes** | +| Web Site | **Yes** | + ]]> @@ -127,18 +120,11 @@ Gets a path name pointing to the Application Data directory for the all users. The path to the Application Data directory for the all users. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet79"::: - + Controls access to system and user environment variables. Associated enumeration: . @@ -174,18 +160,11 @@ Gets a path name pointing to the Application Data directory for the current user. The path to the Application Data directory for the current user. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet48"::: - + The path is empty, usually because the operating system does not support the directory. @@ -220,18 +199,11 @@ Gets a path name pointing to the Desktop directory. The path to the Desktop directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet60"::: - + The path is empty, usually because the operating system does not support the directory. @@ -266,18 +238,11 @@ Gets a path name pointing to the My Documents directory. The path to the My Documents directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet53"::: - + The path is empty, usually because the operating system does not support the directory. @@ -312,18 +277,11 @@ Gets a path name pointing to the My Music directory. The path to the My Music directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet26"::: - + The path is empty, usually because the operating system does not support the directory. @@ -358,18 +316,11 @@ Gets a path name pointing to the My Pictures directory. The path to the My Pictures directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet77"::: - + The path is empty, usually because the operating system does not support the directory. @@ -404,18 +355,11 @@ Gets a path pointing to the **Program Files** directory. The path to the **Program Files** directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet90"::: - + The path is empty, usually because the operating system does not support the directory. @@ -450,18 +394,11 @@ Gets a path name pointing to the Programs directory. The path to the Programs directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet61"::: - + The path is empty, usually because the operating system does not support the directory. @@ -496,18 +433,11 @@ Gets a path name pointing to the Temp directory. The path to the Temp directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet31"::: - + The path is empty, usually because the operating system does not support the directory. diff --git a/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml b/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml index a464ab35965..f6705b9843b 100644 --- a/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml +++ b/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml @@ -70,13 +70,6 @@ |Read from the **MyDocuments** directory|[How to: Retrieve the Contents of the My Documents Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-retrieve-the-contents-of-the-my-documents-directory)| |Parse a file path|[How to: Parse File Paths](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-parse-file-paths)| - - -## Examples - This example checks to determine whether the folder `C:\backup\logs` exists and checks its properties. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet23"::: - ]]> @@ -216,15 +209,6 @@ |--------|---------| |Copy a directory|[How to: Copy a Directory to Another Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - -## Examples - The following example copies the directory `TestDirectory1` into `TestDirectory2`, overwriting existing files. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet49"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -297,15 +281,6 @@ |--------|---------| |Copy a directory|[How to: Copy a Directory to Another Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - -## Examples - The following example copies the directory `TestDirectory1` into `TestDirectory2`, overwriting existing files. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet49"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -381,15 +356,6 @@ |--------|---------| |Copy a directory|[How to: Copy a Directory to Another Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - -## Examples - The following example copies the directory `TestDirectory1` into `TestDirectory2`, overwriting existing files. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet49"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -464,15 +430,6 @@ |--------|---------| |Copy a directory|[How to: Copy a Directory to Another Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-copy-a-directory-to-another-directory)| - - -## Examples - The following example copies the directory `TestDirectory1` into `TestDirectory2`, overwriting existing files. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet49"::: - - Replace `C:\TestDirectory1` and `C:\TestDirectory2` with the path and name of the directory you wish to copy and the location to which you wish to copy it. - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -906,13 +863,6 @@ |--------|---------| |Create a directory|[How to: Create a Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-create-a-directory)| - - -## Examples - This example creates the directory, `NewDirectory`, in `C:\Documents and Settings\All Users\Documents`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet17"::: - ]]> The directory name is malformed. For example, it contains illegal characters or is only white space. @@ -965,17 +915,6 @@ ## Remarks `CurrentDirectory` is a system-wide environment variable. - - -## Examples - This example returns the current directory and displays it in a message box. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet18"::: - - This example sets the current directory to `C:\TestDirectory`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet19"::: - ]]> The path is not valid. @@ -1026,28 +965,7 @@ Directory to be deleted. Specifies what should be done when a directory that is to be deleted contains files or directories. Default is . Deletes a directory. - - - + To be added. The path is a zero-length string, is malformed, contains only white space, or contains invalid characters (including wildcard characters). The path is a device path (starts with \\\\.\\). is or an empty string. @@ -1108,25 +1026,6 @@ ## Remarks The `showUI` and `recycle` parameters are not supported in applications that are not user interactive, such as Windows Services. - - -## Examples - The example deletes the directory `OldDirectory` only if it is empty. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet56"::: - - This example deletes the directory `OldDirectory` and all of its contents. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet57"::: - - This example deletes the directory `OldDirectory` and all of its contents, asking the user to confirm the deletion, but does not send the contents to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet58"::: - - This example deletes the directory `OldDirectory` and all of its contents, sending them to the **Recycle Bin**, but does not show the progress of the operation. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet59"::: - ]]> The path is a zero-length string, is malformed, contains only white space, or contains invalid characters (including wildcard characters). The path is a device path (starts with \\\\.\\). @@ -1192,25 +1091,6 @@ ## Remarks The `showUI`, `recycle`, and `onUserCancel` parameters are not supported in applications that are not user interactive, such as Windows Services. - - -## Examples - The example deletes the directory `OldDirectory` only if it is empty. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet56"::: - - This example deletes the directory `OldDirectory` and all of its contents. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet57"::: - - This example deletes the directory `OldDirectory` and all of its contents, asking the user to confirm the deletion, but does not send the contents to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet58"::: - - This example deletes the directory `OldDirectory` and all of its contents, sending them to the **Recycle Bin**, but does not show the progress of the operation. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet59"::: - ]]> The path is a zero-length string, is malformed, contains only white space, or contains invalid characters (including wildcard characters). The path is a device path (starts with \\\\.\\). @@ -1280,21 +1160,6 @@ |--------|---------| |To delete a file|[How to: Delete a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file)| - - -## Examples - This example deletes the file `Test.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet3"::: - - This example deletes the file `Test.txt` and allows the user to confirm that the file should be deleted. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet4"::: - - This example deletes the file `Test.txt` and sends it to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet5"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; it has a trailing slash where a file must be specified; or it is a device path (starts with \\\\.\\). @@ -1362,21 +1227,6 @@ |--------|---------| |To delete a file|[How to: Delete a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file)| - - -## Examples - This example deletes the file `Test.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet3"::: - - This example deletes the file `Test.txt` and allows the user to confirm that the file should be deleted. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet4"::: - - This example deletes the file `Test.txt` and sends it to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet5"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; it has a trailing slash where a file must be specified; or it is a device path (starts with \\\\.\\). @@ -1448,21 +1298,6 @@ |--------|---------| |To delete a file|[How to: Delete a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-delete-a-file)| - - -## Examples - This example deletes the file `Test.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet3"::: - - This example deletes the file `Test.txt` and allows the user to confirm that the file should be deleted. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet4"::: - - This example deletes the file `Test.txt` and sends it to the **Recycle Bin**. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet5"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; it has a trailing slash where a file must be specified; or it is a device path (starts with \\\\.\\). @@ -2421,15 +2256,6 @@ |--------|---------| |Parse a file path|[How to: Parse File Paths](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-parse-file-paths)| - - -## Examples - The following example parses a file path and returns the name of the file. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet21"::: - - Replace the path `C:\Testdirectory\Testfile` with the path you wish to parse. - ]]> Objects (Visual Basic) @@ -2537,13 +2363,6 @@ ## Remarks This method can be used to create a temporary file. - - -## Examples - This example creates a temp file and returns its path. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet12"::: - ]]> Objects (Visual Basic) @@ -2599,17 +2418,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2674,17 +2482,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2751,17 +2548,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2828,17 +2614,6 @@ ## Remarks If an attempt is made to move a directory inside a directory that does not exist, the target structure will be created. - - -## Examples - This example moves `Directory1` inside `Directory2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet81"::: - - This example moves `Directory1` inside `Directory2`, overwriting the directory if it already exists. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet82"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\). @@ -2919,17 +2694,6 @@ |--------|---------| |Move a file|[How to: Move a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\); it ends with a trailing slash. @@ -2998,17 +2762,6 @@ |--------|---------| |Move a file|[How to: Move a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\); it ends with a trailing slash. @@ -3079,17 +2832,6 @@ |--------|---------| |Move a file|[How to: Move a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\); it ends with a trailing slash. @@ -3160,17 +2902,6 @@ |--------|---------| |Move a file|[How to: Move a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-move-a-file)| - - -## Examples - This example moves the file `Test.txt` from `TestDir1` to `TestDir2`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet86"::: - - This example moves the file `Test.txt` from `TestDir1` to `TestDir2` and renames it `Test2.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet87"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\); it ends with a trailing slash. @@ -3794,13 +3525,6 @@ |--------|---------| |Read from a binary file|[How to: Read From Binary Files](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-binary-files)| - - -## Examples - This example reads from the file `C:/Documents and Settings/selfportrait.jpg.` - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet33"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\); it ends with a trailing slash. @@ -4040,13 +3764,6 @@ ## Remarks This method cannot be used to move a directory; use the `MoveDirectory` method to move and rename the directory. - - -## Examples - This example renames the `Test` directory to `SecondTest`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet13"::: - ]]> @@ -4118,15 +3835,6 @@ |--------|---------| |Rename a file|[How to: Rename a File](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file)| - - -## Examples - This example renames the file `Test.txt` to `SecondTest.txt`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet1"::: - - Change "`C:\Test.txt`" to the path and file name of the file that you want to rename. - ]]> @@ -4180,16 +3888,7 @@ Gets an object that provides properties for accessing commonly referenced directories. This property returns the object for the computer. - - - + To be added. Objects (Visual Basic) @@ -4250,13 +3949,6 @@ |--------|---------| |Write to a binary file|[How to: Write to Binary Files](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-write-to-binary-files)| - - -## Examples - This example appends the data array `CustomerData` to the file `CollectedData`. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet50"::: - ]]> The path is not valid for one of the following reasons: it is a zero-length string; it contains only white space; it contains invalid characters; or it is a device path (starts with \\\\.\\); it ends with a trailing slash. diff --git a/xml/Microsoft.VisualBasic.MyServices/SpecialDirectoriesProxy.xml b/xml/Microsoft.VisualBasic.MyServices/SpecialDirectoriesProxy.xml index 7f32667a6ea..28809289377 100644 --- a/xml/Microsoft.VisualBasic.MyServices/SpecialDirectoriesProxy.xml +++ b/xml/Microsoft.VisualBasic.MyServices/SpecialDirectoriesProxy.xml @@ -37,38 +37,27 @@ Provides properties for accessing commonly referenced directories. - exception is thrown. - - No backslash (\\) appears at the end of the path. - - The following table lists examples of tasks involving the `My.Computer.FileSystem.SpecialDirectories` object. - -|To|See| -|--------|---------| -|Read from the MyDocuments directory|[How to: Retrieve the Contents of the My Documents Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-retrieve-the-contents-of-the-my-documents-directory)| - -## Availability by Project Type - -|Project type|Available| -|------------------|---------------| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|**Yes**| -|Windows Service|**Yes**| -|Web Site|**Yes**| - - - -## Examples - This example returns the `filePath` for the user's Desktop directory and displays it. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet80"::: - + exception is thrown. + + No backslash (\\) appears at the end of the path. + +To read from the MyDocuments directory, see [How to: Retrieve the Contents of the My Documents Directory](/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-retrieve-the-contents-of-the-my-documents-directory). + +## Availability by Project Type + +| Project type | Available | +|-------------------------|-----------| +| Windows Application | **Yes** | +| Class Library | **Yes** | +| Console Application | **Yes** | +| Windows Control Library | **Yes** | +| Web Control Library | **Yes** | +| Windows Service | **Yes** | +| Web Site | **Yes** | + ]]> @@ -110,18 +99,11 @@ Gets a path name pointing to the Application Data directory for the all users. The path to the Application Data directory for the all users. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet79"::: - + The path is empty, usually because the operating system does not support the directory. @@ -164,18 +146,11 @@ Gets a path name pointing to the Application Data directory for the current user. The path to the Application Data directory for the current user. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet48"::: - + The path is empty, usually because the operating system does not support the directory. @@ -218,18 +193,11 @@ Gets a path name pointing to the Desktop directory. The path to the Desktop directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet60"::: - + The path is empty, usually because the operating system does not support the directory. @@ -272,18 +240,11 @@ Gets a path name pointing to the My Documents directory. The path to the My Documents directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet53"::: - + The path is empty, usually because the operating system does not support the directory. @@ -326,18 +287,11 @@ Gets a path name pointing to the My Music directory. The path to the My Music directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet26"::: - + The path is empty, usually because the operating system does not support the directory. @@ -380,18 +334,11 @@ Gets a path name pointing to the My Pictures directory. The path to the My Pictures directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet77"::: - + The path is empty, usually because the operating system does not support the directory. @@ -434,18 +381,11 @@ Gets a path pointing to the **Program Files** directory. The path to the **Program Files** directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet90"::: - + The path is empty, usually because the operating system does not support the directory. @@ -488,18 +428,11 @@ Gets a path name pointing to the Programs directory. The path to the Programs directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet61"::: - + The path is empty, usually because the operating system does not support the directory. @@ -542,18 +475,11 @@ Gets a path name pointing to the Temp directory. The path to the Temp directory. - . - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/ServerComputer/FileSystem/Class1.vb" id="Snippet31"::: - + The path is empty, usually because the operating system does not support the directory. diff --git a/xml/System.Runtime.Versioning/FrameworkName.xml b/xml/System.Runtime.Versioning/FrameworkName.xml index 6d82ced6dc4..00b05f44cbe 100644 --- a/xml/System.Runtime.Versioning/FrameworkName.xml +++ b/xml/System.Runtime.Versioning/FrameworkName.xml @@ -612,10 +612,11 @@ ## Remarks The method defines the operation of the equality operator for objects. - Languages that do not support custom operators can call the method instead. + Languages that don't support custom operators can call the method instead. ## Examples - The following example uses the equality operator to determine whether a object that represents the running version of .NET is equal to a supported version of .NET. Note that the two versions are not equal because they do not have identical version numbers. + +The following example uses the equality operator to determine whether a object that represents the running version of .NET is equal to a given version of .NET. Note that the two versions aren't equal because they don't have identical version numbers. :::code language="csharp" source="~/snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Versioning/FrameworkName/op_Equality/Operators1.vb" id="Snippet1"::: diff --git a/xml/System.Windows/Application.xml b/xml/System.Windows/Application.xml index ea2aedb8888..13c390736f8 100644 --- a/xml/System.Windows/Application.xml +++ b/xml/System.Windows/Application.xml @@ -31,24 +31,20 @@ is a class that encapsulates WPF application-specific functionality, including the following: -- **Application Lifetime**: , , , , , , , , , . + is a class that encapsulates WPF application-specific functionality, including the following: -- **Application-Scope Window, Property, and Resource Management**: , , , , , , , , . - -- **Command-Line Parameter and Exit Code Processing**: , , . - -- **Navigation**: , , , , , , , , . +- **Application Lifetime**: , , , , , , , , , . +- **Application-Scope Window, Property, and Resource Management**: , , , , , , , , . +- **Command-Line Parameter and Exit Code Processing**: , , . +- **Navigation**: , , , , , , , , . implements the singleton pattern to provide shared access to its window, property, and resource scope services. Consequently, only one instance of the class can be created per . You can implement an using markup, markup and code-behind, or code. If is implemented with markup, whether markup or markup and code-behind, the markup file must be configured as an Microsoft build engine (MSBuild) `ApplicationDefinition` item. > [!NOTE] -> A standalone application does not require an object; it is possible to implement a custom `static` entry point method (`Main`) that opens a window without creating an instance of . However, XAML browser applications (XBAPs) require an object. - - +> A standalone application does not require an object; it's possible to implement a custom `static` entry point method (`Main`) that opens a window without creating an instance of . However, XAML browser applications (XBAPs) require an object. ## Examples The following example shows how a standard application is defined using only markup: diff --git a/xml/System/String.xml b/xml/System/String.xml index 12f6cced7d0..c0bc6f12311 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -7101,13 +7101,14 @@ Index numbering starts from zero. This method performs a word (case-sensitive and culture-sensitive) search using the current culture. The search begins at the first character position of this instance and continues until the last character position. -Character sets include ignorable characters, which are characters that are not considered when performing a linguistic or culture-sensitive comparison. In a culture-sensitive search, if `value` contains an ignorable character, the result is equivalent to searching with that character removed. If `value` consists only of one or more ignorable characters, the method always returns 0 (zero) to indicate that the match is found at the beginning of the current instance. In the following example, the method is used to find three substrings (a soft hyphen (U+00AD), a soft hyphen followed by "n", and a soft hyphen followed by "m") in two strings. Only one of the strings contains a soft hyphen. Because the soft hyphen is an ignorable character, the result is the same as if the soft hyphen had not been included in `value`. When searching for a soft hyphen only, the method returns 0 (zero) to indicate that it has found a match at the beginning of the string. +Character sets include ignorable characters, which are characters that aren't considered when performing a linguistic or culture-sensitive comparison. In a culture-sensitive search, if `value` contains an ignorable character, the result is equivalent to searching with that character removed. If `value` consists only of one or more ignorable characters, the method always returns 0 (zero) to indicate that the match is found at the beginning of the current instance. In the following example, the method is used to find three substrings (a soft hyphen (U+00AD), a soft hyphen followed by "n", and a soft hyphen followed by "m") in two strings. Only one of the strings contains a soft hyphen. Because the soft hyphen is an ignorable character, the result is the same as if the soft hyphen had not been included in `value`. When searching for a soft hyphen only, the method returns 0 (zero) to indicate that it has found a match at the beginning of the string. :::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/ignorable21.cs" id="Snippet21"::: :::code language="fsharp" source="~/snippets/fsharp/System/String/IndexOf/ignorable21.fs" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System/String/IndexOf/ignorable21.vb" id="Snippet21"::: ## Examples + The following example searches for the "n" in "animal". Because string indexes begin at zero rather than one, the method indicates that the "n" is at position 1. :::code language="csharp" source="~/snippets/csharp/System/String/IndexOf/simple1.cs" id="Snippet12"::: diff --git a/xml/System/Type.xml b/xml/System/Type.xml index f1af3125d80..02efa37e263 100644 --- a/xml/System/Type.xml +++ b/xml/System/Type.xml @@ -324,20 +324,21 @@ The code example uses the to invoke the property. + +The assembly-qualified name of a type consists of the type name, including its namespace, followed by a comma, followed by the display name of the assembly. The display name of an assembly is obtained using the property. > [!NOTE] > Processor architecture is part of assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, it's not included in the string returned by the property, for compatibility reasons. See . All compilers that support the common language runtime emit the simple name of a nested class, and reflection constructs a mangled name when queried, in accordance with the following conventions. -|Delimiter|Meaning| -|---------------|-------------| -|Backslash (\\)|Escape character.| -|Comma (,)|Precedes the Assembly name.| -|Plus sign (+)|Precedes a nested class.| -|Period (.)|Denotes namespace identifiers.| -|Brackets ([])|After a type name, denotes an array of that type.

-or-

For a generic type, encloses the generic type argument list.

-or-

Within a type argument list, encloses an assembly-qualified type.| +| Delimiter | Meaning | +|----------------|--------------------------------| +| Backslash (\\) | Escape character. | +| Comma (,) | Precedes the Assembly name. | +| Plus sign (+) | Precedes a nested class. | +| Period (.) | Denotes namespace identifiers. | +| Brackets ([]) | After a type name, denotes an array of that type.

-or-

For a generic type, encloses the generic type argument list.

-or-

Within a type argument list, encloses an assembly-qualified type. | For example, the assembly-qualified name for a class might look like this: @@ -364,7 +365,8 @@ TopNamespace.Sub\+Namespace.ContainingClass+NestedClass, MyAssembly, Version=1.3 If the current object represents a generic parameter, this property returns `null`. ## Examples - The following example displays the assembly name associated with the class and the fully qualified name of the type. + +The following example displays the assembly name associated with the class and the fully qualified name of the type. :::code language="csharp" source="~/snippets/csharp/System/Type/Assembly/type_assembly.cs" id="Snippet1"::: :::code language="fsharp" source="~/snippets/fsharp/System/Type/Assembly/type_assembly.fs" id="Snippet1"::: From 086f8f29c1d809d3986f223af90bf93dcf26ca2e Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:28:35 -0700 Subject: [PATCH 5/6] Delete .NET Framework VB projects, code files, and refs (#12920) --- .../Overview/application.xaml.vb | 10 - .../Overview/changeitem.xaml.vb | 18 - .../editingcollectionssnippets.vbproj | 179 ------ .../Overview/my project/assemblyinfo.vb | 51 -- .../Overview/my project/resources.designer.vb | 61 -- .../Overview/my project/settings.designer.vb | 26 - .../Overview/window1.xaml.vb | 207 ------- .../HeaderStringFormat/application.xaml.vb | 14 - .../contentstringsnippets.vbproj | 152 ----- .../my project/assemblyinfo.vb | 52 -- .../my project/resources.designer.vb | 62 -- .../my project/settings.designer.vb | 27 - .../HeaderStringFormat/window1.xaml.vb | 194 ------ .../Overview/DrawingAttributesSample.vbproj | 145 ----- .../Overview/My Project/AssemblyInfo.vb | 58 -- .../InkCanvas/Overview/My Project/MyEvents.vb | 13 - .../Overview/My Project/Resources.Designer.vb | 61 -- .../Overview/My Project/Settings.Designer.vb | 71 --- .../InkCanvas/Overview/MyApp.xaml.vb | 11 - .../InkCanvas/Overview/Window1.xaml.vb | 371 ----------- .../Page/Overview/codepage.vb | 10 - .../Page/Overview/homepage.xaml.vb | 19 - .../Overview/markupandcodebehindpage.xaml.vb | 11 - .../Page/Overview/my project/assemblyinfo.vb | 51 -- .../Overview/my project/resources.designer.vb | 62 -- .../Overview/my project/settings.designer.vb | 27 - .../Page/Overview/pagesnippets.vbproj | 141 ----- .../Overview/hyperlinksnippets.vbproj | 127 ---- .../Hyperlink/Overview/myapp.xaml.vb | 13 - .../Hyperlink/Overview/window1.xaml.vb | 90 --- .../CustomRenderedStroke.vb | 73 --- .../PropertyDataChanged/Ink3d.vb | 188 ------ .../My Project/AssemblyInfo.vb | 34 -- .../My Project/MyEvents.vb | 13 - .../My Project/MyResources.Designer.vb | 61 -- .../My Project/MySettings.Designer.vb | 28 - .../PropertyDataChanged/MyApp.xaml.vb | 22 - .../StrokeCollectionShadow.vbproj | 158 ----- .../PropertyDataChanged/Window1.xaml.vb | 38 -- .../Stroke/.ctor/CustomRenderedStroke.vb | 88 --- .../Stroke/.ctor/My Project/AssemblyInfo.vb | 34 -- .../Stroke/.ctor/My Project/MyEvents.vb | 13 - .../.ctor/My Project/MyResources.Designer.vb | 61 -- .../.ctor/My Project/MySettings.Designer.vb | 28 - .../Stroke/.ctor/MyApp.xaml.vb | 36 -- .../Stroke/.ctor/MyBorder.vb | 528 ---------------- .../Stroke/.ctor/MyStroke.vb | 184 ------ .../Stroke/.ctor/StrokeSnippets_VB.vbproj | 150 ----- .../Stroke/.ctor/Window1.xaml.vb | 99 --- .../My Project/AssemblyInfo.vb | 58 -- .../GetStylusPoints/My Project/MyEvents.vb | 13 - .../My Project/Resources.Designer.vb | 61 -- .../My Project/Settings.Designer.vb | 71 --- .../GetStylusPoints/MyApp.xaml.vb | 10 - .../GetStylusPoints/PacketSpy.vbproj | 145 ----- .../GetStylusPoints/Window1.xaml.vb | 576 ------------------ .../Application/Overview/appcode.vb | 16 - .../Application/Overview/application.xaml.vb | 10 - .../Overview/applicationsnippets.vbproj | 114 ---- .../Overview/my project/assemblyinfo.vb | 51 -- .../vb/client.exe.config | 32 - .../channelfactorybehaviors/vb/client.vb | 44 -- .../channelfactorybehaviors/vb/client.vbproj | 93 --- .../channelfactorybehaviors/vb/host.vbproj | 57 -- .../vb/hostapplication.exe.config | 50 -- .../vb/hostapplication.vb | 40 -- .../vb/iendpointbehaviormessageinspector.vb | 75 --- .../channelfactorybehaviors/vb/proxycode.vb | 90 --- .../channelfactorybehaviors/vb/services.vb | 38 -- .../icontractbehavior/vb/client.vb | 28 - .../icontractbehavior/vb/client.vbproj | 95 --- .../icontractbehavior/vb/host.vbproj | 92 --- .../icontractbehavior/vb/hostapplication.vb | 40 -- .../vb/objectproviderbehavior.vb | 82 --- .../icontractbehavior/vb/proxycode.vb | 51 -- .../icontractbehavior/vb/services.vb | 32 - .../vb/cs.vbproj | 91 --- .../vb/module1.vb | 67 -- .../vb/my project/assemblyinfo.vb | 33 - .../vb/cs.vbproj | 88 --- .../vb/module1.vb | 9 - .../vb/my project/assemblyinfo.vb | 33 - .../sca.callbackcontract/vb/client.vb | 62 -- .../sca.callbackcontract/vb/client.vbproj | 95 --- .../sca.callbackcontract/vb/host.vbproj | 91 --- .../vb/hostapplication.vb | 38 -- .../sca.callbackcontract/vb/proxycode.vb | 68 --- .../sca.callbackcontract/vb/services.vb | 44 -- .../VS_Snippets_CFX/sca.names/vb/client.vb | 32 - .../sca.names/vb/client.vbproj | 95 --- .../VS_Snippets_CFX/sca.names/vb/host.vbproj | 91 --- .../sca.names/vb/hostapplication.vb | 38 -- .../VS_Snippets_CFX/sca.names/vb/proxycode.vb | 57 -- .../VS_Snippets_CFX/sca.names/vb/services.vb | 26 - .../VS_Snippets_CFX/sca.session/vb/client.vb | 64 -- .../sca.session/vb/client.vbproj | 95 --- .../sca.session/vb/host.vbproj | 91 --- .../sca.session/vb/hostapplication.vb | 41 -- .../sca.session/vb/proxycode.vb | 67 -- .../sca.session/vb/services.vb | 46 -- .../servicecontractattribute/vb/client.vb | 34 -- .../servicecontractattribute/vb/client.vbproj | 95 --- .../servicecontractattribute/vb/host.vbproj | 91 --- .../vb/hostapplication.vb | 38 -- .../servicecontractattribute/vb/proxycode.vb | 56 -- .../servicecontractattribute/vb/services.vb | 27 - .../visualbasic/customcontrol.vb | 564 ----------------- .../visualbasic/elementprovider.vbproj | 100 --- .../visualbasic/listfragment.vb | 342 ----------- .../visualbasic/listitemfragment.vb | 298 --------- .../visualbasic/program.vb | 42 -- .../visualbasic/providerform.designer.vb | 153 ----- .../visualbasic/providerform.vb | 125 ---- .../IEditableCollectionView.xml | 11 - .../NamedPipeTransportBindingElement.xml | 8 - .../IContractBehavior.xml | 3 - .../X509ServiceCertificateAuthentication.xml | 5 - xml/System.ServiceModel/ChannelFactory.xml | 1 - xml/System.ServiceModel/ChannelFactory`1.xml | 1 - xml/System.ServiceModel/ClientBase`1.xml | 1 - xml/System.ServiceModel/OperationContext.xml | 5 - .../ServiceContractAttribute.xml | 8 - xml/System.ServiceModel/SessionMode.xml | 1 - .../ISelectionItemProvider.xml | 7 - .../ISelectionProvider.xml | 3 - xml/System.Windows.Controls/GroupStyle.xml | 1 - .../HeaderedContentControl.xml | 1 - xml/System.Windows.Controls/InkCanvas.xml | 4 - xml/System.Windows.Controls/Page.xml | 2 - xml/System.Windows.Controls/TabControl.xml | 1 - xml/System.Windows.Documents/Hyperlink.xml | 5 - .../DrawingAttributeIds.xml | 1 - xml/System.Windows.Ink/DrawingAttributes.xml | 27 - xml/System.Windows.Ink/Stroke.xml | 20 - xml/System.Windows.Ink/StrokeCollection.xml | 1 - xml/System.Windows.Ink/StylusTip.xml | 1 - xml/System.Windows.Input/StylusDevice.xml | 1 - xml/System.Windows.Input/StylusPoint.xml | 29 - .../StylusPointCollection.xml | 13 - .../StylusPointDescription.xml | 15 - .../StylusPointProperties.xml | 1 - .../StylusPointProperty.xml | 7 - .../StylusPointPropertyInfo.xml | 12 - .../StylusPointPropertyUnit.xml | 2 - xml/System.Windows.Input/SystemGesture.xml | 1 - xml/System.Windows.Input/TabletDevice.xml | 2 - xml/System.Windows/Application.xml | 2 - 147 files changed, 9864 deletions(-) delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/application.xaml.vb delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/changeitem.xaml.vb delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/editingcollectionssnippets.vbproj delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/assemblyinfo.vb delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/resources.designer.vb delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/settings.designer.vb delete mode 100644 snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/application.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/contentstringsnippets.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/assemblyinfo.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/resources.designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/settings.designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/DrawingAttributesSample.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/AssemblyInfo.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/MyEvents.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Resources.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Settings.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/MyApp.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/codepage.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/homepage.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/markupandcodebehindpage.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/assemblyinfo.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/resources.designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/settings.designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Controls/Page/Overview/pagesnippets.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/hyperlinksnippets.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/myapp.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/CustomRenderedStroke.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Ink3d.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/AssemblyInfo.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyEvents.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyResources.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MySettings.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/MyApp.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/StrokeCollectionShadow.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/AssemblyInfo.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyEvents.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyResources.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MySettings.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyApp.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/StrokeSnippets_VB.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/Window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/AssemblyInfo.vb delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/MyEvents.vb delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Resources.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Settings.Designer.vb delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/MyApp.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/PacketSpy.vbproj delete mode 100644 snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows/Application/Overview/appcode.vb delete mode 100644 snippets/visualbasic/System.Windows/Application/Overview/application.xaml.vb delete mode 100644 snippets/visualbasic/System.Windows/Application/Overview/applicationsnippets.vbproj delete mode 100644 snippets/visualbasic/System.Windows/Application/Overview/my project/assemblyinfo.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.exe.config delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/host.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.exe.config delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/iendpointbehaviormessageinspector.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/proxycode.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/services.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/host.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/hostapplication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/proxycode.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/services.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/cs.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/my project/assemblyinfo.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/cs.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/module1.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/my project/assemblyinfo.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/host.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/hostapplication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/proxycode.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/host.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/hostapplication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/proxycode.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/host.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/hostapplication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/proxycode.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/host.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/hostapplication.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/proxycode.vb delete mode 100644 snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/customcontrol.vb delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/elementprovider.vbproj delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/program.vb delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.designer.vb delete mode 100644 snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.vb diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/application.xaml.vb b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/application.xaml.vb deleted file mode 100644 index 170cf232b25..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/application.xaml.vb +++ /dev/null @@ -1,10 +0,0 @@ -Imports System.Configuration - -Namespace EditingCollectionsSnippets - ''' - ''' Interaction logic for App.xaml - ''' - Partial Public Class App - Inherits Application - End Class -End Namespace diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/changeitem.xaml.vb b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/changeitem.xaml.vb deleted file mode 100644 index 87d14a32526..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/changeitem.xaml.vb +++ /dev/null @@ -1,18 +0,0 @@ -Imports System.Text - -Namespace EditingCollectionsSnippets - ''' - ''' Interaction logic for ChangeItem.xaml - ''' - Partial Public Class ChangeItemWindow - Inherits Window - Public Sub New() - InitializeComponent() - End Sub - - Private Sub Submit_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - DialogResult = True - Close() - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/editingcollectionssnippets.vbproj b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/editingcollectionssnippets.vbproj deleted file mode 100644 index 78b3d2fc88b..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/editingcollectionssnippets.vbproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {3AB84863-E854-4CFC-8E46-5CFADC62C582} - WinExe - - - EditingCollectionsSample - v4.8 - On - Binary - Off - On - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - true - true - prompt - AllRules.ruleset - - - pdbonly - true - bin\Release\ - false - true - prompt - AllRules.ruleset - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Application.xaml - Code - - - Window1.xaml - Code - - - - - ChangeItem.xaml - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.vb - Designer - - - SettingsSingleFileGenerator - Settings.Designer.vb - - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Microsoft Visual Basic PowerPacks 10.0 - true - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/assemblyinfo.vb b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/assemblyinfo.vb deleted file mode 100644 index 6cc5acd942f..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/assemblyinfo.vb +++ /dev/null @@ -1,51 +0,0 @@ -Imports System.Reflection -Imports System.Resources -Imports System.Runtime.CompilerServices -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - - - - - - - - - -' Setting ComVisible to false makes the types in this assembly not visible -' to COM components. If you need to access a type in this assembly from -' COM, set the ComVisible attribute to true on that type. - - -'In order to begin building localizable applications, set -'CultureYouAreCodingWith in your .vbproj file -'inside a . For example, if you are using US english -'in your source files, set the to en-US. Then uncomment -'the NeutralResourceLanguage attribute below. Update the "en-US" in -'the line below to match the UICulture setting in the project file. - -'[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - - '(used if a resource is not found in the page, - ' or application resource dictionaries) - '(used if a resource is not found in the page, - ' app, or any theme specific resource dictionaries) - 'where the generic resource dictionary is located - where theme specific resource dictionaries are located - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' [assembly: AssemblyVersion("1.0.*")] - - diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/resources.designer.vb b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/resources.designer.vb deleted file mode 100644 index e0b2aaa9ed1..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/resources.designer.vb +++ /dev/null @@ -1,61 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3026 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Namespace My.Resources - - - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - ' This class was auto-generated by the StronglyTypedResourceBuilder - ' class via a tool like ResGen or Visual Studio. - ' To add or remove a member, edit your .ResX file then rerun ResGen - ' with the /str option, or rebuild your VS project. - - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - -' internal Resources() -' { -' } - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As New Global.System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/settings.designer.vb b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/settings.designer.vb deleted file mode 100644 index 0f55dfb2c8f..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/my project/settings.designer.vb +++ /dev/null @@ -1,26 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3026 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Namespace My - - - - Friend NotInheritable Partial Class Settings - Inherits System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = (CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) - - Public Shared ReadOnly Property [Default]() As Settings - Get - Return defaultInstance - End Get - End Property - End Class -End Namespace diff --git a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb b/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb deleted file mode 100644 index db2b0dcfaf2..00000000000 --- a/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb +++ /dev/null @@ -1,207 +0,0 @@ -Imports System.Text -Imports System.Collections.ObjectModel -Imports System.ComponentModel - -Namespace EditingCollectionsSnippets - ''' - ''' Interaction logic for Window1.xaml - ''' - Partial Public Class Window1 - Inherits Window - Public Sub New() - InitializeComponent() - End Sub - - - Private Sub edit_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - If itemsControl.SelectedItem Is Nothing Then - MessageBox.Show("No item is selected") - Return - End If - - ' - Dim editableCollectionView As IEditableCollectionView = TryCast(itemsControl.Items, IEditableCollectionView) - - ' Create a window that prompts the user to edit an item. - Dim win As New ChangeItemWindow() - editableCollectionView.EditItem(itemsControl.SelectedItem) - win.DataContext = itemsControl.SelectedItem - - ' If the user submits the new item, commit the changes. - ' If the user cancels the edits, discard the changes. - If CBool(win.ShowDialog()) Then - editableCollectionView.CommitEdit() - Else - ' - ' If the objects in the collection can discard pending - ' changes, calling IEditableCollectionView.CancelEdit - ' will revert the changes. Otherwise, you must provide - ' your own logic to revert the changes in the object. - - If Not editableCollectionView.CanCancelEdit Then - ' Provide logic to revert changes. - End If - - editableCollectionView.CancelEdit() - ' - End If - ' - End Sub - - Private Sub add_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - ' - Dim editableCollectionView As IEditableCollectionView = TryCast(itemsControl.Items, IEditableCollectionView) - - If Not editableCollectionView.CanAddNew Then - MessageBox.Show("You cannot add items to the list.") - Return - End If - - ' Create a window that prompts the user to enter a new - ' item to sell. - Dim win As New ChangeItemWindow() - - 'Create a new item to be added to the collection. - win.DataContext = editableCollectionView.AddNew() - - ' If the user submits the new item, commit the new - ' object to the collection. If the user cancels - ' adding the new item, discard the new item. - If CBool(win.ShowDialog()) Then - editableCollectionView.CommitNew() - Else - editableCollectionView.CancelNew() - End If - - ' - End Sub - - Private Sub remove_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - Dim item As PurchaseItem = TryCast(itemsControl.SelectedItem, PurchaseItem) - - If item Is Nothing Then - MessageBox.Show("No Item is selected") - Return - End If - - ' - Dim editableCollectionView As IEditableCollectionView = TryCast(itemsControl.Items, IEditableCollectionView) - - If Not editableCollectionView.CanRemove Then - MessageBox.Show("You cannot remove items from the list.") - Return - End If - - If MessageBox.Show("Are you sure you want to remove " & item.Description, "Remove Item", MessageBoxButton.YesNo) = MessageBoxResult.Yes Then - editableCollectionView.Remove(itemsControl.SelectedItem) - End If - ' - End Sub - End Class - - Public Class PurchaseItem - Implements IEditableObject, INotifyPropertyChanged - Private Structure ItemData - Friend Description As String - Friend Price As Double - Friend OfferExpires As Date - End Structure - Private copyData As ItemData - Private currentData As ItemData - - Public Sub New() - Me.New("New item", 0, Date.Now) - End Sub - - Public Sub New(ByVal desc As String, ByVal price As Double, ByVal endDate As Date) - Description = desc - Me.Price = price - OfferExpires = endDate - End Sub - - Public Overrides Function ToString() As String - Return String.Format("{0}, {1:c}, {2:D}", Description, Price, OfferExpires) - End Function - - Public Property Description() As String - Get - Return currentData.Description - End Get - Set(ByVal value As String) - If currentData.Description <> value Then - currentData.Description = value - NotifyPropertyChanged("Description") - End If - End Set - End Property - - Public Property Price() As Double - Get - Return currentData.Price - End Get - Set(ByVal value As Double) - If currentData.Price <> value Then - currentData.Price = value - NotifyPropertyChanged("Price") - End If - End Set - End Property - - Public Property OfferExpires() As Date - Get - Return currentData.OfferExpires - End Get - Set(ByVal value As Date) - If value <> currentData.OfferExpires Then - currentData.OfferExpires = value - NotifyPropertyChanged("OfferExpires") - End If - End Set - End Property - - #Region "INotifyPropertyChanged Members" - - Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged - - Private Sub NotifyPropertyChanged(ByVal info As String) - RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info)) - End Sub - - #End Region - - #Region "IEditableObject Members" - - Public Sub BeginEdit() Implements IEditableObject.BeginEdit - copyData = currentData - End Sub - - Public Sub CancelEdit() Implements IEditableObject.CancelEdit - currentData = copyData - NotifyPropertyChanged("") - - End Sub - - Public Sub EndEdit() Implements IEditableObject.EndEdit - copyData = New ItemData() - - End Sub - - #End Region - - End Class - - Public Class ItemsForSale - Inherits ObservableCollection(Of PurchaseItem) - Public Sub New() - Add((New PurchaseItem("Snowboard and bindings", 120, New Date(2009, 1, 1)))) - Add((New PurchaseItem("Inside VB, second edition", 10, New Date(2009, 2, 2)))) - Add((New PurchaseItem("Laptop - only 1 year old", 499.99, New Date(2009, 2, 28)))) - Add((New PurchaseItem("Set of 6 chairs", 120, New Date(2009, 2, 28)))) - Add((New PurchaseItem("My DVD Collection", 15, New Date(2009, 1, 1)))) - Add((New PurchaseItem("TV Drama Series", 39.985, New Date(2009, 1, 1)))) - Add((New PurchaseItem("Squash racket", 60, New Date(2009, 2, 28)))) - End Sub - - End Class - -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/application.xaml.vb b/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/application.xaml.vb deleted file mode 100644 index 39c79f3e75c..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/application.xaml.vb +++ /dev/null @@ -1,14 +0,0 @@ -Imports System.Collections.Generic -Imports System.Configuration -Imports System.Data -Imports System.Linq -Imports System.Windows - -Namespace ContentStringSnippets - ''' - ''' Interaction logic for App.xaml - ''' - Partial Public Class App - Inherits Application - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/contentstringsnippets.vbproj b/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/contentstringsnippets.vbproj deleted file mode 100644 index 114ccada69f..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/contentstringsnippets.vbproj +++ /dev/null @@ -1,152 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {ABEE88DC-8923-443A-9580-B34499F30CCD} - WinExe - - ContentStringSnippets - v4.0 - On - Binary - Off - On - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - Client - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - true - true - prompt - AllRules.ruleset - - - pdbonly - true - bin\Release\ - false - true - prompt - AllRules.ruleset - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - 4.0 - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Application.xaml - Code - - - Window1.xaml - Code - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - ResXFileCodeGenerator - Resources.Designer.vb - - - SettingsSingleFileGenerator - Settings.Designer.vb - - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Microsoft Visual Basic PowerPacks 10.0 - true - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/assemblyinfo.vb b/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/assemblyinfo.vb deleted file mode 100644 index 9b49d81314f..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/assemblyinfo.vb +++ /dev/null @@ -1,52 +0,0 @@ -Imports System.Reflection -Imports System.Resources -Imports System.Runtime.CompilerServices -Imports System.Runtime.InteropServices -Imports System.Windows - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - - - - - - - - - -' Setting ComVisible to false makes the types in this assembly not visible -' to COM components. If you need to access a type in this assembly from -' COM, set the ComVisible attribute to true on that type. - - -'In order to begin building localizable applications, set -'CultureYouAreCodingWith in your .vbproj file -'inside a . For example, if you are using US english -'in your source files, set the to en-US. Then uncomment -'the NeutralResourceLanguage attribute below. Update the "en-US" in -'the line below to match the UICulture setting in the project file. - -'[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - - '(used if a resource is not found in the page, - ' or application resource dictionaries) - '(used if a resource is not found in the page, - ' app, or any theme specific resource dictionaries) - 'where the generic resource dictionary is located - where theme specific resource dictionaries are located - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' [assembly: AssemblyVersion("1.0.*")] - - diff --git a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/resources.designer.vb b/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/resources.designer.vb deleted file mode 100644 index 72b6a506118..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/resources.designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3026 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - -Namespace My.Resources - - - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - ' This class was auto-generated by the StronglyTypedResourceBuilder - ' class via a tool like ResGen or Visual Studio. - ' To add or remove a member, edit your .ResX file then rerun ResGen - ' with the /str option, or rebuild your VS project. - - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - -' internal Resources() -' { -' } - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If (resourceMan Is Nothing) Then - Dim temp As New Global.System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/settings.designer.vb b/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/settings.designer.vb deleted file mode 100644 index 4a409ba907f..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/my project/settings.designer.vb +++ /dev/null @@ -1,27 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3026 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - -Namespace My - - - - Friend NotInheritable Partial Class Settings - Inherits System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = (CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) - - Public Shared ReadOnly Property [Default]() As Settings - Get - Return defaultInstance - End Get - End Property - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb b/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb deleted file mode 100644 index 77992ed5868..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb +++ /dev/null @@ -1,194 +0,0 @@ -Imports System.Collections.Generic -Imports System.Linq -Imports System.Text -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Data -Imports System.Windows.Documents -Imports System.Windows.Input -Imports System.Windows.Media -Imports System.Windows.Media.Imaging -Imports System.Windows.Navigation -Imports System.Windows.Shapes -Imports System.Collections.ObjectModel - -Namespace ContentStringSnippets - ''' - ''' Interaction logic for Window1.xaml - ''' - Partial Public Class Window1 - Inherits Window - Public Sub New() - InitializeComponent() - End Sub - End Class - - ' - ' The converter to group the items. - Public Class GroupByPrice - Implements IValueConverter - Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert - - If Not(TypeOf value Is Double) Then - Return Nothing - End If - - Dim itemPrice As Double = CDbl(value) - - If itemPrice < 100 Then - Return 100 - End If - - If itemPrice < 250 Then - Return 250 - End If - - If itemPrice < 500 Then - Return 500 - End If - - Return 1000 - - - - End Function - - Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack - Throw New NotImplementedException() - End Function - End Class - - ' The type of objects that are added to the ItemsControl. - Public Class PurchaseItem - Public Property Description() As String - Public Property Price() As Double - Public Property OfferExpires() As Date - - Public Sub New() - End Sub - - Public Sub New(ByVal desc As String, ByVal price As Double, ByVal endDate As Date) - Description = desc - Me.Price = price - OfferExpires = endDate - End Sub - - Public Overrides Function ToString() As String - Return String.Format("{0}, {1:c}, {2:D}", Description, Price, OfferExpires) - End Function - End Class - - ' The source of the ItemsControl. - Public Class ItemsForSale - Inherits ObservableCollection(Of PurchaseItem) - - Public Sub New() - Add((New PurchaseItem("Snowboard and bindings", 120, New Date(2009, 1, 1)))) - Add((New PurchaseItem("Inside VB, second edition", 10, New Date(2009, 2, 2)))) - Add((New PurchaseItem("Laptop - only 1 year old", 499.99, New Date(2009, 2, 28)))) - Add((New PurchaseItem("Set of 6 chairs", 120, New Date(2009, 2, 28)))) - Add((New PurchaseItem("My DVD Collection", 15, New Date(2009, 1, 1)))) - Add((New PurchaseItem("TV Drama Series", 39.985, New Date(2009, 1, 1)))) - Add((New PurchaseItem("Squash racket", 60, New Date(2009, 2, 28)))) - - End Sub - - End Class - ' - - 'TabControl.ContentStringFormat - #Region "TabControlData" - Public Class Student - Implements IFormattable - - Public Property Name() As String - Private Property Courses() As ObservableCollection(Of Course) - - Public Sub New() - Me.New("") - - End Sub - - Public Sub New(ByVal name As String) - Me.Name = name - Courses = New ObservableCollection(Of Course)() - End Sub - - ' Add a course to the student's schedule. - Public Sub AddCourse(ByVal name As String, ByVal id As Integer, ByVal desc As String) - Courses.Add(New Course(name, id, desc)) - End Sub - - ' - Public Overloads Function ToString(ByVal format As String, ByVal formatProvider As IFormatProvider) As String Implements IFormattable.ToString - ' 'n': print the name only. - If format = "n" Then - Return Name - End If - - ' 'cl': print the course list. - If format = "cl" Then - Dim stringFormat As String = "{0,-25}{1,-30}{2,-10}" & vbCrLf - - Dim str As New StringBuilder() - - str.AppendLine() - str.AppendFormat(stringFormat, "Title", "Description", "ID") - str.AppendLine() - - For Each c As Course In Courses - str.AppendFormat(stringFormat, c.Title, c.Description, c.SectionID) - Next c - - Return str.ToString() - End If - - Return Me.ToString() - End Function - ' - End Class - - Public Class Course - Public Property Title() As String - Public Property SectionID() As Integer - Public Property Description() As String - - Public Sub New() - End Sub - - Public Sub New(ByVal title As String, ByVal section As Integer, ByVal desc As String) - Me.Title = title - SectionID = section - Description = desc - End Sub - End Class - - Public Class Students - Inherits ObservableCollection(Of Student) - Public Sub New() - Dim s1 As New Student("Sunil Uppal") - s1.AddCourse("Calculus 303", 19, "Advanced Calculus") - s1.AddCourse("History 110", 35, "Introduction to World History") - s1.AddCourse("Psychology 110", 40, "Behavioral Psychology") - s1.AddCourse("Physical Education 204", 80, "Racquetball") - Me.Add(s1) - - Dim s2 As New Student("Alice Ciccu") - s2.AddCourse("English 200", 50, "Advanced Composition") - s2.AddCourse("English 315", 100, "Shakespear's Sonnets") - s2.AddCourse("History 230", 38, "European History 1000-1500") - Me.Add(s2) - - - Dim s3 As New Student("Jeff Price") - s3.AddCourse("History 230", 38, "European History 1000-1500") - s3.AddCourse("History 110", 35, "Introduction to World History") - s3.AddCourse("Physical Education 204", 80, "Racquetball") - Me.Add(s3) - - - End Sub - End Class - - #End Region -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/DrawingAttributesSample.vbproj b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/DrawingAttributesSample.vbproj deleted file mode 100644 index 8b6862026f6..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/DrawingAttributesSample.vbproj +++ /dev/null @@ -1,145 +0,0 @@ - - - Debug - AnyCPU - {1CAEAC80-B18F-4C82-816A-D17BED2AAC78} - WinExe - DrawingAttributesSample - DrawingAttributesSample - - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - 10.0.20821 - - - true - full - true - true - true - bin\ - DrawingAttributesSample.xml - 42016,42017,42018,42019,42032,42314 - - - false - false - true - false - true - bin\ - DrawingAttributesSample.xml - 42016,42017,42018,42019,42032,42314 - - - - - - - - - - 4.0 - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - Code - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - SettingsSingleFileGenerator - Settings.Designer.vb - - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/AssemblyInfo.vb b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/AssemblyInfo.vb deleted file mode 100644 index 681912667fd..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,58 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.InteropServices -Imports System.Globalization -Imports System.Resources -Imports System.Windows - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - -'In order to begin building localizable applications, set -'CultureYouAreCodingWith in your .vbproj file -'inside a . For example, if you are using US english -'in your source files, set the to "en-US". Then uncomment the -'NeutralResourceLanguage attribute below. Update the "en-US" in the line -'below to match the UICulture setting in the project file. - -' - - -'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found. -'1st parameter: where theme specific resource dictionaries are located -'(used if a resource is not found in the page, -' or application resource dictionaries) - -'2nd parameter: where the generic resource dictionary is located -'(used if a resource is not found in the page, -'app, and any theme specific resource dictionaries) - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/MyEvents.vb b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/MyEvents.vb deleted file mode 100644 index 0fd4598d1c9..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/MyEvents.vb +++ /dev/null @@ -1,13 +0,0 @@ -Namespace My - Partial Friend Class MyApplication - - 'Use the editor window dropdowns in the Application pane of the Project Designer to handle MyApplication Events - ' - 'Startup: Raised when the application starts, before the startup form is created. - 'Shutdown: Raised after all application forms are closed. This event is not raised if the application is terminating abnormally. - 'UnhandledException: Raised if the application encounters an unhandled exception. - 'StartupNextInstance: Raised when launching a single-instance application and the application is already active. - 'NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. - - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Resources.Designer.vb b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Resources.Designer.vb deleted file mode 100644 index eddcf2c1068..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Resources.Designer.vb +++ /dev/null @@ -1,61 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DrawingAttributesSample.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Settings.Designer.vb b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Settings.Designer.vb deleted file mode 100644 index 28cfeb597d7..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/My Project/Settings.Designer.vb +++ /dev/null @@ -1,71 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - - _ -Partial Friend NotInheritable Class Settings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings),Settings) - -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As Settings - Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If - Return defaultInstance - End Get - End Property -End Class - -Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.DrawingAttributesSample.Settings - Get - Return Global.DrawingAttributesSample.Settings.Default - End Get - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/MyApp.xaml.vb b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/MyApp.xaml.vb deleted file mode 100644 index 26a48994221..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/MyApp.xaml.vb +++ /dev/null @@ -1,11 +0,0 @@ -' Interaction logic for MyApp.xaml -Partial Public Class MyApp - Inherits Application - - Private Sub AppStartup(ByVal sender As Object, ByVal e As StartupEventArgs) Handles Me.Startup - Dim mainWindow As Window1 = New Window1 - mainWindow.Show() - End Sub - -End Class - diff --git a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb b/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb deleted file mode 100644 index 4c7f5f2c0d5..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb +++ /dev/null @@ -1,371 +0,0 @@ - -Imports System.IO -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Data -Imports System.Windows.Documents -Imports System.Windows.Media -Imports System.Windows.Shapes -Imports System.Windows.Ink - -'/ -'/ Interaction logic for Window1.xaml -'/ - -Partial Public Class Window1 - Inherits Window - - ' - Private WithEvents inkCanvas1 As New InkCanvas() - Private inkDA As DrawingAttributes - Private highlighterDA As DrawingAttributes - Private useHighlighter As Boolean = False - - ' Add an InkCanvas to the window, and allow the user to - ' switch between using a green pen and a purple highlighter - ' on the InkCanvas. - Private Sub WindowLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs) - - inkCanvas1.Background = Brushes.DarkSlateBlue - inkCanvas1.DefaultDrawingAttributes.Color = Colors.SpringGreen - - ' Add the InkCanvas to the DockPanel, named root. - root.Children.Add(inkCanvas1) - - ' Set up the DrawingAttributes for the pen. - inkDA = New DrawingAttributes() - With inkDA - .Color = Colors.SpringGreen - .Height = 5 - .Width = 5 - .FitToCurve = True - End With - - ' Set up the DrawingAttributes for the highlighter. - highlighterDA = New DrawingAttributes() - With highlighterDA - .Color = Colors.Orchid - .IsHighlighter = True - .IgnorePressure = True - .StylusTip = StylusTip.Rectangle - .Height = 30 - .Width = 10 - End With - - inkCanvas1.DefaultDrawingAttributes = inkDA - - End Sub - - - ' Create a button called switchHighlighter and use - ' SwitchHighlighter_Click to handle the Click event. - ' The useHighlighter variable is a boolean that indicates - ' whether the InkCanvas renders ink as a highlighter. - - ' - ' Switch between using the 'pen' DrawingAttributes and the - ' 'highlighter' DrawingAttributes when the user clicks on . - Private Sub SwitchHighlighter_Click(ByVal sender As [Object], ByVal e As RoutedEventArgs) - - useHighlighter = Not useHighlighter - - If useHighlighter Then - switchHighlighter.Content = "Use Pen" - inkCanvas1.DefaultDrawingAttributes = highlighterDA - Else - - switchHighlighter.Content = "Use Highlighter" - inkCanvas1.DefaultDrawingAttributes = inkDA - End If - - End Sub - ' - - ' - - ' - Private Sub inkDA_AttributeChanged(ByVal sender As Object, _ - ByVal e As PropertyDataChangedEventArgs) - - If (e.PropertyGuid = DrawingAttributeIds.Color) Then - Me.Title = "The pen color is: " + e.NewValue.ToString() - End If - - End Sub - ' - - Private Sub InitializeAllProperties() - ' - ' Set up the DrawingAttributes for the pen. - inkDA = New Ink.DrawingAttributes() - With inkDA - .Color = Colors.SpringGreen - .Height = 5 - .Width = 5 - .FitToCurve = True - .StylusTipTransform = New Matrix(1, 0, 0, 1, 20, 0) - End With - - ' Set up the DrawingAttributes for the highlighter. - highlighterDA = New Ink.DrawingAttributes() - With highlighterDA - .Color = Colors.Orchid - .IsHighlighter = True - .IgnorePressure = True - .StylusTip = StylusTip.Rectangle - .Height = 30 - .Width = 10 - End With - - inkCanvas1.DefaultDrawingAttributes = inkDA - ' - End Sub - - Public Sub New() - InitializeComponent() - 'AddHandler inkCanvas1.StrokeCollected, AddressOf inkCanvas1_StrokeCollected - AddHandler inkCanvas1.Strokes.StrokesChanged, AddressOf Strokes_StrokesChanged - AddHandler inkCanvas1.StrokeErasing, AddressOf inkCanvas1_StrokeErasing - AddHandler inkCanvas1.DefaultDrawingAttributesReplaced, AddressOf inkCanvas1_DefaultDrawingAttributesReplaced - ' TODO: Remove from when the PropertyData is fixed. - 'AddHandler inkDA.AttributeChanged, AddressOf inkDA_AttributeChanged - - 'Uncomment the following line to assign custom properties. - 'AssignDrawingAttributesInstrument() - - End Sub - - ' - Private Sub inkCanvas1_DefaultDrawingAttributesReplaced(ByVal sender As Object, _ - ByVal e As DrawingAttributesReplacedEventArgs) - - If (e.NewDrawingAttributes.IsHighlighter) Then - - Me.Title = "Now using a highlighter." - - Else - - Me.Title = "Now using a pen." - - End If - - End Sub - ' - - ' - Private Sub inkCanvas1_StrokeErasing(ByVal sender As Object, _ - ByVal e As InkCanvasStrokeErasingEventArgs) - - If (e.Stroke.DrawingAttributes.IsHighlighter) Then - e.Cancel = True - - End If - End Sub - ' - - ' - Dim currentTimeGuid As Guid = New Guid("12345678-1234-1234-1234-123456789012") - - Private Sub Strokes_StrokesChanged(ByVal sender As Object, _ - ByVal args As StrokeCollectionChangedEventArgs) - - Dim s As Stroke - - For Each s In args.Added - s.AddPropertyData(currentTimeGuid, DateTime.Now) - Next - - End Sub - ' - - Private Sub inkCanvas1_StrokeCollected(ByVal sender As Object, ByVal e As InkCanvasStrokeCollectedEventArgs) - - End Sub - - Private Sub SaveStrokes_Click(ByVal sender As [Object], ByVal e As RoutedEventArgs) - - 'Dim isf As [Byte]() = inkCanvas1.Strokes.Save(PersistenceFormat.InkSerializedFormat, CompressionMode.Maximum) - - 'Dim fs As New FileStream("strokes.isf", FileMode.Create) - 'fs.Write(isf, 0, isf.Length) - 'fs.Close() - - End Sub - - Private Sub LoadStrokes_Click(ByVal sender As [Object], ByVal e As RoutedEventArgs) - - 'If Not File.Exists("strokes.isf") Then - ' MessageBox.Show("""strokes.isf"" does not exist." + _ - ' " Save the StrokeCollection before loading it.") - ' Return - 'End If - - 'Dim buffer(9999) As [Byte] - 'Dim fs As New FileStream("strokes.isf", FileMode.Open, _ - ' FileAccess.Read) - 'fs.Read(buffer, 0, buffer.Length) - 'fs.Close() - - 'Dim strokes As New StrokeCollection(buffer) - 'inkCanvas1.Strokes = strokes - - End Sub - 'ChangeAuthorsInk(aGuid, anAuthor, Colors.Red); - - ' - Private purposeGuid As New Guid("12345678-9012-3456-7890-123456789012") - Private penValue As String = "pen" - Private highlighterValue As String = "highlighter" - - ' Add a property to each DrawingAttributes object to - ' specify its use. - Private Sub AssignDrawingAttributesInstrument() - - inkDA.AddPropertyData(purposeGuid, penValue) - highlighterDA.AddPropertyData(purposeGuid, highlighterValue) - - End Sub - - ' Change the color of the ink that on the InkCanvas that used the pen. - Private Sub ChangeColors_Click(ByVal sender As [Object], _ - ByVal e As RoutedEventArgs) - - Dim s As Stroke - - For Each s In inkCanvas1.Strokes - If s.DrawingAttributes.ContainsPropertyData(purposeGuid) Then - - Dim data As Object = s.DrawingAttributes.GetPropertyData(purposeGuid) - - If TypeOf data Is String AndAlso CStr(data) = penValue Then - s.DrawingAttributes.Color = Colors.Black - End If - - End If - Next s - - End Sub - - ' - - Private Sub ChangePenColors_Click(ByVal sender As [Object], _ - ByVal e As RoutedEventArgs) - - If inkCanvas1.DefaultDrawingAttributes.Color = Colors.Black Then - inkDA.Color = Colors.AntiqueWhite - Else - inkDA.Color = Colors.Black - End If - - End Sub - - Private Sub ClearStrokes_Click(ByVal sender As [Object], ByVal e As RoutedEventArgs) - inkCanvas1.Strokes.Clear() - GetPropertyIds() - - End Sub - - Sub GetPropertyIds() - - ' - Dim propertyIds() As Guid - propertyIds = inkDA.GetPropertyDataIds() - ' - End Sub - - ' - Sub CopyAttributes(ByVal someStroke As Stroke) - Dim attributes As New DrawingAttributes() - attributes.Color = Colors.Red - someStroke.DrawingAttributes = attributes.Clone() - End Sub - ' - - ' - Private customProperty As New Guid("12345678-9012-3456-7890-123456789012") - - Sub RemovePropertyDataId(ByVal attributes As Ink.DrawingAttributes) - - If attributes.ContainsPropertyData(customProperty) Then - attributes.RemovePropertyData(customProperty) - End If - - End Sub - ' - - Private Sub AttributesEqual() - - ' - Dim attributes1 As New DrawingAttributes() - attributes1.Color = Colors.Blue - attributes1.StylusTip = StylusTip.Rectangle - attributes1.Height = 5 - attributes1.Width = 5 - - Dim attributes2 As New DrawingAttributes() - attributes2.Color = Colors.Blue - attributes2.StylusTip = StylusTip.Rectangle - attributes2.Height = 5 - attributes2.Width = 5 - ' - - ' - If attributes1 = attributes2 Then - MessageBox.Show("The DrawingAttributes are equal") - Else - MessageBox.Show("The DrawingAttributes are not equal") - End If - ' - - ' - If attributes1.Equals(attributes2) Then - MessageBox.Show("The DrawingAttributes are equal") - Else - MessageBox.Show("The DrawingAttributes are not equal") - End If - ' - - ' - If attributes1 <> attributes2 Then - MessageBox.Show("The DrawingAttributes are not equal") - Else - MessageBox.Show("The DrawingAttributes are equal") - End If - ' - End Sub - - Private Sub ValidateHeightAndWidth() - Dim DAHeight As Double = 100 - Dim DAWidth As Double = 100 - - ' - If DAHeight < DrawingAttributes.MinHeight Then - - DAHeight = DrawingAttributes.MinHeight - - ElseIf DAHeight > DrawingAttributes.MaxHeight Then - - DAHeight = DrawingAttributes.MaxHeight - - End If - - inkCanvas1.DefaultDrawingAttributes.Height = DAHeight - ' - - ' - If DAWidth < DrawingAttributes.MinWidth Then - - DAWidth = DrawingAttributes.MinWidth - - ElseIf DAWidth > DrawingAttributes.MaxWidth Then - - DAWidth = DrawingAttributes.MaxWidth - - End If - - inkCanvas1.DefaultDrawingAttributes.Width = DAWidth - ' - End Sub - - -End Class diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/codepage.vb b/snippets/visualbasic/System.Windows.Controls/Page/Overview/codepage.vb deleted file mode 100644 index f29fa8a6cc5..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/codepage.vb +++ /dev/null @@ -1,10 +0,0 @@ -' - -Imports System.Windows.Controls - -Public Class CodePage - Inherits Page - Public Sub New() - End Sub -End Class -' \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/homepage.xaml.vb b/snippets/visualbasic/System.Windows.Controls/Page/Overview/homepage.xaml.vb deleted file mode 100644 index 7c5b71f951d..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/homepage.xaml.vb +++ /dev/null @@ -1,19 +0,0 @@ -' - -Imports System.Windows -Imports System.Windows.Controls - -Namespace VisualBasic - Partial Public Class HomePage - Inherits Page - Public Sub New() - InitializeComponent() - - Me.WindowTitle = "Hello, Page!" - Me.WindowWidth = 500 - Me.WindowHeight = 300 - End Sub - - End Class -End Namespace -' \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/markupandcodebehindpage.xaml.vb b/snippets/visualbasic/System.Windows.Controls/Page/Overview/markupandcodebehindpage.xaml.vb deleted file mode 100644 index 79f27626ec4..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/markupandcodebehindpage.xaml.vb +++ /dev/null @@ -1,11 +0,0 @@ -' - -Imports System.Windows.Controls - -Partial Public Class MarkupAndCodeBehindPage - Inherits Page - Public Sub New() - InitializeComponent() - End Sub -End Class -' \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/assemblyinfo.vb b/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/assemblyinfo.vb deleted file mode 100644 index 731a8669d01..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/assemblyinfo.vb +++ /dev/null @@ -1,51 +0,0 @@ -#Region "Using directives" - -Imports System.Reflection -Imports System.Runtime.CompilerServices -Imports System.Resources -Imports System.Globalization -Imports System.Windows -Imports System.Runtime.InteropServices - -#End Region - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - - - - - - - - - - -'In order to begin building localizable applications, set -'CultureYouAreCodingWith in your .vbproj file -'inside a . For example, if you are using US english -'in your source files, set the to en-US. Then uncomment -'the NeutralResourceLanguage attribute below. Update the "en-US" in -'the line below to match the UICulture setting in the project file. - -'[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - - '(used if a resource is not found in the page, - ' or application resource dictionaries) - '(used if a resource is not found in the page, - ' app, or any theme specific resource dictionaries) - 'where the generic resource dictionary is located - where theme specific resource dictionaries are located - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Revision and Build Numbers -' by using the '*' as shown below: - diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/resources.designer.vb b/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/resources.designer.vb deleted file mode 100644 index 107e11a1731..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/resources.designer.vb +++ /dev/null @@ -1,62 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.1416 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - -Namespace My.Resources - - - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - ' This class was auto-generated by the StronglyTypedResourceBuilder - ' class via a tool like ResGen or Visual Studio. - ' To add or remove a member, edit your .ResX file then rerun ResGen - ' with the /str option, or rebuild your VS project. - - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - -' internal Resources() -' { -' } - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As New Global.System.Resources.ResourceManager("Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set(ByVal value As System.Globalization.CultureInfo) - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/settings.designer.vb b/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/settings.designer.vb deleted file mode 100644 index 2778274b6ca..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/my project/settings.designer.vb +++ /dev/null @@ -1,27 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.1416 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - -Namespace My - - - - Friend NotInheritable Partial Class Settings - Inherits System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = (CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()), Settings)) - - Public Shared ReadOnly Property [Default]() As Settings - Get - Return defaultInstance - End Get - End Property - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Controls/Page/Overview/pagesnippets.vbproj b/snippets/visualbasic/System.Windows.Controls/Page/Overview/pagesnippets.vbproj deleted file mode 100644 index dbe07fb5fab..00000000000 --- a/snippets/visualbasic/System.Windows.Controls/Page/Overview/pagesnippets.vbproj +++ /dev/null @@ -1,141 +0,0 @@ - - - Debug - AnyCPU - {CAFA2E63-4246-49BC-8299-072856BD3400} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - - VisualBasic - winexe - - v4.8 - On - Binary - Off - On - http://localhost/CSharp/ - true - Web - true - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - true - false - false - - 10.0.20821 - - - true - full - false - .\bin\Debug\ - true - true - - - false - true - .\bin\Release\ - false - true - - - - - - - - - - - 4.0 - - - - - - - - - - - - - Code - HomePage.xaml - - - Code - MarkupAndCodeBehindPage.xaml - - - - ResXFileCodeGenerator - Designer - Resources.Designer.vb - - - SettingsSingleFileGenerator - Settings.Designer.vb - - - True - True - Resources.resx - - - True - True - Settings.settings - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/hyperlinksnippets.vbproj b/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/hyperlinksnippets.vbproj deleted file mode 100644 index bbab5bb0d6e..00000000000 --- a/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/hyperlinksnippets.vbproj +++ /dev/null @@ -1,127 +0,0 @@ - - - - Debug - AnyCPU - - - HyperlinkSnippets - winexe - v4.8 - On - Binary - Off - On - - 10.0.20821 - {2431D3E3-6695-42BB-946F-236ED5A3D7E4} - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - AllRules.ruleset - - - false - true - .\bin\Release\ - false - true - AllRules.ruleset - - - - - - - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MyApp.xaml - Code - - - Window1.xaml - Code - - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Microsoft Visual Basic PowerPacks 10.0 - true - - - False - Windows Installer 3.1 - true - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/myapp.xaml.vb b/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/myapp.xaml.vb deleted file mode 100644 index baebf4ed0ed..00000000000 --- a/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/myapp.xaml.vb +++ /dev/null @@ -1,13 +0,0 @@ -Imports System.Xml -Imports System.Configuration - -Namespace HyperlinkSnippets - ''' - ''' Interaction logic for MyApp.xaml - ''' - - Partial Public Class MyApp - Inherits Application - - End Class -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb b/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb deleted file mode 100644 index 640ba8c7b59..00000000000 --- a/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb +++ /dev/null @@ -1,90 +0,0 @@ -Namespace HyperlinkSnippets - ''' - ''' Interaction logic for Window1.xaml - ''' - - Partial Public Class Window1 - Inherits Window - - Public Sub New() - InitializeComponent() - End Sub - - Private Sub WindowLoaded(ByVal sender As Object, ByVal args As RoutedEventArgs) - Constructors() - End Sub - - Private Sub Constructors() - With True - ' - ' A child Inline element for the new Hyperlink element. - Dim runx As New Run("Link text for the Hyperlink element.") - - ' After this line executes, the new element "hyper1" - ' contains the specified Inline element, "runx". - Dim hyperl As New Hyperlink(runx) - ' - End With - - With True - ' - ' A child Inline element for the new Hyperlink element. - Dim runx As New Run("Link text for the Hyperlink element.") - - ' An empty paragraph will serve as the container for the new Hyperlink element. - Dim parx As New Paragraph() - - ' After this line executes, the new element "hyperl" - ' contains the specified Inline element, "runx". Also, "hyperl" is - ' inserted at the point indicated by the insertionPosition parameter, - ' which in this case indicates the content start position in the Paragraph - ' element "parx". - Dim hyperl As New Hyperlink(runx, parx.ContentStart) - ' - End With - With True - ' - ' Create a paragraph and three text runs to serve as example content. - Dim parx As New Paragraph() - Dim run1 As New Run("Text run 1.") - Dim run2 As New Run("Text to link.") - Dim run3 As New Run("Text run 3.") - - ' Add the three text runs to the paragraph, separated by linebreaks. - parx.Inlines.Add(run1) - parx.Inlines.Add(New LineBreak()) - parx.Inlines.Add(run2) - parx.Inlines.Add(New LineBreak()) - parx.Inlines.Add(run3) - - ' After this line executes, the selection of content - ' indicated by the "start" and "end" parameters will be - ' enclosed by the new Hyperlink. In this case, the new Hyperlink - ' will enclose the entire contents of the text run "run2". - Dim hyperl As New Hyperlink(run2.ContentStart, run2.ContentEnd) - ' - - flowDoc.Blocks.Add(parx) - End With - - - - End Sub - - Private Sub Props() - ' - Dim parx As New Paragraph() - Dim run1 As New Run("Text preceeding the hyperlink.") - Dim run2 As New Run("Text following the hyperlink.") - Dim run3 As New Run("Link Text.") - - Dim hyperl As New Hyperlink(run3) - hyperl.NavigateUri = New Uri("http://search.msn.com") - - parx.Inlines.Add(run1) - parx.Inlines.Add(hyperl) - parx.Inlines.Add(run2) - ' - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/CustomRenderedStroke.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/CustomRenderedStroke.vb deleted file mode 100644 index 5a2846cd872..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/CustomRenderedStroke.vb +++ /dev/null @@ -1,73 +0,0 @@ - -Imports System.Collections.Generic -Imports System.Text -Imports System.Windows -Imports System.Windows.Ink -Imports System.Windows.Input -Imports System.Windows.Media - -' - -Class ShadowedStroke - Inherits Stroke - - Private shadow As New Guid("12345678-9012-3456-7890-123456789012") - - Public Sub New(ByVal stylusPoints As StylusPointCollection, ByVal drawingAttributes As DrawingAttributes) - MyBase.New(stylusPoints, drawingAttributes) - - AddHandler Me.DrawingAttributes.PropertyDataChanged, AddressOf DrawingAttributes_PropertyDataChanged - - End Sub - - Public Property Shadowed() As Boolean - - ' Return the value of the custom property, shadow. - ' If there is no custom property, return false. - Get - If Not Me.DrawingAttributes.ContainsPropertyData(shadow) Then - Return False - End If - - Dim propertyData As Object = Me.DrawingAttributes.GetPropertyData(shadow) - - If TypeOf propertyData Is Boolean Then - Return CType(propertyData, Boolean) - Else - Return False - End If - End Get - - ' Set the value of the custom property. - Set - Me.DrawingAttributes.AddPropertyData(shadow, value) - End Set - - End Property - - - Private Sub DrawingAttributes_PropertyDataChanged(ByVal sender As Object, ByVal e As PropertyDataChangedEventArgs) - - Me.OnInvalidated(New EventArgs()) - - End Sub - - Protected Overrides Sub DrawCore(ByVal context As System.Windows.Media.DrawingContext, _ - ByVal overriddenAttributes As DrawingAttributes) - ' create a drop shadow - ' - If Me.Shadowed Then - Dim pathGeometry As Geometry = Me.GetGeometry(overriddenAttributes).Clone() - pathGeometry.Transform = New TranslateTransform(5, 0) - Try - context.PushOpacity(0.5) - context.DrawGeometry(Brushes.DarkGray, Nothing, pathGeometry) - Finally - context.Pop() - End Try - End If - MyBase.DrawCore(context, overriddenAttributes) - - End Sub -End Class -' \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Ink3d.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Ink3d.vb deleted file mode 100644 index c3d48f0d8f5..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Ink3d.vb +++ /dev/null @@ -1,188 +0,0 @@ - -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Media -Imports System.Windows.Ink -Imports System.Windows.Input -Imports System.Collections -Imports System.Windows.Input.StylusPlugIns - - -' This control allows the user to input ink and display it -' with 3d visual effects. - -Public Class Ink3d - Inherits Border - - Private inkDA As DrawingAttributes - Private presenter As InkPresenter - Private stylusPoints As StylusPointCollection - Private renderer As New DynamicRenderer() - - Public Sub New() - - ' Use an InkPresenter to display the strokes on the control. - presenter = New InkPresenter() - Me.Child = presenter - - inkDA = New DrawingAttributes() - inkDA.Width = 5 - inkDA.Height = 5 - 'inkDA.AddPropertyData(shadow, false); - 'inkDA.PropertyDataChanged += new PropertyDataChangedEventHandler(inkDA_PropertyDataChanged); - renderer.DrawingAttributes = inkDA - Me.StylusPlugIns.Add(renderer) - presenter.AttachVisuals(renderer.RootVisual, renderer.DrawingAttributes) - - End Sub - - - Shared Sub New() - ' Allow ink to be drawn only within the bounds of the control. - Dim owner As Type = GetType(Ink3d) - ClipToBoundsProperty.OverrideMetadata(owner, New FrameworkPropertyMetadata(True)) - - End Sub - - - - - ' Remove all the strokes from the control. - Public Sub ClearStrokes() - presenter.Strokes.Clear() - - End Sub - - - - - Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs) - - MyBase.OnStylusDown(e) - - stylusPoints = New StylusPointCollection() - - stylusPoints.Add(e.GetStylusPoints(Me, stylusPoints.Description)) - - End Sub - - - - - Protected Overrides Sub OnStylusMove(ByVal e As StylusEventArgs) - - MyBase.OnStylusMove(e) - - If stylusPoints Is Nothing Then - stylusPoints = New StylusPointCollection() - End If - stylusPoints.Add(e.GetStylusPoints(Me, stylusPoints.Description)) - - End Sub - - - - - Protected Overrides Sub OnStylusUp(ByVal e As StylusEventArgs) - - MyBase.OnStylusUp(e) - - If stylusPoints Is Nothing Then - stylusPoints = New StylusPointCollection() - End If - stylusPoints.Add(e.GetStylusPoints(Me, stylusPoints.Description)) - - AddStroke() - - End Sub - - - - Protected Overrides Sub OnMouseLeftButtonUp(ByVal e As MouseButtonEventArgs) - - MyBase.OnMouseLeftButtonUp(e) - - If Not (e.StylusDevice Is Nothing) Then - Return - End If - If stylusPoints Is Nothing Then - stylusPoints = New StylusPointCollection() - End If - Dim pt As Point = e.GetPosition(Me) - - stylusPoints.Add(New StylusPoint(pt.X, pt.Y)) - - AddStroke() - - End Sub - - - - Protected Overrides Sub OnMouseLeftButtonDown(ByVal e As MouseButtonEventArgs) - - MyBase.OnMouseLeftButtonDown(e) - - If Not (e.StylusDevice Is Nothing) Then - Return - End If - stylusPoints = New StylusPointCollection() - - Dim pt As Point = e.GetPosition(Me) - - stylusPoints.Add(New StylusPoint(pt.X, pt.Y)) - - End Sub - - - - - Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs) - - MyBase.OnMouseMove(e) - - If Not (e.StylusDevice Is Nothing) Then - Return - End If - If e.LeftButton = MouseButtonState.Released Then - Return - End If - If stylusPoints Is Nothing Then - stylusPoints = New StylusPointCollection() - End If - Dim pt As Point = e.GetPosition(Me) - - stylusPoints.Add(New StylusPoint(pt.X, pt.Y)) - - End Sub - - - - Private Sub AddStroke() - Dim newStroke As New ShadowedStroke(stylusPoints, inkDA) - newStroke.Shadowed = strokesAreShadowed - - presenter.Strokes.Add(newStroke) - - stylusPoints = Nothing - - End Sub - - Private strokesAreShadowed As Boolean - - - Public Property Shadowed() As Boolean - Get - Return strokesAreShadowed - End Get - - ' Set the value of the custom property. - Set - strokesAreShadowed = value - - Dim s As ShadowedStroke - For Each s In presenter.Strokes - s.Shadowed = strokesAreShadowed - Next s - End Set - End Property -End Class diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/AssemblyInfo.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/AssemblyInfo.vb deleted file mode 100644 index 0262a6e12f9..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,34 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyEvents.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyEvents.vb deleted file mode 100644 index 0fd4598d1c9..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyEvents.vb +++ /dev/null @@ -1,13 +0,0 @@ -Namespace My - Partial Friend Class MyApplication - - 'Use the editor window dropdowns in the Application pane of the Project Designer to handle MyApplication Events - ' - 'Startup: Raised when the application starts, before the startup form is created. - 'Shutdown: Raised after all application forms are closed. This event is not raised if the application is terminating abnormally. - 'UnhandledException: Raised if the application encounters an unhandled exception. - 'StartupNextInstance: Raised when launching a single-instance application and the application is already active. - 'NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. - - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyResources.Designer.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyResources.Designer.vb deleted file mode 100644 index 706736c64db..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MyResources.Designer.vb +++ /dev/null @@ -1,61 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module MyResources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("StrokeCollectionShadow.MyResources", GetType(MyResources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MySettings.Designer.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MySettings.Designer.vb deleted file mode 100644 index 270200cddc0..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/My Project/MySettings.Designer.vb +++ /dev/null @@ -1,28 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - - _ -Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings),MySettings) - - Public Shared ReadOnly Property [Default]() As MySettings - Get - Return defaultInstance - End Get - End Property -End Class diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/MyApp.xaml.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/MyApp.xaml.vb deleted file mode 100644 index 71627158a9d..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/MyApp.xaml.vb +++ /dev/null @@ -1,22 +0,0 @@ - -Imports System.Windows -Imports System.Data -Imports System.Xml -Imports System.Configuration - - -'/ -'/ Interaction logic for MyApp.xaml -'/ - -Namespace StrokeCollectionShadow - Class MyApp - Inherits Application - - Private Sub AppStartingUp(ByVal sender As Object, ByVal e As StartupEventArgs) - Dim mainWindow As New Window1() - mainWindow.Show() - - End Sub - End Class -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/StrokeCollectionShadow.vbproj b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/StrokeCollectionShadow.vbproj deleted file mode 100644 index 2aa2c4411e1..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/StrokeCollectionShadow.vbproj +++ /dev/null @@ -1,158 +0,0 @@ - - - Debug - AnyCPU - {8E1B4E01-08F4-49EA-95FA-586EA9CC3AE7} - WinExe - $(OutputType) - StrokeCollectionShadow - StrokeCollectionShadow - 10.0.20821 - 2.0 - en-US - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - true - true - true - bin\ - StrokeCollectionShadow.xml - 42016,42017,42018,42019,42032,42314 - - - false - false - true - false - true - bin\ - StrokeCollectionShadow.xml - 42016,42017,42018,42019,42032,42314 - - - - - - - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\UIAutomationProvider.dll - - - False - ..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Windows\v6.0.5070\UIAutomationTypes.dll - - - - - - 4.0 - - - ..\..\..\..\WindowsFormsIntegration.dll - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - True - True - MyResources.resx - - - Code - - - True - True - MySettings.settings - - - VbMyResourcesResXFileCodeGenerator - My.Resources - MyResources.Designer.vb - - - - SettingsSingleFileGenerator - MySettings.Designer.vb - - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Window1.xaml.vb b/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Window1.xaml.vb deleted file mode 100644 index 3f1b9ac303c..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/Window1.xaml.vb +++ /dev/null @@ -1,38 +0,0 @@ - -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Data -Imports System.Windows.Documents -Imports System.Windows.Media -Imports System.Windows.Shapes - - - -'/ -'/ Interaction logic for Window1.xaml -'/ -Namespace StrokeCollectionShadow - - Class Window1 - Inherits Window - - Dim myInkSelector As New Ink3d() - Public Sub New() - InitializeComponent() - - - myInkSelector.Background = Brushes.Green - root.Children.Add(myInkSelector) - - End Sub - - - ' To use Loaded event put Loaded="WindowLoaded" attribute in root element of .xaml file. - ' private void WindowLoaded(object sender, EventArgs e) {} - ' Sample event handler: - Private Sub Toggle3d_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - myInkSelector.Shadowed = Not myInkSelector.Shadowed - - End Sub - End Class -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.vb deleted file mode 100644 index e71608485a3..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.vb +++ /dev/null @@ -1,88 +0,0 @@ - -Imports System.Collections.Generic -Imports System.Text -Imports System.Windows -Imports System.Windows.Ink -Imports System.Windows.Input -Imports System.Windows.Media - -Namespace StrokeSnippets_VB - - ' - ' Enumerator that specifies the drawing mode of the stroke. - - Public Enum DrawingMode - Solid - StyulusPoints - End Enum 'DrawingMode - ' - - Class CustomRenderedStroke - Inherits MyStroke - - Public Sub New(ByVal points As StylusPointCollection) - MyBase.New(points) - - End Sub - - - - Public Sub New(ByVal stylusPoints As StylusPointCollection, ByVal drawingAttributes As DrawingAttributes) - MyBase.New(stylusPoints, drawingAttributes) - - End Sub - - - ' - Private strokeMode As DrawingMode = DrawingMode.Solid - - ' Property that specifies whether to draw a solid stroke or the stylus points - Public Property Mode() As DrawingMode - - Get - Return strokeMode - End Get - - Set(ByVal value As DrawingMode) - If strokeMode <> value Then - strokeMode = value - Me.OnInvalidated(New EventArgs()) - End If - End Set - - End Property - - - Protected Overrides Sub DrawCore(ByVal context As System.Windows.Media.DrawingContext, _ - ByVal overridedAttributes As DrawingAttributes) - Dim strokeBrush As New SolidColorBrush(overridedAttributes.Color) - - ' If strokeMode it set to Solid, draw the strokes regularly. - ' Otherwise, draw the stylus points. - If strokeMode = DrawingMode.Solid Then - Dim geometry As Geometry = GetGeometry(overridedAttributes) - context.DrawGeometry(strokeBrush, Nothing, geometry) - ' strokeMode == DrawingMode.StylusPoints - Else - Dim points As StylusPointCollection - - ' Get the stylus points used to draw the stroke. The points used depends on - ' the value of FitToCurve. - If Me.DrawingAttributes.FitToCurve Then - points = Me.GetBezierStylusPoints() - Else - points = Me.StylusPoints - End If - - ' Draw a circle at each stylus point. - Dim p As StylusPoint - For Each p In points - context.DrawEllipse(Nothing, New Pen(strokeBrush, 1), CType(p, Point), 5, 5) - Next p - End If - - End Sub - ' - - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/AssemblyInfo.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/AssemblyInfo.vb deleted file mode 100644 index 6a4df1c36f5..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,34 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyEvents.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyEvents.vb deleted file mode 100644 index 0fd4598d1c9..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyEvents.vb +++ /dev/null @@ -1,13 +0,0 @@ -Namespace My - Partial Friend Class MyApplication - - 'Use the editor window dropdowns in the Application pane of the Project Designer to handle MyApplication Events - ' - 'Startup: Raised when the application starts, before the startup form is created. - 'Shutdown: Raised after all application forms are closed. This event is not raised if the application is terminating abnormally. - 'UnhandledException: Raised if the application encounters an unhandled exception. - 'StartupNextInstance: Raised when launching a single-instance application and the application is already active. - 'NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. - - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyResources.Designer.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyResources.Designer.vb deleted file mode 100644 index 24e5ec69b59..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MyResources.Designer.vb +++ /dev/null @@ -1,61 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module MyResources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("StrokeSnippets_VB.MyResources", GetType(MyResources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MySettings.Designer.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MySettings.Designer.vb deleted file mode 100644 index 270200cddc0..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/My Project/MySettings.Designer.vb +++ /dev/null @@ -1,28 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - - _ -Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings),MySettings) - - Public Shared ReadOnly Property [Default]() As MySettings - Get - Return defaultInstance - End Get - End Property -End Class diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyApp.xaml.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyApp.xaml.vb deleted file mode 100644 index 6083a7b199b..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyApp.xaml.vb +++ /dev/null @@ -1,36 +0,0 @@ - -Imports System.Windows -Imports System.Data -Imports System.Xml -Imports System.Configuration - - -'/ -'/ Interaction logic for MyApp.xaml -'/ -Namespace StrokeSnippets_VB - - Class MyApp - Inherits Application - ' - 'ToDo: Error processing original source shown below - ' - ' public partial class MyApp : Application - '------------^--- 'class', 'struct', 'interface' or 'delegate' expected - ' - 'ToDo: Error processing original source shown below - ' - ' public partial class MyApp : Application - '--------------------^--- Syntax error: ';' expected - Private Sub AppStartingUp(ByVal sender As Object, ByVal e As StartupEventArgs) - Dim mainWindow As New Window1() - mainWindow.Show() - - End Sub - End Class - ' - 'ToDo: Error processing original source shown below - ' } - '} - '-^--- expression expected -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb deleted file mode 100644 index 5f666c8aff0..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb +++ /dev/null @@ -1,528 +0,0 @@ - -Imports System.Collections -Imports System.IO -Imports System.Runtime.InteropServices -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Ink -Imports System.Windows.Input -Imports System.Windows.Media -Imports System.Windows.Input.StylusPlugIns - - -Namespace StrokeSnippets_VB - - ' This control initializes with strokes already on it and allows the - ' user to erase the strokes with the stylus. - ' Need this in MyStroke - _ - Public Class MyBorder - Inherits Border - - Public Enum sMode - add - clip - remove - surround - End Enum 'sMode - - Private _state As sMode - - - Public Property state() As sMode - Get - Return _state - End Get - Set(ByVal value As sMode) - _state = Value - End Set - End Property - - Private _shadow As Boolean - - - Public Property shadow() As Boolean - Get - Return _shadow - End Get - Set(ByVal value As Boolean) - _shadow = Value - End Set - End Property - - Private _fitToCurve As Boolean = False - - - Public Property FitToCurve() As Boolean - Get - Return _fitToCurve - End Get - - Set(ByVal value As Boolean) - _fitToCurve = Value - End Set - End Property - - - Private gotFirstStroke As Boolean - - ' To save strokes in a file - Private myFile As StreamWriter - Private Shared STROKE_FILE As String = "c:\temp\stroke" - - Private myStroke, shadowStroke As Stroke - Private myNewStroke As MyStroke - Private myStrokeCollection As StrokeCollection - 'StylusPackets[] myStylusPacketsArray; - Private stylusPoints As StylusPointCollection - Private myIncrementalHitTester As IncrementalHitTester - Private myInkPresenter As InkPresenter - Private renderer As DynamicRenderer - - Private inkAttributes As DrawingAttributes - - ' The base-64 encoded string that contains ink data - ' in ink serialized format (ISF). - Private strokesString As String = "base64:AOoFAxBIEEVqGwIAWf9GahsCAFn/GRQyCACAEAIAAABCMwgAgA" + "wCAAAAQhWrqtNBq6rTQaVh0MSr+ivFHyEVVFVVVVV1OkBUVVVVVXU6QJ7" + "0SZ80DJrAVFVVVVV/pcAKU3yC/gEb+AX/k5Z8PwWBO5KktgJSUAAKjzyC" + "wBZYLEoCJLd+Cbti873JlTUvn158doCC/gKb+ApwAJslSywE2ALAAWPPI" + "FhKWBKWAKAmwJVglAKACiMjgv3d+8Xi+fHWM2WC0zcm89+NSoL+A5P4Dl" + "uNlhFIqpLKAAoaF4L+AhP4CFAWAWCggv4Dc/gNty2yy5SrlKAKIhyC/gI" + "b+Ai+JZc2XZOyb46vLQCC/gOL+A5YDNlWFjN3CwAKQFeC/gOr+A7VhUFZ" + "KCsS2WTc2SyhKuWVLR3ly2LAXx574ssUgv4Dm/gOcCwEEpUTYSixUsuWy" + "gVZ79AQsWGyWUAKLCiC/gQT+BA9SWbllDfGqy3Lcu+OmfH8EIL+BDv4EP" + "XLKSpY3lVFhZuVZvKACkFggv4F2/gXlKLFuCVKTcsqUlkoRKBmk8zfFll" + "S2ySlACwAgv4Ds/gO+WWWWLBLFllllSksAoSkWG1kSbFu5AoAAAo/YoL+" + "Biv4GJJU+P4qSalUBKWdkBYCbm+Nliyk1CVKgCxYNYqC/gQb+BBwO8ABY" + "olDz4gAEzaw2AVCUKAsWCooCiAegv4Hw/gfEJe8zUoSgLCC/gNT+A0xM7" + "Gdmdliay2VaAo0PoL+B7v4Hx5Yq3lc2xZsseeC3N8aDXjUpWW4UIL+A5P" + "4DnhYqAIWFkqpcrLZuJuWqSyxVAovNoL+CJP4IjnlkDvHeSbSVd9FqFlI" + "oWAAgv4Dk/gOVc7gbmdyZ1LajFFJmlRKsoAKVXmC/go7+CjdRvredypaK" + "myLC7ytZQqFiyWbikAEvfg2pSVKS7liSwWJNsrbi4CC/gQD+A/9M2ACxU" + "qKjcVuXKiosCWWKQSyhvKRUUWULCwEmyyu4gA=" - - - Public Sub New() - gotFirstStroke = False - - ' Set the default state if no button is clicked - state = sMode.add - myInkPresenter = New InkPresenter() - - Child = myInkPresenter - - inkAttributes = New DrawingAttributes() - inkAttributes.Color = Colors.Green - inkAttributes.Width = 5 - inkAttributes.Height = 5 - - renderer = New DynamicRenderer() - renderer.DrawingAttributes = inkAttributes - Me.StylusPlugIns.Add(renderer) - myInkPresenter.AttachVisuals(renderer.RootVisual, renderer.DrawingAttributes) - - StrokeConstructorSample() - - End Sub - - - Shared Sub New() - ' Allow ink to be drawn only within the bounds of the control. - Dim owner As Type = GetType(MyBorder) - ClipToBoundsProperty.OverrideMetadata(owner, New FrameworkPropertyMetadata(True)) - - End Sub - - - - - ' Prepare to collect stylus packets. Get the - ' IncrementalHitTester from the InkPresenter's - ' StrokeCollection and subscribe to its StrokeHitChanged event. - Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs) - MyBase.OnStylusDown(e) - - Select Case state - Case sMode.add - Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me) - stylusPoints = New StylusPointCollection(eventPoints.Description) - Case sMode.surround - ' Use StrokeChanged event handler to detect stroke encirclement when using percentage - myIncrementalHitTester = myInkPresenter.Strokes.GetIncrementalLassoHitTester(50) - - AddHandler CType(myIncrementalHitTester, IncrementalLassoHitTester).SelectionChanged, AddressOf myIHT_StrokeHitChanged - - myIncrementalHitTester.AddPoints(e.GetStylusPoints(Me)) - Case Else - ' Otherwise we detect when the IHT hits the existing strokes - ' Use StrokeIntersectionChanged event handler to detect stroke hit when using stylus - Dim eraserTip As New EllipseStylusShape(3, 3, 0) - - myIncrementalHitTester = myInkPresenter.Strokes.GetIncrementalStrokeHitTester(eraserTip) - - AddHandler CType(myIncrementalHitTester, IncrementalStrokeHitTester).StrokeHit, AddressOf myIHT_StrokeIntersectionChanged - - myIncrementalHitTester.AddPoints(e.GetStylusPoints(Me)) - End Select - - e.Handled = True - - End Sub - - - ' Collect the StylusPackets as the stylus moves. - Protected Overrides Sub OnStylusMove(ByVal e As StylusEventArgs) - Select Case state - Case sMode.add - stylusPoints.Add(e.GetStylusPoints(Me)) - Case Else - myIncrementalHitTester.AddPoints(e.GetStylusPoints(Me)) - End Select - - e.Handled = True - - End Sub - - - ' Unsubscribe from the StrokeHitChanged event when the - ' user lifts the stylus. - Protected Overrides Sub OnStylusUp(ByVal e As StylusEventArgs) - Select Case state - Case sMode.add - ' Add the stylus points to a StylusPointCollection - ' in the StylusUp event. e is a StylusEventArgs object. - stylusPoints.Add(e.GetStylusPoints(Me)) - - ' Create new stroke from the collected stylus points. - 'myNewStroke = new MyStroke(stylusPoints, inkAttributes.Clone()); - myNewStroke = New CustomRenderedStroke(stylusPoints, inkAttributes.Clone()) - - ' - ' Handle DrawingAtributesChanged event on stroke - AddHandler myNewStroke.DrawingAttributesChanged, AddressOf myNewStroke_DrawingAttributesChanged - ' - - ' - ' Handle DrawingAttributesReplaced event on stroke - AddHandler myNewStroke.DrawingAttributesReplaced, AddressOf myNewStroke_DrawingAttributesReplaced - ' - - AddHandler myNewStroke.StylusPointsChanged, AddressOf myNewStroke_StylusPointsChanged - AddHandler myNewStroke.StylusPointsReplaced, AddressOf myNewStroke_StylusPointsReplaced - AddHandler myNewStroke.StylusPoints.Changed, AddressOf StylusPoints_Changed - - 'myNewStroke.MoveStylusPoints(); - - ' - ' Handle PropertyDataChanged event on stroke - AddHandler myNewStroke.PropertyDataChanged, AddressOf myNewStroke_PropertyDataChanged - ' - - ' - ' Get packets from stroke - 'StylusPackets myStylusPackets = myNewStroke.StylusPackets; - ' - - ' This should fire a DrawingAttributesChanged event - - ' - ' Make the new stroke green. - myNewStroke.DrawingAttributes.Color = Colors.Green - ' - - ' Add stroke to InkPresenter - 'myNewStroke.DrawingAttributes = inkAttributes.Clone(); - myNewStroke.DrawingAttributes.FitToCurve = FitToCurve - - myInkPresenter.Strokes.Add(myNewStroke) - - CompareStrokePoints(myNewStroke) - - ' Add pink shadow if requested - If shadow Then - shadowStroke = myNewStroke.Clone() - shadowStroke.Transform(New Matrix(1, 0, 0, 1, 2, 0), False) - shadowStroke.DrawingAttributes.Color = Colors.Pink - myInkPresenter.Strokes.Add(shadowStroke) - End If - - Case sMode.surround - - myIncrementalHitTester.AddPoints(e.GetStylusPoints(Me)) - - ' Disable SelectionChanged event handler when using encirclement - RemoveHandler CType(myIncrementalHitTester, IncrementalLassoHitTester).SelectionChanged, _ - AddressOf myIHT_StrokeHitChanged - - 'removehandler myincrementalhittester.se - Case Else - myIncrementalHitTester.AddPoints(e.GetStylusPoints(Me)) - - ' Disable StrokeHit event handler when using stylus hits - AddHandler CType(myIncrementalHitTester, IncrementalStrokeHitTester).StrokeHit, _ - AddressOf myIHT_StrokeIntersectionChanged - End Select - - e.Handled = True - - End Sub - - - ' - Private Sub StylusPoints_Changed(ByVal sender As Object, ByVal e As EventArgs) - - MessageBox.Show("stylus points changed") - - End Sub - - ' - ' - Private Sub myNewStroke_StylusPointsChanged(ByVal sender As Object, ByVal e As EventArgs) - - MessageBox.Show("stylus points changed") - - End Sub - - ' - ' - Private Sub myNewStroke_StylusPointsReplaced(ByVal sender As Object, ByVal e As StylusPointsReplacedEventArgs) - - MessageBox.Show("stylus points replaced") - - End Sub - - ' - Sub CompareStrokePoints(ByVal aStroke As Stroke) - - End Sub - - - - Private Sub myNewStroke_PropertyDataChanged(ByVal sender As Object, ByVal e As PropertyDataChangedEventArgs) - - End Sub - - - Private Sub myNewStroke_DrawingAttributesReplaced(ByVal sender As Object, ByVal e As DrawingAttributesReplacedEventArgs) - - End Sub - - - Private Sub myNewStroke_DrawingAttributesChanged(ByVal sender As Object, ByVal e As PropertyDataChangedEventArgs) - - End Sub - - - ' When the stylus clips a stroke, - ' delete that stroke. - ' When the stylus erases a stoke, - ' replace the stroke with the strokes returned by - ' the Stroke.Erase method. - Private Sub myIHT_StrokeIntersectionChanged(ByVal sender As Object, ByVal e As StrokeHitEventArgs) - Dim thisStroke As Stroke = e.HitStroke - - ' - Dim myRect As Rect = thisStroke.GetBounds() - ' - - If state = sMode.clip Then - - ' ***Stroke.Clip*** - ' - ' Get the intersections when the stroke is clipped. - ' e is a StrokeIntersectionChangedEventArgs object in the - ' StrokeIntersectionChanged event handler. - Dim clipResult As StrokeCollection = e.GetPointEraseResults() - - Dim strokesToReplace As New StrokeCollection() - - strokesToReplace.Add(thisStroke) - - ' Replace the old stroke with the new one. - If clipResult.Count > 0 Then - myInkPresenter.Strokes.Replace(strokesToReplace, clipResult) - Else - myInkPresenter.Strokes.Remove(strokesToReplace) - End If - ' - - If Not gotFirstStroke Then - - ' - ' Create a guid for the date/timestamp. - Dim dtGuid As New Guid("03457307-3475-3450-3035-640435034540") - - Dim now As DateTime = DateTime.Now - - ' Check whether the property is already saved - If thisStroke.ContainsPropertyData(dtGuid) Then - ' Check whether the existing property matches the current date/timestamp - Dim oldDT As DateTime = CType(thisStroke.GetPropertyData(dtGuid), DateTime) - - If oldDT <> now Then - ' Update the current date and time - thisStroke.AddPropertyData(dtGuid, now) - End If - End If - ' - - ' - ' Create a guid for the date/timestamp. - Dim dateTimeGuid As New Guid("03457307-3475-3450-3035-045430534046") - - Dim current As DateTime = DateTime.Now - - ' Check whether the property is already saved - If thisStroke.ContainsPropertyData(dateTimeGuid) Then - Dim oldDateTime As DateTime = CType(thisStroke.GetPropertyData(dateTimeGuid), DateTime) - - ' Check whether the existing property matches the current date/timestamp - If Not oldDateTime = current Then - ' Delete the custom property - thisStroke.RemovePropertyData(dateTimeGuid) - End If - End If - ' - - End If - - ' - ' Save the stroke as an array of Point objects - 'Point[] myPoints = thisStroke.GetRenderingPoints(); - ' - ' Port to VB if I ever get this working! - ' See if we can figure out which stroke point(s) got hit - 'StrokeIntersection[] myStrokeIntersections = e.GetHitStrokeIntersections(); - 'Point[] myStrokeIntersectionPoints = new Point[myStrokeIntersections.Length]; - 'int p = 0; - 'for (int k = 0; k < myStrokeIntersections.Length; k++) - '{ - ' StrokeIntersection s = myStrokeIntersections[k]; - ' if (s.HitBegin != StrokeIntersection.BeforeFirst && s.HitEnd != StrokeIntersection. AfterLast) - ' { - ' // Get stroke point that is closest to average between HitBegin and HitEnd: - ' double x = s.HitBegin; - ' double y = s.HitEnd; - ' double midPoint = (x + y) / 2; - ' int middlePoint = (int)midPoint; - ' // Now add that Point from the existing stroke points - ' myStrokeIntersectionPoints[p] = myPoints[middlePoint]; - ' p++; - ' } - '} - ' Get DrawingContext for InkPresenter - 'VisualCollection myVisuals = VisualOperations.GetChildren(myInkPresenter); - 'DrawingVisual myVisual = new DrawingVisual(); - 'DrawingContext myContext = myVisual.RenderOpen(); - '// Draw midpoints of stroke intersections a little green circles - 'for (int j = 0; j < myStrokeIntersectionPoints.Length; j++) - '{ - ' // Draw green circles around each point - ' myContext.DrawGeometry(Brushes.Green, - ' new Pen(Brushes.Green, 1.0), - ' new EllipseGeometry(myStrokeIntersectionPoints[j], 4.0, 4.0)); - '} - 'myContext.Close(); - 'myVisuals.Add(myVisual); - - ' Do I have to do something here to display the revised InkPresenter? - - ' Open the file to hold strokes - ' if the file already exists, overwrite it - 'myFile = new StreamWriter(File.Open(STROKE_FILE, FileMode.Create)); - 'Point myPoint; - 'int xVal, yVal; - 'for (int i = 0; i < myPoints.Length; i++) - '{ - ' myPoint = myPoints[i]; - ' xVal = (int)myPoint.X; - ' yVal = (int)myPoint.Y; - ' // Save the point to a file - ' myFile.WriteLine(xVal.ToString() + " " + yVal.ToString()); - '} - 'myFile.Flush(); - 'myFile.Close(); - 'gotFirstStroke = true; - Else - ' ***erase** - ' - ' Remove the stokee that is hit. - myInkPresenter.Strokes.Remove(e.HitStroke) - End If - ' - End Sub - - - ' When the stylus encircles a stroke, - ' erase that stroke. - Private Sub myIHT_StrokeHitChanged(ByVal sender As Object, ByVal e As LassoSelectionChangedEventArgs) - - 'Dim selectedStroke As MyStroke - For Each selectedStroke As MyStroke In e.SelectedStrokes - selectedStroke.Selected = True - Next selectedStroke 'stroke.DrawingAttributes.Color = Colors.Red; - - For Each stroke As MyStroke In e.DeselectedStrokes - stroke.Selected = False - Next stroke - 'stroke.DrawingAttributes.Color = Colors.Green; - End Sub - - - ' Remove the encircled stroke. - 'if (eraseResult.Count > 0) - '{ - ' myInkPresenter.Strokes.Remove(eraseResult); - '} - - Public Sub ChangeDrawingMode(ByVal mode As DrawingMode) - If myInkPresenter.Strokes.Count = 0 Then - Return - End If - - If Not TypeOf myInkPresenter.Strokes(0) Is CustomRenderedStroke Then - Return - End If - - Dim s As CustomRenderedStroke - For Each s In myInkPresenter.Strokes - s.Mode = mode - Next s - - End Sub - - - Private Sub StrokeConstructorSample() - ' - Dim drawingAttributes1 As New DrawingAttributes() - drawingAttributes1.Color = Colors.Green - - Dim stylusPoint1 As StylusPoint = New StylusPoint(100, 100) - Dim stylusPoint2 As StylusPoint = New StylusPoint(100, 200) - Dim stylusPoint3 As StylusPoint = New StylusPoint(200, 200) - Dim stylusPoint4 As StylusPoint = New StylusPoint(200, 100) - Dim stylusPoint5 As StylusPoint = New StylusPoint(100, 100) - - Dim points() As StylusPoint = {stylusPoint1, stylusPoint2, _ - stylusPoint3, stylusPoint4, stylusPoint1} - - Dim pointCollection As New StylusPointCollection(points) - - Dim NewStroke As Stroke = New Stroke(pointCollection, drawingAttributes1) - - myInkPresenter.Strokes.Add(NewStroke) - ' - - End Sub - - ' - - ' - Function GetLittleRedStroke(ByVal theStroke As Stroke) As Stroke - ' Copy the incoming stroke - Dim sCopy As Stroke = theStroke.Clone() - - ' Scale it by 50% - Dim xform As New Matrix() - xform.Scale(0.5, 0.5) - - sCopy.Transform(xform, False) - - ' Color it red - sCopy.DrawingAttributes.Color = Colors.Red - - ' Return the new stroke - Return sCopy - - End Function 'getLittleRedStroke - - ' - - ' - End Class - -End Namespace diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb deleted file mode 100644 index ef1641d4272..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb +++ /dev/null @@ -1,184 +0,0 @@ - -Imports System.Runtime.InteropServices -Imports System.Windows -Imports System.Windows.Ink -Imports System.Windows.Input -Imports System.Windows.Media - -Imports System.Collections.Generic -Imports System.Text - - -Namespace StrokeSnippets_VB - - Class MyStroke - Inherits Stroke - ' Let user reset color for all new strokes - ' by setting the color for any stroke. - ' We'll start off by setting the color to black. - Private myColor As Color = Colors.Black - - Private dtGuid As Guid - - - Public Sub New(ByVal points As StylusPointCollection) - MyBase.New(points) - initialize() - - End Sub - 'MoveStylusPoints(); - - Public Sub New(ByVal stylusPoints As StylusPointCollection, ByVal drawingAttributes As DrawingAttributes) - MyBase.New(stylusPoints, drawingAttributes) - - End Sub - - 'MoveStylusPoints(); - - Private Sub initialize() - setTimeStamp() - - End Sub - - - Public Sub MoveStylusPoints() - Dim points As StylusPointCollection = Me.StylusPoints - - Dim i As Integer - - While i < points.Count - Dim p As StylusPoint = points(i) - p.Y = p.Y + 20 - points(i) = p - i += 1 - End While - - End Sub - - - - Private Sub setTimeStamp() - ' See if we have the same timestamp as the border - Dim sAttr As Attribute = Attribute.GetCustomAttribute(GetType(MyBorder), GetType(GuidAttribute)) - dtGuid = New Guid("03457307-3475-3450-3035-640435034540") - - End Sub - - - ' - Protected Overrides Sub OnDrawingAttributesChanged(ByVal e As PropertyDataChangedEventArgs) - ' Notify base class of event - MyBase.OnDrawingAttributesChanged(e) - - ' See if the change was a new DrawingAttribute.Color property - Dim eT As Type = e.NewValue.GetType() - - End Sub - - - - 'if (eT == typeof(Color)) - '{ - ' Color c = (Color)e.NewValue; - ' if (c == Colors.Red) - ' { - ' MessageBox.Show("The stroke is now red!"); - ' } - '} - ' - - - ' - Protected Overrides Sub DrawCore(ByVal context As DrawingContext, _ - ByVal overridedAttributes As DrawingAttributes) - - ' Draw the stroke. Calling base.DrawCore accomplishes the same thing. - Dim geometry As Geometry = GetGeometry(overridedAttributes) - context.DrawGeometry(New SolidColorBrush(overridedAttributes.Color), Nothing, geometry) - - Dim points As StylusPointCollection - - ' Get the stylus points used to draw the stroke. The points used depends on - ' the value of FitToCurve. - If Me.DrawingAttributes.FitToCurve Then - points = Me.GetBezierStylusPoints() - Else - points = Me.StylusPoints - End If - - ' Draw a circle at each stylus point. - Dim p As StylusPoint - For Each p In points - context.DrawEllipse(Nothing, New Pen(Brushes.Black, 1), CType(p, Point), 5, 5) - Next p - - End Sub - - ' - Private Sub DrawSelectedStrokeAndPoints(ByVal context As DrawingContext, ByVal overridedAttributes As DrawingAttributes) - - End Sub - - - ' - Protected Overrides Sub OnDrawingAttributesReplaced(ByVal e As DrawingAttributesReplacedEventArgs) - - '// Notify base class of event - 'base.OnDrawingAttributesReplaced(e); - 'if (e.NewDrawingAttributes.Color == Colors.Red) - '{ - ' MessageBox.Show("The stroke is now red!"); - '} - End Sub - - ' - Private Sub MyStroke_PacketsChanged(ByVal sender As Object, ByVal e As EventArgs) - - End Sub - - - ' - Protected Overrides Sub OnStylusPointsChanged(ByVal e As EventArgs) - ' Notify base class of event - MyBase.OnStylusPointsChanged(e) - - End Sub - - ' - Private Sub MyStroke_PropertyDataChanged(ByVal sender As Object, ByVal e As PropertyDataChangedEventArgs) - - End Sub - - - ' - Protected Overrides Sub OnPropertyDataChanged(ByVal e As PropertyDataChangedEventArgs) - - ' Notify base class of event - MyBase.OnPropertyDataChanged(e) - - ' If the current stroke color changes, - ' reset the default color for the class. - If e.PropertyGuid.Equals(DrawingAttributeIds.Color) Then - myColor = Me.DrawingAttributes.Color - End If - - End Sub - ' - Private IsSelected As Boolean - - - Public Property Selected() As Boolean - Get - Return IsSelected - End Get - - Set(ByVal value As Boolean) - If IsSelected <> Value Then - IsSelected = Value - Me.OnInvalidated(New EventArgs()) - End If - End Set - End Property - End Class - -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/StrokeSnippets_VB.vbproj b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/StrokeSnippets_VB.vbproj deleted file mode 100644 index ba57e445994..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/StrokeSnippets_VB.vbproj +++ /dev/null @@ -1,150 +0,0 @@ - - - Debug - AnyCPU - {EE49F5FB-15F5-4A91-9BF9-2E77961F5CCA} - StrokeSnippets_VB - StrokeSnippets_VB - 4 - winexe - $(OutputType) - 10.0.20821 - 2.0 - en-US - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - true - true - true - bin\ - StrokeSnippets_VB.xml - 42016,42017,42018,42019,42032,42314 - - - false - false - true - false - true - bin\ - StrokeSnippets_VB.xml - 42016,42017,42018,42019,42032,42314 - - - - - - - - - - - - - 4.0 - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - True - True - MyResources.resx - - - Code - - - True - True - MySettings.settings - - - - - VbMyResourcesResXFileCodeGenerator - My.Resources - MyResources.Designer.vb - - - - SettingsSingleFileGenerator - MySettings.Designer.vb - - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/Window1.xaml.vb b/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/Window1.xaml.vb deleted file mode 100644 index d572bea54b3..00000000000 --- a/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/Window1.xaml.vb +++ /dev/null @@ -1,99 +0,0 @@ - -Imports System.IO -Imports System.Reflection -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Data -Imports System.Windows.Documents -Imports System.Windows.Media -Imports System.Windows.Shapes - - -'/ -'/ Interaction logic for Window1.xaml -'/ -Namespace StrokeSnippets_VB - - Class Window1 - Inherits Window - - Dim border1 As MyBorder - - Public Sub New() - InitializeComponent() - - border1 = New MyBorder() - 'border1.Background = Brushes.Green - root.Children.Add(border1) - - End Sub - - - ' Remove touched stroke points - Private Sub button1Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - border1.state = MyBorder.sMode.clip - - End Sub - - - ' Remove touched strokes - Private Sub button2Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - border1.state = MyBorder.sMode.remove - - End Sub - - - ' Remove encircled strokes - Private Sub button3Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - border1.state = MyBorder.sMode.surround - - End Sub - - - ' Add strokes to collection - Private Sub button4Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - border1.state = MyBorder.sMode.add - border1.shadow = False - - End Sub - - - ' Add shadowed strokes to collection - Private Sub button5Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - border1.state = MyBorder.sMode.add - border1.shadow = True - - End Sub - - - Private Sub button6Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - border1.FitToCurve = Not border1.FitToCurve - - If border1.FitToCurve Then - button6.Content = "FtC: on" - Else - button6.Content = "FtC: off" - End If - - End Sub - - Private mode As DrawingMode = DrawingMode.Solid - - - Private Sub ToggleDrawingMode_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) - If mode = DrawingMode.Solid Then - border1.ChangeDrawingMode(DrawingMode.StyulusPoints) - mode = DrawingMode.StyulusPoints - Else - border1.ChangeDrawingMode(DrawingMode.Solid) - mode = DrawingMode.Solid - End If - - End Sub - End Class - ' - 'ToDo: Error processing original source shown below - '} - '} - '-^--- expression expected -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/AssemblyInfo.vb b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/AssemblyInfo.vb deleted file mode 100644 index 0b050475a9b..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,58 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.InteropServices -Imports System.Globalization -Imports System.Resources -Imports System.Windows - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - -'In order to begin building localizable applications, set -'CultureYouAreCodingWith in your .vbproj file -'inside a . For example, if you are using US english -'in your source files, set the to "en-US". Then uncomment the -'NeutralResourceLanguage attribute below. Update the "en-US" in the line -'below to match the UICulture setting in the project file. - -' - - -'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found. -'1st parameter: where theme specific resource dictionaries are located -'(used if a resource is not found in the page, -' or application resource dictionaries) - -'2nd parameter: where the generic resource dictionary is located -'(used if a resource is not found in the page, -'app, and any theme specific resource dictionaries) - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/MyEvents.vb b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/MyEvents.vb deleted file mode 100644 index 0fd4598d1c9..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/MyEvents.vb +++ /dev/null @@ -1,13 +0,0 @@ -Namespace My - Partial Friend Class MyApplication - - 'Use the editor window dropdowns in the Application pane of the Project Designer to handle MyApplication Events - ' - 'Startup: Raised when the application starts, before the startup form is created. - 'Shutdown: Raised after all application forms are closed. This event is not raised if the application is terminating abnormally. - 'UnhandledException: Raised if the application encounters an unhandled exception. - 'StartupNextInstance: Raised when launching a single-instance application and the application is already active. - 'NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. - - End Class -End Namespace diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Resources.Designer.vb b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Resources.Designer.vb deleted file mode 100644 index 7811451446f..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Resources.Designer.vb +++ /dev/null @@ -1,61 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("PacketSpy.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Settings.Designer.vb b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Settings.Designer.vb deleted file mode 100644 index 12838d051e0..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/My Project/Settings.Designer.vb +++ /dev/null @@ -1,71 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.3031 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - - _ -Partial Friend NotInheritable Class Settings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings),Settings) - -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As Settings - Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If - Return defaultInstance - End Get - End Property -End Class - -Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.PacketSpy.Settings - Get - Return Global.PacketSpy.Settings.Default - End Get - End Property - End Module -End Namespace diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/MyApp.xaml.vb b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/MyApp.xaml.vb deleted file mode 100644 index 667b44c2780..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/MyApp.xaml.vb +++ /dev/null @@ -1,10 +0,0 @@ -' Interaction logic for MyApp.xaml -Partial Public Class MyApp - Inherits Application - - Private Sub AppStartup(ByVal sender As Object, ByVal e As StartupEventArgs) Handles Me.Startup - Dim mainWindow As Window1 = New Window1 - mainWindow.Show() - End Sub - -End Class diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/PacketSpy.vbproj b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/PacketSpy.vbproj deleted file mode 100644 index 9a54abfad99..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/PacketSpy.vbproj +++ /dev/null @@ -1,145 +0,0 @@ - - - Debug - AnyCPU - {9767FC20-91FD-49F2-83E5-D89AE69B1509} - WinExe - PacketSpy - PacketSpy - - v4.8 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - 10.0.20821 - - - true - full - true - true - true - bin\ - PacketSpy.xml - 42016,42017,42018,42019,42032,42314 - - - false - false - true - false - true - bin\ - PacketSpy.xml - 42016,42017,42018,42019,42032,42314 - - - - - - - - - - 4.0 - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - - - - - - - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - Code - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - SettingsSingleFileGenerator - Settings.Designer.vb - - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb b/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb deleted file mode 100644 index b7b1c7ef995..00000000000 --- a/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb +++ /dev/null @@ -1,576 +0,0 @@ - -Imports System.Windows -Imports System.Windows.Controls -Imports System.Windows.Data -Imports System.Windows.Documents -Imports System.Windows.Media -Imports System.Windows.Shapes -Imports System.Windows.Ink -Imports System.Windows.Input -Imports System.Threading -Imports System.Collections.ObjectModel -Imports System.Collections.Generic -Imports System.Reflection -Imports System.IO - - -'/ -'/ Interaction logic for Window1.xaml -'/ - -Class Window1 - Inherits Window ' - 'ToDo: Error processing original source shown below - ' - ' public partial class Window1 : Window - '------------^--- 'class', 'struct', 'interface' or 'delegate' expected - ' - 'ToDo: Error processing original source shown below - ' - ' public partial class Window1 : Window - '--------------------^--- Syntax error: ';' expected - Private constrainingRect As Rect - - - - Public Sub New() - InitializeComponent() - Me.WindowState = WindowState.Maximized - inkCanvas1.EditingMode = InkCanvasEditingMode.Ink - inkCanvas1.DefaultDrawingAttributes.IgnorePressure = False - inkCanvas1.DefaultDrawingAttributes.Height = 5 - inkCanvas1.DefaultDrawingAttributes.Width = 5 - AddHandler inkCanvas1.StylusDown, AddressOf inkCanvas1_StylusDown - AddHandler inkCanvas1.StylusMove, AddressOf inkCanvas1_StylusMove - - - - inkCanvas1.DefaultStylusPointDescription = New StylusPointDescription(New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), New StylusPointPropertyInfo(StylusPointProperties.Y), New StylusPointPropertyInfo(StylusPointProperties.NormalPressure)}) - - constrainingRect = New Rect(100, 100, 200, 200) - - AddHandler Me.KeyDown, AddressOf Window1_KeyDown - - 'DrawRect(); - StylusPointConstructor() - - StylusPointCollectionSnippets() - DescriptionSnippets() - ClonePoints() - StylusPropertySnippets() - - End Sub - - 'CompareDescriptions(); - 'MessageBox.Show(StylusPoint.MinXYValue.ToString() & ", " + - ' StylusPoint.MaxXYValue.ToString()); - - Private Sub Window1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) - If e.Key = Key.T Then - GetTabletStylusPointProperties() - End If - - End Sub - - - ' - Private Sub inkCanvas1_StylusMove(ByVal sender As Object, ByVal e As StylusEventArgs) - Dim points As StylusPointCollection = e.GetStylusPoints(inkCanvas1) - Dim description As StylusPointDescription = points.Description - Dim normalPressureInfo As New StringWriter() - - If description.HasProperty(StylusPointProperties.NormalPressure) Then - - Dim propertyInfo As StylusPointPropertyInfo = _ - description.GetPropertyInfo(StylusPointProperties.NormalPressure) - - normalPressureInfo.WriteLine(" Guid = {0}", propertyInfo.Id.ToString()) - normalPressureInfo.Write(" Min = {0}", propertyInfo.Minimum.ToString()) - normalPressureInfo.Write(" Max = {0}", propertyInfo.Maximum.ToString()) - normalPressureInfo.Write(" Unit = {0}", propertyInfo.Unit.ToString()) - normalPressureInfo.WriteLine(" Res = {0}", propertyInfo.Resolution.ToString()) - End If - - End Sub - - ' - - ' - Private Sub inkCanvas1_StylusDown(ByVal sender As Object, ByVal e As StylusDownEventArgs) - Dim points As StylusPointCollection = e.GetStylusPoints(inkCanvas1) - Dim firstPoint As Point = CType(points(0), Point) - - Dim circle As Ellipse = New Ellipse() - circle.Width = 5 - circle.Height = 5 - circle.Fill = Brushes.Red - InkCanvas.SetTop(circle, firstPoint.Y) - InkCanvas.SetLeft(circle, firstPoint.X) - inkCanvas1.Children.Add(circle) - - End Sub - ' - - Sub ValidateMinMaxX(ByVal point As StylusPoint) - Dim x As Double = 1000 - - ' - If x < StylusPoint.MinXY Then - x = StylusPoint.MinXY - ElseIf x > StylusPoint.MaxXY Then - x = StylusPoint.MaxXY - End If - - point.X = x - ' - - End Sub - - ' - Private Sub inkCanvas1_StylusSystemGesture(ByVal sender As Object, ByVal e As StylusSystemGestureEventArgs) - - Me.Title = e.SystemGesture.ToString() - - Select Case e.SystemGesture - Case SystemGesture.RightTap - ' Do something. - - Case SystemGesture.Tap - ' Do something else. - End Select - - End Sub - - ' - - Sub GetTabletStylusPointProperties() - ' - Dim currentTablet As TabletDevice = Tablet.CurrentTabletDevice - - Dim supportedProperties As ReadOnlyCollection(Of StylusPointProperty) _ - = currentTablet.SupportedStylusPointProperties - - Dim properties As New StringWriter() - - For Each supportedProperty As StylusPointProperty In supportedProperties - properties.WriteLine(supportedProperty.ToString()) - Next supportedProperty - - MessageBox.Show(properties.ToString()) - ' - - End Sub - - - ' To use Loaded event put Loaded="WindowLoaded" attribute in root element of .xaml file. - ' private void WindowLoaded(object sender, EventArgs e) {} - ' Sample event handler: - 'private void SaveStrokes_Click(object sender, RoutedEventArgs e) - '{ - '} - Private Sub DrawRect() - Dim myRectVisual As DrawingVisual - - myRectVisual = New DrawingVisual() - Dim myDrawingContext As DrawingContext = myRectVisual.RenderOpen() - - Dim mySolidColorBrush As New SolidColorBrush() - Dim myPen As New Pen(Brushes.Red, 1) - - myDrawingContext.DrawRectangle(Nothing, myPen, constrainingRect) - - ' Important: Close the DrawingContext. - myDrawingContext.Close() - - 'Dim collection As VisualCollection = VisualOperations.GetChildren(inkCanvas1) - - 'collection.Add(myRectVisual) - - End Sub - - - Private Sub StylusMoveEventHandler(ByVal sender As Object, ByVal e As StylusEventArgs) - - Dim points As StylusPointCollection = e.GetStylusPoints(inkCanvas1) - WriteStylusPointValues(points) - WriteDescriptionInfo(points) - - End Sub - - - Private Sub StylusEventHandler(ByVal sender As Object, ByVal e As StylusEventArgs) - - End Sub - - - - Sub GetDescriptionFromStylusDevice() - ' - Dim currentStylus As StylusDevice = Stylus.CurrentStylusDevice - - Dim description1 As New StylusPointDescription(New StylusPointPropertyInfo() _ - {New StylusPointPropertyInfo(StylusPointProperties.X), _ - New StylusPointPropertyInfo(StylusPointProperties.Y), _ - New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)}) - - Dim description2 As StylusPointDescription = currentStylus.GetStylusPoints(inkCanvas1).Description - - Dim description3 As StylusPointDescription = _ - StylusPointDescription.GetCommonDescription(description1, description2) - - Dim points As StylusPointCollection = currentStylus.GetStylusPoints(inkCanvas1, description3) - ' - End Sub - - - ' - Private Sub WriteDescriptionInfo(ByVal points As StylusPointCollection) - - Dim pointsDescription As StylusPointDescription = points.Description - - Dim properties As ReadOnlyCollection(Of StylusPointPropertyInfo) = _ - pointsDescription.GetStylusPointProperties() - - Dim descriptionStringWriter As New StringWriter - descriptionStringWriter.Write("Property Count:{0}", pointsDescription.PropertyCount.ToString()) - - Dim pointProperty As StylusPointPropertyInfo - For Each pointProperty In properties - - ' GetStylusPointPropertyName is defined below and returns the - ' name of the property. - descriptionStringWriter.Write("name = {0}", GetStylusPointPropertyName(pointProperty).ToString()) - descriptionStringWriter.WriteLine(" Guid = {0}", pointProperty.Id.ToString()) - descriptionStringWriter.Write(" IsButton = {0}", pointProperty.IsButton.ToString()) - descriptionStringWriter.Write(" Min = {0}", pointProperty.Minimum.ToString()) - descriptionStringWriter.Write(" Max = {0}", pointProperty.Maximum.ToString()) - descriptionStringWriter.Write(" Unit = {0}", pointProperty.Unit.ToString()) - descriptionStringWriter.WriteLine(" Res {0}", pointProperty.Resolution.ToString()) - - Next pointProperty - - descriptionOutput.Text = descriptionStringWriter.ToString() - - End Sub - - ' - ' - Private Sub WriteStylusPointValues(ByVal points As StylusPointCollection) - Dim pointsDescription As StylusPointDescription = points.Description - - Dim properties As ReadOnlyCollection(Of StylusPointPropertyInfo) = _ - pointsDescription.GetStylusPointProperties() - - ' Write the name and value of each property in - ' every stylus point. - Dim packetWriter As New StringWriter() - - packetWriter.WriteLine("{0} stylus points", points.Count.ToString()) - - For Each stylusPoint As StylusPoint In points - - packetWriter.WriteLine("Stylus Point info") - packetWriter.WriteLine("X: {0}", stylusPoint.X.ToString()) - packetWriter.WriteLine("Y: {0}", stylusPoint.Y.ToString()) - packetWriter.WriteLine("Pressure: {0}", stylusPoint.PressureFactor.ToString()) - - ' Get the property name and value for each StylusPoint. - ' Note that this loop reports the X, Y, and pressure values differantly than - ' getting their values above. - For i As Integer = 0 To pointsDescription.PropertyCount - 1 - - Dim currentProperty As StylusPointProperty = properties(i) - - ' GetStylusPointPropertyName is defined below and returns the - ' name of the property. - packetWriter.Write("{0}: ", GetStylusPointPropertyName(currentProperty)) - packetWriter.WriteLine(stylusPoint.GetPropertyValue(currentProperty).ToString()) - Next i - - packetWriter.WriteLine() - - Next stylusPoint - - packetOutput.Text = packetWriter.ToString() - - End Sub - - ' - ' - ' Use reflection to get the name of currentProperty. - Private Function GetStylusPointPropertyName(ByVal currentProperty As StylusPointProperty) As String - Dim guid As Guid = currentProperty.Id - - ' Iterate through the StylusPointProperties to find the StylusPointProperty - ' that matches currentProperty, then return the name. - Dim theFieldInfo As FieldInfo - - For Each theFieldInfo In GetType(StylusPointProperties).GetFields() - - Dim pointProperty As StylusPointProperty = _ - CType(theFieldInfo.GetValue(currentProperty), StylusPointProperty) - - If pointProperty.Id = guid Then - Return theFieldInfo.Name - End If - - Next theFieldInfo - - Return "Not found" - - End Function 'GetStylusPointPropertyName - - ' - Sub StylusPointConstructor() - - ' - Dim newDescription As New StylusPointDescription( _ - New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _ - New StylusPointPropertyInfo(StylusPointProperties.Y), _ - New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)}) - - Dim propertyValues As Integer() = {1800, 1000, 1} - - Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues) - ' - - ' - Dim XTiltPropertyInfo As New StylusPointPropertyInfo( _ - StylusPointProperties.XTiltOrientation, 0, 3600, _ - StylusPointPropertyUnit.Degrees, 10.0F) - ' - Dim point As New StylusPoint() - - ' - If point.HasProperty(StylusPointProperties.PitchRotation) Then - Dim pitchRotation As Integer = _ - point.GetPropertyValue(StylusPointProperties.PitchRotation) - End If - ' - - ' - If point.HasProperty(StylusPointProperties.PitchRotation) Then - point.SetPropertyValue(StylusPointProperties.PitchRotation, 1000) - End If - ' - End Sub - - - ' All equality tests pass - Sub TestStylusPointsEquality() - - ' - Dim point1 As New StylusPoint() - Dim point2 As New StylusPoint() - - point1.X = 150 - point1.Y = 400 - point1.PressureFactor = 0.45F - - point2.X = 150 - point2.Y = 400 - point2.PressureFactor = 0.45F - ' - - ' - If point2.Equals(point1) Then - MessageBox.Show("The two StylusPoint objects are equal.") - Else - MessageBox.Show("The two StylusPoint objects are not equal.") - End If - ' - - ' - If StylusPoint.Equals(point1, point2) Then - MessageBox.Show("The two StylusPoint objects are equal.") - Else - MessageBox.Show("The two StylusPoint objects are not equal.") - End If - ' - - ' - If point1 = point2 Then - MessageBox.Show("The two StylusPoint objects are equal.") - Else - MessageBox.Show("The two StylusPoint objects are not equal.") - End If - ' - - ' - If point1 <> point2 Then - MessageBox.Show("The two StylusPoint objects are not equal.") - Else - MessageBox.Show("The two StylusPoint objects are equal.") - End If - ' - End Sub - - - Sub StylusPointCollectionSnippets() - 'MessageBox.Show("hi"); - ' - Dim points As New StylusPointCollection(New Point() _ - {New Point(100, 100), _ - New Point(100, 200), _ - New Point(200, 250), _ - New Point(300, 300)}) - ' - 'points.RemoveAt(0); - 'points.RemoveAt(0); - Dim point As New StylusPoint(400, 300) - - End Sub - 'points.Insert(3, point); - 'points.Insert(2, point); - - - Sub StylusPointCollectionConstructor() - ' - Dim stylusPoint1 As New StylusPoint(100, 100, 0.5F) - Dim stylusPoint2 As New StylusPoint(200, 200, 0.35F) - - Dim points As New StylusPointCollection(New StylusPoint() {stylusPoint1, stylusPoint2}) - ' - End Sub - - - - Sub DescriptionSnippets() - ' - Dim description1 As New StylusPointDescription( _ - New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _ - New StylusPointPropertyInfo(StylusPointProperties.Y), _ - New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)}) - - ' Create a StylusPointCollection that uses description1 as its - ' StylusPointDescription. - Dim points As New StylusPointCollection(description1) - - Dim description2 As New StylusPointDescription( _ - New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _ - New StylusPointPropertyInfo(StylusPointProperties.Y), _ - New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.ButtonPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)}) - - ' Find the common StylusPointDescription between description1 - ' and description2. Get a StylusPointCollection that uses the - ' common StylusPointDescription. - Dim common As StylusPointDescription = _ - StylusPointDescription.GetCommonDescription(description1, description2) - - Dim points2 As StylusPointCollection = points.Reformat(common) - ' - End Sub - - - Sub ClonePoints() - ' - Dim rawPoints() As Point = {New Point(100, 100), _ - New Point(100, 200), _ - New Point(200, 250), _ - New Point(300, 300)} - - Dim points1 As New StylusPointCollection(rawPoints) - - ' Create a copy of points1 and change the second StylusPoint. - Dim points2 As StylusPointCollection = points1.Clone() - points2(1) = New StylusPoint(200, 100) - - ' Create a stroke from each StylusPointCollection and add them to - ' inkCanvas1. Note that changing a StylusPoint in point2 did not - ' affect points1. - Dim stroke1 As New Stroke(points1) - inkCanvas1.Strokes.Add(stroke1) - - Dim stroke2 As New Stroke(points2) - stroke2.DrawingAttributes.Color = Colors.Red - inkCanvas1.Strokes.Add(stroke2) - ' - End Sub - - - - Sub CompareDescriptions() - ' - Dim description1 As New StylusPointDescription( _ - New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _ - New StylusPointPropertyInfo(StylusPointProperties.Y), _ - New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _ - New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)}) - - Dim description2 As New StylusPointDescription( _ - New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _ - New StylusPointPropertyInfo(StylusPointProperties.Y), _ - New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _ - New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)}) - ' - - ' - If StylusPointDescription.AreCompatible(description1, description2) Then - MessageBox.Show("The two descriptions are compatible.") - Else - MessageBox.Show("The two descriptions are not compatible.") - End If - ' - - ' - If description2.IsSubsetOf(description1) Then - MessageBox.Show("description2 is a subset of description1.") - Else - MessageBox.Show("description2 is not a subset of description1.") - End If - ' - End Sub - - - Private Sub points_Changed(ByVal sender As Object, ByVal e As EventArgs) - MessageBox.Show("The SylusPointCollection changed") - - End Sub - - ' The OnStylusDown method is to demonstrate how to create - ' a StylusPointCollection to collect stylus points in a custom control. - ' Nothing happens with stylusPoints, it's dead end code. - ' - Private stylusPoints As StylusPointCollection - - - Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs) - MyBase.OnStylusDown(e) - - Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me) - - ' Create a new StylusPointCollection using the StylusPointDescription - ' from the stylus points in the StylusDownEventArgs. - stylusPoints = New StylusPointCollection(eventPoints.Description, eventPoints.Count) - stylusPoints.Add(eventPoints) - - End Sub - ' - - Sub StylusPropertySnippets() - Dim newProperty As New StylusPointPropertyInfo(StylusPointProperties.TwistOrientation) - - ' - Dim guid As New Guid("12345678-1234-1234-1234-123456789012") - Dim newlyDefinedProperty As New StylusPointProperty(guid, False) - ' - End Sub - - - Sub StylusPropertyInfoSnippets() - - End Sub -End Class \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows/Application/Overview/appcode.vb b/snippets/visualbasic/System.Windows/Application/Overview/appcode.vb deleted file mode 100644 index be8bf0a58cd..00000000000 --- a/snippets/visualbasic/System.Windows/Application/Overview/appcode.vb +++ /dev/null @@ -1,16 +0,0 @@ -' - -Imports System.Windows - -Namespace SDKSample - Public Class AppCode - Inherits Application - ' Entry point method - - Public Shared Sub Main() - Dim app As New AppCode() - app.Run() - End Sub - End Class -End Namespace -' \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows/Application/Overview/application.xaml.vb b/snippets/visualbasic/System.Windows/Application/Overview/application.xaml.vb deleted file mode 100644 index 7834d3ec3b9..00000000000 --- a/snippets/visualbasic/System.Windows/Application/Overview/application.xaml.vb +++ /dev/null @@ -1,10 +0,0 @@ -' - -Imports System.Windows - -Namespace SDKSample - Partial Public Class App - Inherits Application - End Class -End Namespace -' \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows/Application/Overview/applicationsnippets.vbproj b/snippets/visualbasic/System.Windows/Application/Overview/applicationsnippets.vbproj deleted file mode 100644 index 59d1ed1ea99..00000000000 --- a/snippets/visualbasic/System.Windows/Application/Overview/applicationsnippets.vbproj +++ /dev/null @@ -1,114 +0,0 @@ - - - - Debug - AnyCPU - {D4982CD9-4444-4BB5-B4AC-2D9AB41B87DA} - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - - - VisualBasic - winexe - - v4.0 - On - Binary - Off - On - http://localhost/CSharp/ - true - Web - true - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - true - false - false - Client - 10.0.20821 - - - true - full - false - .\bin\Debug\ - true - true - - - false - true - .\bin\Release\ - false - true - - - - - - - - - - - 4.0 - - - - - - - - - - - - MSBuild:Compile - Designer - - - Application.xaml - Code - - - - - - - - - - MSBuild:Compile - Designer - - - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - true - - - False - .NET Framework 3.5 - false - - - False - Windows Installer 3.1 - true - - - - \ No newline at end of file diff --git a/snippets/visualbasic/System.Windows/Application/Overview/my project/assemblyinfo.vb b/snippets/visualbasic/System.Windows/Application/Overview/my project/assemblyinfo.vb deleted file mode 100644 index 731a8669d01..00000000000 --- a/snippets/visualbasic/System.Windows/Application/Overview/my project/assemblyinfo.vb +++ /dev/null @@ -1,51 +0,0 @@ -#Region "Using directives" - -Imports System.Reflection -Imports System.Runtime.CompilerServices -Imports System.Resources -Imports System.Globalization -Imports System.Windows -Imports System.Runtime.InteropServices - -#End Region - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - - - - - - - - - - -'In order to begin building localizable applications, set -'CultureYouAreCodingWith in your .vbproj file -'inside a . For example, if you are using US english -'in your source files, set the to en-US. Then uncomment -'the NeutralResourceLanguage attribute below. Update the "en-US" in -'the line below to match the UICulture setting in the project file. - -'[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - - '(used if a resource is not found in the page, - ' or application resource dictionaries) - '(used if a resource is not found in the page, - ' app, or any theme specific resource dictionaries) - 'where the generic resource dictionary is located - where theme specific resource dictionaries are located - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Revision and Build Numbers -' by using the '*' as shown below: - diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.exe.config b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.exe.config deleted file mode 100644 index fa5ce3583b2..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.exe.config +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vb b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vb deleted file mode 100644 index f4b21ba4c8a..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vb +++ /dev/null @@ -1,44 +0,0 @@ - -Imports System.ServiceModel -Imports System.ServiceModel.Channels - -Imports microsoft.wcf.documentation - - - -' -Public Class Client - Public Shared Sub Main() - Try - ' Picks up configuration from the config file. - Dim factory As New ChannelFactory(Of ISampleServiceChannel)("WSHttpBinding_ISampleService") - - ' Add the client side behavior programmatically to all created channels. - factory.Endpoint.Behaviors.Add(New EndpointBehaviorMessageInspector()) - - Dim wcfClientChannel As ISampleServiceChannel = factory.CreateChannel() - - ' Making calls. - Console.WriteLine("Enter the greeting to send: ") - Dim greeting As String = Console.ReadLine() - Console.WriteLine("The service responded: " & wcfClientChannel.SampleMethod(greeting)) - - Console.WriteLine("Press ENTER to exit:") - Console.ReadLine() - - ' Done with service. - wcfClientChannel.Close() - Console.WriteLine("Done!") - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Console.Read() - Catch fault As FaultException(Of SampleFault) - Console.WriteLine("SampleFault fault occurred: {0}", fault.Detail.FaultMessage) - Console.Read() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - Console.Read() - End Try - End Sub - ' -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vbproj b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vbproj deleted file mode 100644 index f8b100e2181..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vbproj +++ /dev/null @@ -1,93 +0,0 @@ - - - Debug - AnyCPU - {66190530-B4E3-4BF0-94B4-DFE52D15E50F} - Exe - false - Client - - - - - - - 3.5 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - On - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - - - Always - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/host.vbproj b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/host.vbproj deleted file mode 100644 index beb9bf6a9f2..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/host.vbproj +++ /dev/null @@ -1,57 +0,0 @@ - - - Debug - AnyCPU - {907F0C93-0FC2-4419-B0CE-2B775830A3C2} - Exe - false - HostApplication - - - - - - - 3.5 - On - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - - - Always - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.exe.config b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.exe.config deleted file mode 100644 index 6e49f0b25df..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.exe.config +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.vb b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.vb deleted file mode 100644 index a8bfa15a1e2..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/hostapplication.vb +++ /dev/null @@ -1,40 +0,0 @@ - -Imports System.Configuration -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class HostApplication - - Shared Sub Main() - Dim app As New HostApplication() - app.Run() - End Sub - - Private Sub Run() - ' Create a ServiceHost for the service type and use the base address from configuration. - Using serviceHost As New ServiceHost(GetType(SampleService)) - Try - ' Open the ServiceHostBase to create listeners and start listening for messages. - serviceHost.Open() - - ' The service can now be accessed. - Console.WriteLine("The service is ready.") - Console.WriteLine("Press to terminate service.") - Console.WriteLine() - Console.ReadLine() - - ' Close the ServiceHostBase to shutdown the service. - serviceHost.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Console.Read() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - Console.Read() - End Try - End Using - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/iendpointbehaviormessageinspector.vb b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/iendpointbehaviormessageinspector.vb deleted file mode 100644 index fe3442210c2..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/iendpointbehaviormessageinspector.vb +++ /dev/null @@ -1,75 +0,0 @@ -' - - -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.ServiceModel.Configuration -Imports System.ServiceModel.Description -Imports System.ServiceModel.Dispatcher -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class EndpointBehaviorMessageInspector - Inherits BehaviorExtensionElement - Implements IEndpointBehavior, IDispatchMessageInspector, IClientMessageInspector - ' - ' IEndpointBehavior Members - Public Sub AddBindingParameters(ByVal serviceEndpoint As ServiceEndpoint, ByVal bindingParameters As System.ServiceModel.Channels.BindingParameterCollection) Implements IEndpointBehavior.AddBindingParameters - Return - End Sub - - Public Sub ApplyClientBehavior(ByVal serviceEndpoint As ServiceEndpoint, ByVal behavior As ClientRuntime) Implements IEndpointBehavior.ApplyClientBehavior - behavior.MessageInspectors.Add(New EndpointBehaviorMessageInspector()) - End Sub - - Public Sub ApplyDispatchBehavior(ByVal serviceEndpoint As ServiceEndpoint, ByVal endpointDispatcher As EndpointDispatcher) Implements IEndpointBehavior.ApplyDispatchBehavior - endpointDispatcher.DispatchRuntime.MessageInspectors.Add(New EndpointBehaviorMessageInspector()) - End Sub - - Public Sub Validate(ByVal serviceEndpoint As ServiceEndpoint) Implements IEndpointBehavior.Validate - Return - End Sub - ' - - ' - ' BehaviorExtensionElement members - Public Overrides ReadOnly Property BehaviorType() As Type - Get - Return GetType(EndpointBehaviorMessageInspector) - End Get - End Property - - Protected Overrides Function CreateBehavior() As Object - Return New EndpointBehaviorMessageInspector() - End Function - ' - - ' - ' IDispatchMessageInspector Members - - Public Function AfterReceiveRequest(ByRef request As System.ServiceModel.Channels.Message, ByVal channel As IClientChannel, ByVal instanceContext As InstanceContext) As Object Implements IDispatchMessageInspector.AfterReceiveRequest - Console.WriteLine("AfterReceiveRequest called.") - Return Nothing - End Function - - Public Sub BeforeSendReply(ByRef reply As System.ServiceModel.Channels.Message, ByVal correlationState As Object) Implements IDispatchMessageInspector.BeforeSendReply - Console.WriteLine("BeforeSendReply called.") - End Sub - ' - - - #Region "IClientMessageInspector Members" - - Public Sub AfterReceiveReply(ByRef reply As System.ServiceModel.Channels.Message, ByVal correlationState As Object) Implements IClientMessageInspector.AfterReceiveReply - Console.WriteLine("AfterReceiveReply called.") - End Sub - - Public Function BeforeSendRequest(ByRef request As System.ServiceModel.Channels.Message, ByVal channel As IClientChannel) As Object Implements IClientMessageInspector.BeforeSendRequest - Console.WriteLine("BeforeSendRequest called.") - Return Nothing - End Function - - #End Region - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/proxycode.vb b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/proxycode.vb deleted file mode 100644 index d389f96be79..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/proxycode.vb +++ /dev/null @@ -1,90 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.42 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - - -Imports System.Runtime.Serialization - - - -Namespace Microsoft.WCF.Documentation - - - _ - Partial Public Class SampleFault - Inherits Object - Implements System.Runtime.Serialization.IExtensibleDataObject - - Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject - - Private FaultMessageField As String - - Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData - Get - Return Me.extensionDataField - End Get - Set(ByVal value As System.Runtime.Serialization.ExtensionDataObject) - Me.extensionDataField = value - End Set - End Property - - _ - Public Property FaultMessage() As String - Get - Return Me.FaultMessageField - End Get - Set(ByVal value As String) - Me.FaultMessageField = value - End Set - End Property - End Class -End Namespace - - - _ -Public Interface ISampleService - - _ - Function SampleMethod(ByVal msg As String) As String -End Interface - - _ -Public Interface ISampleServiceChannel - Inherits ISampleService, System.ServiceModel.IClientChannel -End Interface - - _ -Partial Public Class SampleServiceClient - Inherits System.ServiceModel.ClientBase(Of ISampleService) - Implements ISampleService - - Public Sub New() - End Sub - - Public Sub New(ByVal endpointConfigurationName As String) - MyBase.New(endpointConfigurationName) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(binding, remoteAddress) - End Sub - - Public Function SampleMethod(ByVal msg As String) As String Implements ISampleService.SampleMethod - Return MyBase.Channel.SampleMethod(msg) - End Function -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/services.vb b/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/services.vb deleted file mode 100644 index ac0f98f502a..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/services.vb +++ /dev/null @@ -1,38 +0,0 @@ - -Imports System.Collections.Generic -Imports System.Runtime.Serialization -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - _ - Public Interface ISampleService - - _ - Function SampleMethod(ByVal msg As String) As String - End Interface - - Friend Class SampleService - Implements ISampleService - Public Function SampleMethod(ByVal msg As String) As String Implements ISampleService.SampleMethod - Console.WriteLine("The caller said: ""{0}""", msg) - Return "The service greets you: " & msg - End Function - End Class - - ' The detail type of the specified SOAP fault. - _ - Public Class SampleFault - _ - Private msg As String - - Public Property FaultMessage() As String - Get - Return Me.msg - End Get - Set(ByVal value As String) - Me.msg = value - End Set - End Property - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vb b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vb deleted file mode 100644 index 016216c9151..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vb +++ /dev/null @@ -1,28 +0,0 @@ -Imports System.ServiceModel -Imports System.ServiceModel.Channels - -Public Class Client - Public Shared Sub Main() - ' Picks up configuration from the config file. - Dim wcfClient As New SampleServiceClient() - Try - ' Making calls. - Console.WriteLine("Enter the greeting to send: ") - Dim greeting As String = Console.ReadLine() - Console.WriteLine("The service responded: " & wcfClient.SampleMethod(greeting)) - - ' Done with service. - wcfClient.Close() - Console.WriteLine("Done!") - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.StackTrace) - wcfClient.Abort() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.StackTrace) - wcfClient.Abort() - Finally - Console.WriteLine("Press ENTER to exit:") - Console.ReadLine() - End Try - End Sub -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vbproj b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vbproj deleted file mode 100644 index 3c221f3b9b8..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/client.vbproj +++ /dev/null @@ -1,95 +0,0 @@ - - - Debug - AnyCPU - {66190530-B4E3-4BF0-94B4-DFE52D15E50F} - Exe - false - Client - - - - - - - 2.0 - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/host.vbproj b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/host.vbproj deleted file mode 100644 index 54159b905c4..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/host.vbproj +++ /dev/null @@ -1,92 +0,0 @@ - - - Debug - AnyCPU - {907F0C93-0FC2-4419-B0CE-2B775830A3C2} - Exe - false - HostApplication - - - - - - - 2.0 - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - On - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - - Always - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/hostapplication.vb b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/hostapplication.vb deleted file mode 100644 index cdca5809271..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/hostapplication.vb +++ /dev/null @@ -1,40 +0,0 @@ -Imports System.Configuration -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class HostApplication - - Shared Sub Main() - Dim app As New HostApplication() - app.Run() - End Sub - - Private Sub Run() - ' Create a ServiceHost for the service type and use the base address from configuration. - Using serviceHost As New ServiceHost(GetType(SampleService)) - Try - - ' Open the ServiceHostBase to create listeners and start listening for messages. - serviceHost.Open() - - ' The service can now be accessed. - Console.WriteLine("The service is ready.") - Console.WriteLine("Press to terminate service.") - Console.WriteLine() - Console.ReadLine() - - ' Close the ServiceHostBase to shutdown the service. - serviceHost.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Console.Read() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - Console.Read() - End Try - End Using - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb deleted file mode 100644 index c6ee178c2d1..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb +++ /dev/null @@ -1,82 +0,0 @@ -' - -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.ServiceModel.Configuration -Imports System.ServiceModel.Description -Imports System.ServiceModel.Dispatcher -Imports System.Text -Imports System.Xml - -Namespace Microsoft.WCF.Documentation - ' - Public Class ObjectProviderBehavior - Implements IInstanceProvider - - Private message As String - Private service As SampleService = Nothing - - Public Sub New(ByVal msg As String) - Console.WriteLine("The non-default constructor has been called.") - Me.message = msg - Me.service = New SampleService("Singleton sample service.") - End Sub - - #Region "IInstanceProvider Members" - - Public Function GetInstance(ByVal instanceContext As InstanceContext, ByVal message As System.ServiceModel.Channels.Message) As Object Implements IInstanceProvider.GetInstance - Console.WriteLine("GetInstance is called:") - Return Me.service - End Function - - Public Function GetInstance(ByVal instanceContext As InstanceContext) As Object Implements IInstanceProvider.GetInstance - Console.WriteLine("GetInstance is called:") - Return Me.service - End Function - - Public Sub ReleaseInstance(ByVal instanceContext As InstanceContext, ByVal instance As Object) Implements IInstanceProvider.ReleaseInstance - Console.WriteLine("ReleaseInstance is called. The SingletonBehaviorAttribute never releases.") - End Sub - - #End Region - End Class - ' - - ' - Public Class SingletonBehaviorAttribute - Inherits Attribute - Implements IContractBehaviorAttribute, IContractBehavior - - #Region "IContractBehaviorAttribute Members" - - Public ReadOnly Property TargetContract() As Type Implements IContractBehaviorAttribute.TargetContract - Get - Return GetType(ISampleService) - End Get - End Property - - #End Region - - #Region "IContractBehavior Members" - - Public Sub AddBindingParameters(ByVal description As ContractDescription, ByVal endpoint As ServiceEndpoint, ByVal parameters As System.ServiceModel.Channels.BindingParameterCollection) Implements IContractBehavior.AddBindingParameters - Return - End Sub - - Public Sub ApplyClientBehavior(ByVal description As ContractDescription, ByVal endpoint As ServiceEndpoint, ByVal clientRuntime As ClientRuntime) Implements IContractBehavior.ApplyClientBehavior - Return - End Sub - - Public Sub ApplyDispatchBehavior(ByVal description As ContractDescription, ByVal endpoint As ServiceEndpoint, ByVal dispatch As DispatchRuntime) Implements IContractBehavior.ApplyDispatchBehavior - dispatch.InstanceProvider = New ObjectProviderBehavior("Custom ObjectProviderBehavior constructor.") - End Sub - - Public Sub Validate(ByVal description As ContractDescription, ByVal endpoint As ServiceEndpoint) Implements IContractBehavior.Validate - Return - End Sub - - #End Region - End Class - ' -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/proxycode.vb b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/proxycode.vb deleted file mode 100644 index 705dc0a05a1..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/proxycode.vb +++ /dev/null @@ -1,51 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.42 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - - _ -Public Interface ISampleService - - _ - Function SampleMethod(ByVal msg As String) As String -End Interface - - _ -Public Interface ISampleServiceChannel - Inherits ISampleService, System.ServiceModel.IClientChannel -End Interface - - _ -Partial Public Class SampleServiceClient - Inherits System.ServiceModel.ClientBase(Of ISampleService) - Implements ISampleService - - Public Sub New() - End Sub - - Public Sub New(ByVal endpointConfigurationName As String) - MyBase.New(endpointConfigurationName) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(binding, remoteAddress) - End Sub - - Public Function SampleMethod(ByVal msg As String) As String Implements ISampleService.SampleMethod - Return MyBase.Channel.SampleMethod(msg) - End Function -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/services.vb b/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/services.vb deleted file mode 100644 index 54b4443ac75..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/services.vb +++ /dev/null @@ -1,32 +0,0 @@ -' - -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - _ - Public Interface ISampleService - _ - Function SampleMethod(ByVal msg As String) As String - End Interface - - _ - Public Class SampleService - Implements ISampleService - #Region "ISampleService Members" - Private message As String - - Public Sub New(ByVal msg As String) - Me.message = msg - End Sub - - Public Function SampleMethod(ByVal msg As String) As String Implements ISampleService.SampleMethod - Console.WriteLine("The caller said: " & msg) - Return Me.message - End Function - - #End Region - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/cs.vbproj b/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/cs.vbproj deleted file mode 100644 index e86e018e829..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/cs.vbproj +++ /dev/null @@ -1,91 +0,0 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7BF5F387-4FA7-43FF-AB48-01D8A630FE19} - Exe - - - CS - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - On - - - true - full - false - bin\Debug\ - true - true - prompt - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - bin\Release\ - false - true - prompt - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - False - ..\..\..\..\..\Whidbey\Assemblies\System.ServiceModel.dll - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb b/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb deleted file mode 100644 index cd98cf18df9..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb +++ /dev/null @@ -1,67 +0,0 @@ -' Snippet for S_UENamedPipeTransportBindingElement. - -Imports System.Collections.Generic -Imports System.Configuration -Imports System.Globalization -Imports System.Net -Imports System.Net.Security -Imports System.ServiceModel -Imports System.ServiceModel.Channels -Imports System.ServiceModel.Configuration -Imports System.ServiceModel.Security -Imports System.Text -Imports System.Xml - -Namespace Snippets - Module Module1 - - Sub Main() - ' - ' - ' - ' - Dim bElement As New NamedPipeTransportBindingElement() - ' - - Dim connectionPoolSettings As NamedPipeConnectionPoolSettings = bElement.ConnectionPoolSettings - ' - ' - ' - - ' - Dim scheme As String = bElement.Scheme - ' - - ' - Dim bElementCopy As BindingElement = bElement.Clone() - ' - - ' - Dim binding As New BasicHttpBinding() - Dim b As ISecurityCapabilities = binding.GetProperty(Of ISecurityCapabilities)(New BindingParameterCollection()) - - Dim SupportsServerAuthentication As Boolean = b.SupportsServerAuthentication - ' - - End Sub - - Private Sub RunClient() - Dim binding As New CustomBinding() - binding.Elements.Add(New NamedPipeTransportBindingElement()) - Dim customBinding As New CustomBinding() - Dim bpCollection As New BindingParameterCollection() - - ' - Dim bContext As New BindingContext(customBinding, bpCollection) - Dim factory As IChannelFactory(Of IOutputChannel) = binding.BuildChannelFactory(Of IOutputChannel)(bContext) - ' - - ' - Dim listener As IChannelListener(Of IOutputChannel) = binding.BuildChannelListener(Of IOutputChannel)(bContext) - ' - - End Sub - - End Module - -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/my project/assemblyinfo.vb b/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/my project/assemblyinfo.vb deleted file mode 100644 index a0b25ee834d..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/my project/assemblyinfo.vb +++ /dev/null @@ -1,33 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.CompilerServices -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - - - - - - - - - -' Setting ComVisible to false makes the types in this assembly not visible -' to COM components. If you need to access a type in this assembly from -' COM, set the ComVisible attribute to true on that type. - - -' The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' - - diff --git a/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/cs.vbproj b/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/cs.vbproj deleted file mode 100644 index f97a4aa12b5..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/cs.vbproj +++ /dev/null @@ -1,88 +0,0 @@ - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {6D2BC98D-8A4A-4A15-8EEC-98E221C380D9} - Exe - - - CS - - - - - 2.0 - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - true - true - prompt - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - bin\Release\ - false - true - prompt - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/module1.vb b/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/module1.vb deleted file mode 100644 index 7664e82187f..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/module1.vb +++ /dev/null @@ -1,9 +0,0 @@ -Imports System.Collections.Generic -Imports System.Text - -Namespace CS - Module Module1 - Sub Main(ByVal args() As String) - End Sub - End Module -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/my project/assemblyinfo.vb b/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/my project/assemblyinfo.vb deleted file mode 100644 index 991ffcb7cb8..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/my project/assemblyinfo.vb +++ /dev/null @@ -1,33 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.CompilerServices -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - - - - - - - - - -' Setting ComVisible to false makes the types in this assembly not visible -' to COM components. If you need to access a type in this assembly from -' COM, set the ComVisible attribute to true on that type. - - -' The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' - - diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb deleted file mode 100644 index deb65ebf363..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb +++ /dev/null @@ -1,62 +0,0 @@ -' - -Imports System.ServiceModel -Imports System.ServiceModel.Channels -Imports System.Threading - -Namespace Microsoft.WCF.Documentation - Public Class Client - Implements SampleDuplexHelloCallback - Private waitHandle As AutoResetEvent - - Public Sub New() - waitHandle = New AutoResetEvent(False) - End Sub - - Public Sub Run() - ' Picks up configuration from the config file. - Dim wcfClient As New SampleDuplexHelloClient(New InstanceContext(Me)) - Try - Console.ForegroundColor = ConsoleColor.White - Console.WriteLine("Enter a greeting to send and press ENTER: ") - Console.Write(">>> ") - Console.ForegroundColor = ConsoleColor.Green - Dim greeting = Console.ReadLine() - Console.ForegroundColor = ConsoleColor.White - Console.WriteLine("Called service with: " & Constants.vbCrLf & Constants.vbTab & greeting) - wcfClient.Hello(greeting) - Console.WriteLine("Execution passes service call and moves to the WaitHandle.") - Me.waitHandle.WaitOne() - Console.ForegroundColor = ConsoleColor.Blue - Console.WriteLine("Set was called.") - Console.Write("Press ") - Console.ForegroundColor = ConsoleColor.Red - Console.Write("ENTER") - Console.ForegroundColor = ConsoleColor.Blue - Console.Write(" to exit...") - Console.ReadLine() - wcfClient.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Console.ReadLine() - wcfClient.Abort() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - Console.ReadLine() - wcfClient.Abort() - End Try - End Sub - - Public Shared Sub Main() - Dim client As New Client() - client.Run() - End Sub - - Public Sub Reply(ByVal response As String) Implements SampleDuplexHelloCallback.Reply - Console.WriteLine("Received output.") - Console.WriteLine(Constants.vbCrLf & Constants.vbTab & response) - Me.waitHandle.Set() - End Sub - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vbproj b/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vbproj deleted file mode 100644 index dd66f7a9738..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vbproj +++ /dev/null @@ -1,95 +0,0 @@ - - - Debug - AnyCPU - {66190530-B4E3-4BF0-94B4-DFE52D15E50F} - Exe - false - Client - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/host.vbproj b/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/host.vbproj deleted file mode 100644 index f98e2f679a7..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/host.vbproj +++ /dev/null @@ -1,91 +0,0 @@ - - - Debug - AnyCPU - {907F0C93-0FC2-4419-B0CE-2B775830A3C2} - Exe - false - HostApplication - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/hostapplication.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/hostapplication.vb deleted file mode 100644 index 985162ab083..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/hostapplication.vb +++ /dev/null @@ -1,38 +0,0 @@ - -Imports System.Configuration -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class HostApplication - - Shared Sub Main() - Dim app As New HostApplication() - app.Run() - End Sub - - Private Sub Run() - ' Create a ServiceHost for the service type and use the base address from configuration. - Using serviceHost As New ServiceHost(GetType(DuplexHello)) - Try - ' Open the ServiceHostBase to create listeners and start listening for messages. - serviceHost.Open() - - ' The service can now be accessed. - Console.WriteLine("The service is ready.") - Console.WriteLine("Press to terminate service.") - Console.WriteLine() - Console.ReadLine() - - ' Close the ServiceHostBase to shutdown the service. - serviceHost.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/proxycode.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/proxycode.vb deleted file mode 100644 index c25de1fcdc5..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/proxycode.vb +++ /dev/null @@ -1,68 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.42 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - - - - - _ -Public Interface SampleDuplexHello - - _ - Sub Hello(ByVal greeting As String) -End Interface - - _ -Public Interface SampleDuplexHelloCallback - - _ - Sub Reply(ByVal responseToGreeting As String) -End Interface - - _ -Public Interface SampleDuplexHelloChannel - Inherits SampleDuplexHello, System.ServiceModel.IClientChannel -End Interface - - _ -Partial Public Class SampleDuplexHelloClient - Inherits System.ServiceModel.DuplexClientBase(Of SampleDuplexHello) - Implements SampleDuplexHello - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext) - MyBase.New(callbackInstance) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal endpointConfigurationName As String) - MyBase.New(callbackInstance, endpointConfigurationName) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal endpointConfigurationName _ - As String, ByVal remoteAddress As String) - MyBase.New(callbackInstance, endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal endpointConfigurationName _ - As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(callbackInstance, endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal binding As System.ServiceModel.Channels.Binding, _ - ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(callbackInstance, binding, remoteAddress) - End Sub - - Public Sub Hello(ByVal greeting As String) Implements SampleDuplexHello.Hello - MyBase.Channel.Hello(greeting) - End Sub -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb deleted file mode 100644 index 13e3f3e7a5d..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb +++ /dev/null @@ -1,44 +0,0 @@ -' - - -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Threading - -Namespace Microsoft.WCF.Documentation - _ - Public Interface IDuplexHello - _ - Sub Hello(ByVal greeting As String) - End Interface - - Public Interface IHelloCallbackContract - _ - Sub Reply(ByVal responseToGreeting As String) - End Interface - - Public Class DuplexHello - Implements IDuplexHello - Public Sub New() - Console.WriteLine("Service object created: " & Me.GetHashCode().ToString()) - End Sub - - Protected Overrides Sub Finalize() - Console.WriteLine("Service object destroyed: " & Me.GetHashCode().ToString()) - End Sub - - Public Sub Hello(ByVal greeting As String) Implements IDuplexHello.Hello - Console.WriteLine("Caller sent: " & greeting) - Console.WriteLine("Session ID: " & OperationContext.Current.SessionId) - Console.WriteLine("Waiting two seconds before returning call.") - ' Put a slight delay to demonstrate asynchronous behavior on client. - Thread.Sleep(2000) - Dim callerProxy = OperationContext.Current.GetCallbackChannel(Of IHelloCallbackContract)() - Dim response = "Service object " & Me.GetHashCode().ToString() & " received: " & greeting - Console.WriteLine("Sending back: " & response) - callerProxy.Reply(response) - End Sub - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb deleted file mode 100644 index 2cebab81c44..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb +++ /dev/null @@ -1,32 +0,0 @@ -' - - -Imports System.ServiceModel -Imports System.ServiceModel.Channels - -Public Class Client - Public Shared Sub Main() - ' Picks up configuration from the config file. - Dim wcfClient As New HelloWorldClient() - Try - ' Making calls. - Console.WriteLine("Enter the greeting to send: ") - Dim greeting = Console.ReadLine() - Console.WriteLine("The service responded: " & wcfClient.SampleMethod(greeting)) - - ' Done with service. - wcfClient.Close() - Console.WriteLine("Done!") - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - wcfClient.Abort() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - wcfClient.Abort() - Finally - Console.WriteLine("Press ENTER to exit:") - Console.ReadLine() - End Try - End Sub -End Class -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vbproj b/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vbproj deleted file mode 100644 index dd66f7a9738..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vbproj +++ /dev/null @@ -1,95 +0,0 @@ - - - Debug - AnyCPU - {66190530-B4E3-4BF0-94B4-DFE52D15E50F} - Exe - false - Client - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/host.vbproj b/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/host.vbproj deleted file mode 100644 index f98e2f679a7..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/host.vbproj +++ /dev/null @@ -1,91 +0,0 @@ - - - Debug - AnyCPU - {907F0C93-0FC2-4419-B0CE-2B775830A3C2} - Exe - false - HostApplication - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/hostapplication.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/hostapplication.vb deleted file mode 100644 index 50eca0d12ba..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/hostapplication.vb +++ /dev/null @@ -1,38 +0,0 @@ - -Imports System.Configuration -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class HostApplication - - Shared Sub Main() - Dim app As New HostApplication() - app.Run() - End Sub - - Private Sub Run() - ' Create a ServiceHost for the service type and use the base address from config. - Using serviceHost As New ServiceHost(GetType(SampleService)) - Try - ' Open the ServiceHostBase to create listeners and start listening for messages. - serviceHost.Open() - - ' The service can now be accessed. - Console.WriteLine("The service is ready.") - Console.WriteLine("Press to terminate service.") - Console.WriteLine() - Console.ReadLine() - - ' Close the ServiceHostBase to shutdown the service. - serviceHost.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/proxycode.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/proxycode.vb deleted file mode 100644 index 22d0ffd31bb..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/proxycode.vb +++ /dev/null @@ -1,57 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.42 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - - - - - _ -Public Interface HelloWorld - - _ - Function SampleMethod(ByVal msg As String) As String -End Interface - - _ -Public Interface HelloWorldChannel - Inherits HelloWorld, System.ServiceModel.IClientChannel -End Interface - - _ -Partial Public Class HelloWorldClient - Inherits System.ServiceModel.ClientBase(Of HelloWorld) - Implements HelloWorld - - Public Sub New() - End Sub - - Public Sub New(ByVal endpointConfigurationName As String) - MyBase.New(endpointConfigurationName) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(binding, remoteAddress) - End Sub - - Public Function SampleMethod(ByVal msg As String) As String Implements HelloWorld.SampleMethod - Return MyBase.Channel.SampleMethod(msg) - End Function -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb deleted file mode 100644 index 04cfc8ecd54..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb +++ /dev/null @@ -1,26 +0,0 @@ -' - - -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - _ - Public Interface ISampleService - _ - Function SampleMethod(ByVal msg As String) As String - End Interface - - Friend Class SampleService - Implements ISampleService - #Region "ISampleService Members" - - Public Function SampleMethod(ByVal msg As String) As String Implements ISampleService.SampleMethod - Return "The service greets you: " & msg - End Function - - #End Region - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vb deleted file mode 100644 index ccc3ffccf0b..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vb +++ /dev/null @@ -1,64 +0,0 @@ -' - -Imports System.ServiceModel -Imports System.ServiceModel.Channels -Imports System.Threading - -Namespace Microsoft.WCF.Documentation - Public Class Client - Implements SampleDuplexHelloCallback - Private waitHandle As AutoResetEvent - - Public Sub New() - waitHandle = New AutoResetEvent(False) - End Sub - - Public Sub Run() - ' Picks up configuration from the config file. - Dim wcfClient As New SampleDuplexHelloClient(New InstanceContext(Me)) - Try - Console.ForegroundColor = ConsoleColor.White - Console.WriteLine("Enter a greeting to send and press ENTER: ") - Console.Write(">>> ") - Console.ForegroundColor = ConsoleColor.Green - Dim greeting = Console.ReadLine() - Console.ForegroundColor = ConsoleColor.White - Console.WriteLine("Called service with: " & Constants.vbCrLf & Constants.vbTab & greeting) - wcfClient.Hello(greeting) - wcfClient.Hello("Second greeting.") - Console.WriteLine("Execution passes service call and moves to the WaitHandle.") - Me.waitHandle.WaitOne() - Console.ForegroundColor = ConsoleColor.Blue - Console.WriteLine("Set was called.") - Console.Write("Press ") - Console.ForegroundColor = ConsoleColor.Red - Console.Write("ENTER") - Console.ForegroundColor = ConsoleColor.Blue - Console.Write(" to exit...") - Console.ReadLine() - wcfClient.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Console.ReadLine() - wcfClient.Abort() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - Console.ReadLine() - wcfClient.Abort() - End Try - End Sub - Public Shared Sub Main() - Dim client As New Client() - client.Run() - End Sub - - Public Sub Reply(ByVal response As String) Implements SampleDuplexHelloCallback.Reply - Console.WriteLine("Received output.") - Console.WriteLine(Constants.vbCrLf & Constants.vbTab & response) - If response.Contains("Second greeting.") Then - Me.waitHandle.Set() - End If - End Sub - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vbproj b/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vbproj deleted file mode 100644 index dd66f7a9738..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/client.vbproj +++ /dev/null @@ -1,95 +0,0 @@ - - - Debug - AnyCPU - {66190530-B4E3-4BF0-94B4-DFE52D15E50F} - Exe - false - Client - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/host.vbproj b/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/host.vbproj deleted file mode 100644 index f98e2f679a7..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/host.vbproj +++ /dev/null @@ -1,91 +0,0 @@ - - - Debug - AnyCPU - {907F0C93-0FC2-4419-B0CE-2B775830A3C2} - Exe - false - HostApplication - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/hostapplication.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/hostapplication.vb deleted file mode 100644 index 9d434f0b695..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/hostapplication.vb +++ /dev/null @@ -1,41 +0,0 @@ - -Imports System.Configuration -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class HostApplication - - Shared Sub Main() - Dim app As New HostApplication() - app.Run() - End Sub - - Private Sub Run() - ' Get base address from app settings in configuration if you want. - Dim baseAddress As New Uri(ConfigurationManager.AppSettings("baseAddress")) - - ' Create a ServiceHost for the service type and provide the base address. - Using serviceHost As New ServiceHost(GetType(DuplexHello), baseAddress) - Try - ' Open the ServiceHostBase to create listeners and start listening for messages. - serviceHost.Open() - - ' The service can now be accessed. - Console.WriteLine("The service is ready.") - Console.WriteLine("Press to terminate service.") - Console.WriteLine() - Console.ReadLine() - - ' Close the ServiceHostBase to shutdown the service. - serviceHost.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/proxycode.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/proxycode.vb deleted file mode 100644 index 329b79a7e58..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/proxycode.vb +++ /dev/null @@ -1,67 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.42 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - - - - - _ -Public Interface SampleDuplexHello - - _ - Sub Hello(ByVal greeting As String) -End Interface - - _ -Public Interface SampleDuplexHelloCallback - - _ - Sub Reply(ByVal responseToGreeting As String) -End Interface - - _ -Public Interface SampleDuplexHelloChannel - Inherits SampleDuplexHello, System.ServiceModel.IClientChannel -End Interface - - _ -Partial Public Class SampleDuplexHelloClient - Inherits System.ServiceModel.DuplexClientBase(Of SampleDuplexHello) - Implements SampleDuplexHello - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext) - MyBase.New(callbackInstance) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal endpointConfigurationName As String) - MyBase.New(callbackInstance, endpointConfigurationName) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal endpointConfigurationName As String, _ - ByVal remoteAddress As String) - MyBase.New(callbackInstance, endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal endpointConfigurationName As String, _ - ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(callbackInstance, endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal binding As _ - System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(callbackInstance, binding, remoteAddress) - End Sub - - Public Sub Hello(ByVal greeting As String) Implements SampleDuplexHello.Hello - MyBase.Channel.Hello(greeting) - End Sub -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb b/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb deleted file mode 100644 index 03d37fc1912..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb +++ /dev/null @@ -1,46 +0,0 @@ -' - - -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Threading - -Namespace Microsoft.WCF.Documentation - _ - Public Interface IDuplexHello - _ - Sub Hello(ByVal greeting As String) - End Interface - - Public Interface IHelloCallbackContract - _ - Sub Reply(ByVal responseToGreeting As String) - End Interface - - _ - Public Class DuplexHello - Implements IDuplexHello - - Public Sub New() - Console.WriteLine("Service object created: " & Me.GetHashCode().ToString()) - End Sub - - Protected Overrides Sub Finalize() - Console.WriteLine("Service object destroyed: " & Me.GetHashCode().ToString()) - End Sub - - Public Sub Hello(ByVal greeting As String) Implements IDuplexHello.Hello - Console.WriteLine("Caller sent: " & greeting) - Console.WriteLine("Session ID: " & OperationContext.Current.SessionId) - Console.WriteLine("Waiting two seconds before returning call.") - ' Put a slight delay to demonstrate asynchronous behavior on client. - Thread.Sleep(2000) - Dim callerProxy As IHelloCallbackContract = OperationContext.Current.GetCallbackChannel(Of IHelloCallbackContract)() - Dim response = "Service object " & Me.GetHashCode().ToString() & " received: " & greeting - Console.WriteLine("Sending back: " & response) - callerProxy.Reply(response) - End Sub - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb b/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb deleted file mode 100644 index c0a20c86bef..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb +++ /dev/null @@ -1,34 +0,0 @@ -' - - -Imports System.ServiceModel -Imports System.ServiceModel.Channels - -Public Class Client - Public Shared Sub Main() - ' Picks up configuration from the config file. - Dim wcfClient As New SampleServiceClient() - Try - ' Making calls. - Console.WriteLine("Enter the greeting to send: ") - Dim greeting = Console.ReadLine() - Console.WriteLine("The service responded: " & wcfClient.SampleMethod(greeting)) - - Console.WriteLine("Press ENTER to exit:") - Console.ReadLine() - - ' Done with service. - wcfClient.Close() - Console.WriteLine("Done!") - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - wcfClient.Abort() - Console.Read() - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - wcfClient.Abort() - Console.Read() - End Try - End Sub -End Class -' diff --git a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vbproj b/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vbproj deleted file mode 100644 index dd66f7a9738..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vbproj +++ /dev/null @@ -1,95 +0,0 @@ - - - Debug - AnyCPU - {66190530-B4E3-4BF0-94B4-DFE52D15E50F} - Exe - false - Client - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/host.vbproj b/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/host.vbproj deleted file mode 100644 index f98e2f679a7..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/host.vbproj +++ /dev/null @@ -1,91 +0,0 @@ - - - Debug - AnyCPU - {907F0C93-0FC2-4419-B0CE-2B775830A3C2} - Exe - false - HostApplication - - - - - 2.0 - - - On - On - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - .\bin\Debug\ - true - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - pdbonly - true - .\bin\Release\ - false - true - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 - - - - - - - - - - - - - - - Always - - - - - - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/hostapplication.vb b/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/hostapplication.vb deleted file mode 100644 index e5945e52647..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/hostapplication.vb +++ /dev/null @@ -1,38 +0,0 @@ - -Imports System.Configuration -Imports System.Collections.Generic -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - Friend Class HostApplication - - Shared Sub Main() - Dim app As New HostApplication() - app.Run() - End Sub - - Private Sub Run() - ' Create a ServiceHost for the service type and use base address from configuration. - Using serviceHost As New ServiceHost(GetType(SampleService)) - Try - ' Open the ServiceHostBase to create listeners and start listening for messages. - serviceHost.Open() - - ' The service can now be accessed. - Console.WriteLine("The service is ready.") - Console.WriteLine("Press to terminate service.") - Console.WriteLine() - Console.ReadLine() - - ' Close the ServiceHostBase to shutdown the service. - serviceHost.Close() - Catch timeProblem As TimeoutException - Console.WriteLine("The service operation timed out. " & timeProblem.Message) - Catch commProblem As CommunicationException - Console.WriteLine("There was a communication problem. " & commProblem.Message) - End Try - End Using - End Sub - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/proxycode.vb b/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/proxycode.vb deleted file mode 100644 index 0e518bc2750..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/proxycode.vb +++ /dev/null @@ -1,56 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:2.0.50727.42 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - - - - - - _ -Public Interface SampleService - - _ - Function SampleMethod(ByVal msg As String) As String -End Interface - - _ -Public Interface SampleServiceChannel - Inherits SampleService, System.ServiceModel.IClientChannel -End Interface - - _ -Partial Public Class SampleServiceClient - Inherits System.ServiceModel.ClientBase(Of SampleService) - Implements SampleService - - Public Sub New() - End Sub - - Public Sub New(ByVal endpointConfigurationName As String) - MyBase.New(endpointConfigurationName) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(endpointConfigurationName, remoteAddress) - End Sub - - Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) - MyBase.New(binding, remoteAddress) - End Sub - - Public Function SampleMethod(ByVal msg As String) As String Implements SampleService.SampleMethod - Return MyBase.Channel.SampleMethod(msg) - End Function -End Class diff --git a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb b/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb deleted file mode 100644 index 2e97b5e998b..00000000000 --- a/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb +++ /dev/null @@ -1,27 +0,0 @@ -' - - -Imports System.Collections.Generic -Imports System.Net.Security -Imports System.ServiceModel -Imports System.Text - -Namespace Microsoft.WCF.Documentation - _ - Public Interface ISampleService - _ - Function SampleMethod(ByVal msg As String) As String - End Interface - - Friend Class SampleService - Implements ISampleService - #Region "ISampleService Members" - - Public Function SampleMethod(ByVal msg As String) As String Implements ISampleService.SampleMethod - Return "The service greets you: " & msg - End Function - - #End Region - End Class -End Namespace -' diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/customcontrol.vb b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/customcontrol.vb deleted file mode 100644 index 915809e2606..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/customcontrol.vb +++ /dev/null @@ -1,564 +0,0 @@ -'************************************************************************************************ -' * -' * File: CustomControl.vb -' * -' * Description: -' * -' * A custom list control that supports UI Automation. -' * -' * See ProviderForm.vb for a full description of this sample. -' * -' * -' * This file is part of the Microsoft Windows SDK Code Samples. -' * -' * Copyright (C) Microsoft Corporation. All rights reserved. -' * -' * This source code is intended only as a supplement to Microsoft -' * Development Tools and/or on-line documentation. See these other -' * materials for detailed information regarding Microsoft code samples. -' * -' * THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY -' * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -' * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -' * PARTICULAR PURPOSE. -' * -' ************************************************************************************************ - - -Imports System.Collections.Generic -Imports System.Text -Imports System.Drawing -Imports System.Windows.Forms -Imports System.Diagnostics -Imports System.Collections -Imports System.Windows.Automation.Provider -Imports System.Windows.Automation -Imports System.Security.Permissions - -Namespace CustomControls - Public Enum Availability - Online - Offline - End Enum - - Public Class CustomListControl - Inherits Control - #Region "Private Members" - - ' Collection of strings that are items in the list. - Private itemsArray As ArrayList - ' Index of selected item, or -1 if no item is selected. - Private currentSelection As Integer = -1 - ' Constraints on list size. - Private maxNumberOfItems As Integer = 10 - Private minNumberOfItems As Integer = 1 - ' Dimensions of list item. - Private Const itemHeight As Integer = 15 - Private Const listWidth As Integer = 70 - ' Dimensions of image that signifies item status. - Private Const imageWidth As Integer = 10 - Private Const imageHeight As Integer = 10 - ' Text indentation to allow room for image. - Private Const textIndent As Integer = 15 - - ' Unique identifier for each list item; never reused during the life of the control. - Private uniqueIdentifier As Integer = 0 - - ' The UI Automation provider for this instance of the control. - Private myListProvider As ListProvider - - #End Region ' Private Members - - #Region "Public Methods" - - ''' - ''' Constructor. - ''' - Public Sub New() - Me.Size = New Size(listWidth, itemHeight * MaximumNumberOfItems) - - ' Initialize list item collection. - itemsArray = New ArrayList() - End Sub - - - ''' - ''' Gets the maximum number of items the list can accommodate. For this example, this is constrained - ''' by the size of the window so that we do not have to handle scrolling. - ''' - Public ReadOnly Property MaximumNumberOfItems() As Integer - Get - Return maxNumberOfItems - End Get - End Property - - ''' - ''' Gets the minimum number of items the list can accommodate. - ''' - Public ReadOnly Property MinimumNumberOfItems() As Integer - Get - Return minNumberOfItems - End Get - End Property - - ''' - ''' Gets the unique identifier of a list item. This number is never reused within an instance - ''' of the control. - ''' - Public ReadOnly Property UniqueId() As Integer - Get - uniqueIdentifier += 1 - Return uniqueIdentifier - End Get - End Property - - ''' - ''' Gets and sets the index of the selected item. - ''' - Public Property SelectedIndex() As Integer - Get - Return Me.currentSelection - End Get - Set(ByVal value As Integer) - InternalSelect(value) - End Set - End Property - - ''' - ''' Gets the item at the specified index. - ''' - ''' The zero-based index of the item. - ''' The control for the item. - Public Function GetItem(ByVal i As Integer) As CustomListItem - Return CType(itemsArray(i), CustomListItem) - End Function - - ''' - ''' Gets the number of items in the list. - ''' - Public ReadOnly Property ItemCount() As Integer - Get - Return itemsArray.Count - End Get - End Property - - ''' - ''' Gets the index of the specified item. - ''' - ''' The item. - ''' The zero-based index. - Public Function ItemIndex(ByVal listItem As CustomListItem) As Integer - ' Allows CustomListItem to requery its index, as it can change. - Return itemsArray.IndexOf(listItem) - End Function - - ''' - ''' Removes an item from the list. - ''' - ''' Index of the item. - ''' true if successful. - Public Function Remove(ByVal itemIndex As Integer) As Boolean - If (Me.ItemCount = minNumberOfItems) OrElse (itemIndex <= -1) OrElse (itemIndex >= Me.ItemCount) Then - ' If the number of items in the list is already at minimum, - ' no additional items can be removed. - Return False - End If - Dim itemToBeRemoved As CustomListItem = CType(itemsArray(itemIndex), CustomListItem) - - ' Notify the provider that item it going to be destroyed. - itemToBeRemoved.IsAlive = False - - ' Force refresh. - Me.Invalidate() - - ' Raise notification. - If myListProvider IsNot Nothing Then - ListProvider.OnStructureChangeRemove(itemToBeRemoved.Container) - End If - itemsArray.RemoveAt(itemIndex) - currentSelection = 0 ' Reset selection to first item. - - Return True - End Function - - ''' - ''' Adds an item to the list. - ''' - ''' Index at which to add the item. - ''' Item to add. - ''' true if successful. - Public Function Add(ByVal item As String, ByVal a As Availability) As Boolean - If itemsArray.Count < maxNumberOfItems Then - Dim listItem As CustomListItem - listItem = New CustomListItem(Me, item, Me.UniqueId, a) - itemsArray.Add(listItem) - - ' Initialize the selection if necessary. - If currentSelection < 0 Then - currentSelection = 0 - listItem.IsSelected = True - End If - Me.Invalidate() ' update to draw new added item - - ' Raise a UI Automation event. - If myListProvider IsNot Nothing Then - ListProvider.OnStructureChangeAdd(listItem.Container) - End If - Return True - End If - Return False - End Function - - #End Region ' Public Methods - - - #Region "Private/Internal methods" - - ''' - ''' Responds to GotFocus event by repainting the list. - ''' - ''' Event arguments - Protected Overrides Sub OnGotFocus(ByVal e As EventArgs) - OnPaint(New PaintEventArgs(CreateGraphics(), Me.DisplayRectangle)) - MyBase.OnGotFocus(e) - End Sub - - ''' - ''' Responds to LostFocus event by repainting the list. - ''' - ''' Event arguments. - Protected Overrides Sub OnLostFocus(ByVal e As EventArgs) - OnPaint(New PaintEventArgs(CreateGraphics(), Me.DisplayRectangle)) - MyBase.OnLostFocus(e) - End Sub - - ''' - ''' Responds to Paint event. - ''' - ''' Event arguments. - Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) - ' Use SystemBrushes for colors of a control. - Dim backgroundBrush As System.Drawing.Brush = SystemBrushes.Window - Dim focusedBrush As System.Drawing.Brush - If Me.Focused Then - focusedBrush = SystemBrushes.Highlight - Else - focusedBrush = New SolidBrush(Color.DarkGray) - End If - e.Graphics.FillRectangle(backgroundBrush, DisplayRectangle) - - ' Colors for online/offline image. - Dim itemOnBrush As System.Drawing.Brush = Brushes.Green - Dim itemOffBrush As System.Drawing.Brush = Brushes.Red - - Dim itemTextFont As System.Drawing.Font = SystemFonts.DefaultFont - - Dim itemInk As System.Drawing.Brush = SystemBrushes.ControlText - Dim selectedItemInk As System.Drawing.Brush = SystemBrushes.HighlightText - - ' Loop through items to draw their text onto screen - For i As Integer = 0 To itemsArray.Count - 1 - Dim pt As New Point(DisplayRectangle.Left+2, DisplayRectangle.Top + (i * itemHeight)) - Dim listItem As CustomListItem = (CType(itemsArray(i), CustomListItem)) - Dim rc As Rectangle = GetRectForItem(i) - rc = New Rectangle(rc.X, rc.Y+2, imageWidth, imageHeight) - If listItem.Status = Availability.Online Then - e.Graphics.FillRectangle(itemOnBrush, rc) - Else - e.Graphics.FillRectangle(itemOffBrush, rc) - End If - rc = New Rectangle(rc.X + textIndent, rc.Y-2, listWidth - textIndent, itemHeight) - If i = SelectedIndex Then - e.Graphics.FillRectangle(focusedBrush, rc) - e.Graphics.DrawString(listItem.Text, itemTextFont, selectedItemInk, rc) - Else - ' Item not selected. - e.Graphics.DrawString(listItem.Text, itemTextFont, itemInk, rc) - End If - Next i - e.Dispose() - End Sub - - ''' - ''' Handles MouseDown event by selecting the item under the cursor. - ''' - ''' Event arguments. - Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs) - Me.Focus() - Dim index As Integer = ItemIndexFromPoint(New Point(e.X, e.Y)) - If index <> -1 Then - InternalSelect(index) - End If - End Sub - - ''' - ''' Gets the index at the specified screen coordinates. - ''' - ''' The screen coordinates. - ''' The index of the item, or -1 if pt is not within the control. - ''' This logic is simple because the control does not support scrolling. - Friend Function ItemIndexFromPoint(ByVal pt As Point) As Integer - ' Determine whether the point is within the control. - If Not Me.DisplayRectangle.Contains(pt) Then - Return -1 - End If - - Dim index As Integer = CInt((Me.DisplayRectangle.Y + pt.Y) / itemHeight) - If index >= itemsArray.Count Then - index = -1 - End If - Return index - End Function - - ''' - ''' Gets the screen coordinates of an item. - ''' - ''' The index of the item. - ''' The screen coordinates. - Friend Function GetRectForItem(ByVal index As Integer) As Rectangle - Dim itemTop As Integer = DisplayRectangle.Top + (itemHeight * index) + 1 - Return New Rectangle(DisplayRectangle.X, itemTop, DisplayRectangle.Width, itemHeight) - End Function - - ''' - ''' Processes up/down arrow keys. - ''' - ''' The Windows message. - ''' Information about the key press. - ''' true if successful. - - Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean - If keyData = Keys.Down Then - If currentSelection < itemsArray.Count - 1 Then - InternalSelect(currentSelection + 1) - End If - Return True - - ElseIf keyData = Keys.Up Then - If currentSelection > 0 Then - InternalSelect(currentSelection - 1) - End If - Return True - Else - Return MyBase.ProcessCmdKey(msg, keyData) - End If - End Function - - ''' - ''' Selects an item in the list. - ''' - ''' Index of the item to select. - Private Sub InternalSelect(ByVal index As Integer) - If (index >= itemsArray.Count) OrElse (index < 0) Then - Throw New ArgumentOutOfRangeException() - Else - If currentSelection <> index Then - CType(itemsArray(currentSelection), CustomListItem).IsSelected = False - CType(itemsArray(index), CustomListItem).IsSelected = True - currentSelection = index - ' Force refresh. - Invalidate() - CustomControls.ListProvider.OnSelectionChange(CType(itemsArray(index), CustomListItem)) - End If - - ' Raise an event. - ListProvider.OnFocusChange(CType(itemsArray(index), CustomListItem)) - End If - End Sub - - #End Region ' Private/Internal methods - - - #Region "UI Automation related methods" - - ''' - ''' Gets the UI Automation provider for the control. - ''' - Public ReadOnly Property Provider() As ListProvider - Get - Return myListProvider - End Get - End Property - - ''' - ''' Gets a value that specifies whether the UI Automation provider is attached. - ''' - Protected ReadOnly Property AutomationIsActive() As Boolean - Get - Return (myListProvider IsNot Nothing) - End Get - End Property - - ''' - ''' Handles WM_GETOBJECT message; others are passed to base handler. - ''' - ''' Windows message. - ''' This method enables UI Automation to find the control. - - Protected Overrides Sub WndProc(ByRef m As Message) - Const WM_GETOBJECT As Integer = &H003D - - If m.Msg = WM_GETOBJECT Then - If Not AutomationIsActive Then - ' If no provider has been created, then create one. - myListProvider = New ListProvider(Me) - - ' Create providers for each existing item in the list. - For Each listItem As CustomListItem In itemsArray - listItem.Provider = New ListItemProvider(myListProvider,listItem) - Next listItem - End If - - m.Result = AutomationInteropProvider.ReturnRawElementProvider(Handle, m.WParam, m.LParam, myListProvider) - Return - End If - MyBase.WndProc(m) - End Sub - - #End Region ' UI Automation related methods - End Class - - - - Public Class CustomListItem - Private ItemIsSelected As Boolean = False - - Private ItemText As String - Private ItemIndex As Integer - Private ItemOwnerList As CustomListControl - Private ItemStatus As Availability - Private ItemId As Integer - Private ItemProvider As ListItemProvider - Private ItemRect As Rectangle - Private ItemIsAlive As Boolean - - ''' - ''' Constructor. - ''' - ''' The owning list. - ''' The text of the item. - ''' The unique identifier of the item within the list. - ''' The status (online or offline) of the item. - Public Sub New(ByVal parent As CustomListControl, ByVal text As String, ByVal id As Integer, ByVal availability As Availability) - ItemIsAlive = True - ItemOwnerList = parent - ItemText = text - ItemId = id - ItemStatus = availability - End Sub - - ''' - ''' Gets and sets the status of the item (alive if it is still displayed). - ''' - Public Property IsAlive() As Boolean - Get - Return ItemIsAlive - End Get - Set(ByVal value As Boolean) - ItemIsAlive = value - End Set - End Property - - ''' - ''' Gets the CustomListControl that contains this item. - ''' - Public ReadOnly Property Container() As CustomListControl - Get - Return ItemOwnerList - End Get - End Property - - ''' - ''' Gets and sets the selection status of the item. - ''' - Public Property IsSelected() As Boolean - Get - Return ItemIsSelected - End Get - Set(ByVal value As Boolean) - ItemIsSelected = value - End Set - End Property - - ''' - ''' Gets the unique identifier of the item within the list. - ''' - Public ReadOnly Property Id() As Integer - Get - Return ItemId - End Get - End Property - - ''' - ''' Gets the location of the item on the screen. - ''' - ''' - ''' Uses delegation to avoid interacting with the UI on a different thread. - ''' - Public ReadOnly Property Location() As Rectangle - Get - ItemRect = Me.ItemOwnerList.GetRectForItem(Me.Index) - ' Invoke control method on separate thread to avoid clashing with UI. - ' Use anonymous method for simplicity. - Me.ItemOwnerList.Invoke(New MethodInvoker(Sub() ItemRect = Me.ItemOwnerList.RectangleToScreen(ItemRect))) - Return ItemRect - End Get - End Property - - ''' - ''' Gets and sets the text of the item. - ''' - Public Property Text() As String - Get - Return ItemText - End Get - Set(ByVal value As String) - ItemText = value - End Set - End Property - - ''' - ''' Gets and sets the index of the item. - ''' - Public Property Index() As Integer - Get - ItemIndex = ItemOwnerList.ItemIndex(Me) - Return ItemIndex - End Get - Set(ByVal value As Integer) - ItemIndex = value - End Set - End Property - - ''' - ''' Gets and sets the status (online or offline) of the item. - ''' - Public Property Status() As Availability - Get - Return ItemStatus - End Get - Set(ByVal value As Availability) - ItemStatus = value - End Set - End Property - - - ''' - ''' Gets and sets the UI Automation provider for the item. - ''' - Public Property Provider() As ListItemProvider - Get - If ItemProvider Is Nothing Then - ItemProvider = New ListItemProvider(ItemOwnerList.Provider, Me) - - End If - Return ItemProvider - End Get - Set(ByVal value As ListItemProvider) - ItemProvider = value - End Set - End Property - - - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/elementprovider.vbproj b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/elementprovider.vbproj deleted file mode 100644 index 3dfe539b07b..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/elementprovider.vbproj +++ /dev/null @@ -1,100 +0,0 @@ - - - Debug - AnyCPU - 10.0.20821 - 2.0 - {60A534E9-F891-4B01-9AD4-5EFDFE6B0B42} - WinExe - - ElementProvider - true - http://localhost/ElementProvider/ - true - Web - true - Foreground - 7 - Days - false - false - true - 1.0.0.* - true - LocalIntranet - false - v4.0 - On - Binary - Off - On - Client - - - true - full - false - .\ - true - true - prompt - - - - - pdbonly - true - bin\Release\ - false - true - prompt - - - - - - - - - - False - - - False - D:\avalon.binaries.x86chk\UIAutomationTypes.dll - - - False - - - - - Component - - - - - - - ProviderForm.vb - Designer - - - Form - - - ProviderForm.vb - - - - - False - .NET Framework 2.0 Beta - true - - - - - - - \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb deleted file mode 100644 index eca9e051399..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb +++ /dev/null @@ -1,342 +0,0 @@ -'************************************************************************************************ -' * -' * File: ListFragment.vb -' * -' * Description: Implements a UI Automation provider for a custom list control. -' * -' * See ProviderForm.vb for a full description of this sample. -' * -' * -' * This file is part of the Microsoft Windows SDK Code Samples. -' * -' * Copyright (C) Microsoft Corporation. All rights reserved. -' * -' * This source code is intended only as a supplement to Microsoft -' * Development Tools and/or on-line documentation. See these other -' * materials for detailed information regarding Microsoft code samples. -' * -' * THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY -' * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -' * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -' * PARTICULAR PURPOSE. -' * -' ************************************************************************************************ - - -Imports System.Collections.Generic -Imports System.Text -Imports System.Drawing -Imports System.Windows.Forms -Imports System.Windows.Automation.Provider -Imports System.Windows.Automation -Imports System.Collections -Imports System.Threading - - -Namespace CustomControls - Public Class ListProvider - Implements IRawElementProviderFragmentRoot, ISelectionProvider - ' Control that contains the list. - Private OwnerListControl As CustomListControl - ' Window handle of the control. - Private WindowHandle As IntPtr - - ''' - ''' Constructor - ''' - ''' - ''' The control for which this object is providing UI Automation functionality. - ''' - Public Sub New(ByVal control As CustomListControl) - OwnerListControl = control - WindowHandle = control.Handle - End Sub - - #Region "IRawElementProviderSimple Members" - - ''' - ''' Retrieves the object that supports the specified control pattern. - ''' - ''' The pattern identifier - ''' - ''' The supporting object, or null if the pattern is not supported. - ''' - Private Function GetPatternProvider(ByVal patternId As Integer) As Object Implements IRawElementProviderSimple.GetPatternProvider - If patternId = SelectionPatternIdentifiers.Pattern.Id Then - Return Me - End If - Return Nothing - End Function - - - ''' - ''' Gets provider property values. - ''' - ''' The property identifier. - ''' The value of the property. - Private Function GetPropertyValue(ByVal propertyId As Integer) As Object Implements IRawElementProviderSimple.GetPropertyValue - If propertyId = AutomationElementIdentifiers.ControlTypeProperty.Id Then - Return ControlType.List.Id - ' It is necessary to supply a value for IsKeyboardFocusable in a Windows Forms control, - ' because this value cannot be discovered by the HWND host provider. This is not - ' necessary for a Win32 provider. - ElseIf propertyId = AutomationElementIdentifiers.IsKeyboardFocusableProperty.Id Then - Return True - ElseIf propertyId = AutomationElementIdentifiers.FrameworkIdProperty.Id Then - Return "Custom" - End If - Return Nothing - End Function - - ''' - ''' Gets the host provider. - ''' - ''' - ''' Fragment roots return their window providers; most others return null. - ''' - Private ReadOnly Property HostRawElementProvider() As IRawElementProviderSimple Implements IRawElementProviderSimple.HostRawElementProvider - Get - Return AutomationInteropProvider.HostProviderFromHandle(WindowHandle) - End Get - End Property - - ''' - ''' Gets provider options. - ''' - Private ReadOnly Property IRawElementProviderSimple_ProviderOptions() As ProviderOptions Implements IRawElementProviderSimple.ProviderOptions - Get - Return ProviderOptions.ServerSideProvider - End Get - End Property - - #End Region ' IRawElementProviderSimple Members - - - #Region "IRawElementProviderFragment Members" - - ''' - ''' Gets the bounding rectangle. - ''' - ''' - ''' Fragment roots should return an empty rectangle. UI Automation will get the rectangle - ''' from the host control (the HWND in this case). - ''' - Private ReadOnly Property BoundingRectangle() As System.Windows.Rect Implements IRawElementProviderFragment.BoundingRectangle - Get - Return System.Windows.Rect.Empty - End Get - End Property - - ''' - ''' Gets the root of this fragment. - Private ReadOnly Property FragmentRoot() As IRawElementProviderFragmentRoot Implements IRawElementProviderFragment.FragmentRoot - Get - Return Me - End Get - End Property - - ''' - ''' Gets any fragment roots that are embedded in this fragment. - ''' - ''' Null in this case. - Private Function GetEmbeddedFragmentRoots() As IRawElementProviderSimple() Implements IRawElementProviderFragment.GetEmbeddedFragmentRoots - Return Nothing - End Function - - ''' - ''' Gets the runtime identifier of the UI Automation element. - ''' - ''' Fragment roots return null. - Private Function GetRuntimeId() As Integer() Implements IRawElementProviderFragment.GetRuntimeId - Return Nothing - End Function - - ''' - ''' Navigates to adjacent elements in the UI Automation tree. - ''' - ''' Direction of navigation. - ''' The element in that direction, or null. - ''' The provider only returns directions that it is responsible for. - ''' UI Automation knows how to navigate between HWNDs, so only the custom item - ''' navigation needs to be provided. - ''' - Private Function Navigate(ByVal direction As NavigateDirection) As IRawElementProviderFragment Implements IRawElementProviderFragment.Navigate - If direction = NavigateDirection.FirstChild Then - Return GetProviderForIndex(0) - ElseIf direction = NavigateDirection.LastChild Then - Return GetProviderForIndex(OwnerListControl.ItemCount-1) - End If - Return Nothing - End Function - - ''' - ''' Responds to a client request to set the focus to this control. - ''' - ''' Setting focus to the control is handled by the parent window. - Private Sub SetFocus() Implements IRawElementProviderFragment.SetFocus - Throw New Exception("The method is not implemented.") - End Sub - - #End Region ' IRawElementProviderFragment Members - - - #Region "IRawElementProviderFragmentRoot Members" - - ''' - ''' Gets the child element at the specified point. - ''' - ''' Distance from the left of the application window. - ''' Distance from the top of the application window. - ''' The provider for the element at that point. - Private Function ElementProviderFromPoint(ByVal x As Double, ByVal y As Double) As IRawElementProviderFragment Implements IRawElementProviderFragmentRoot.ElementProviderFromPoint - Dim index As Integer = -1 - Dim clientPoint As New System.Drawing.Point(CInt(x), CInt(y)) - - ' Invoke control method on separate thread to avoid clashing with UI. - ' Use anonymous method for simplicity. - Me.OwnerListControl.Invoke(New MethodInvoker(Sub() clientPoint = Me.OwnerListControl.PointToClient(clientPoint))) - - index = OwnerListControl.ItemIndexFromPoint(clientPoint) - - If index = -1 Then - Return Nothing - End If - Return GetProviderForIndex(index) - End Function - - - ''' - ''' Returns the child element that is selected when the list gets focus. - ''' - ''' The selected item. - Private Function GetFocus() As IRawElementProviderFragment Implements IRawElementProviderFragmentRoot.GetFocus - Dim index As Integer = OwnerListControl.SelectedIndex - Return GetProviderForIndex(index) - End Function - - #End Region ' IRawElementProviderFragmentRoot - - - #Region "ISelectionProvider Members" - - ' - ''' - ''' Specifies whether selection of more than one item at a time is supported. - ''' - Private ReadOnly Property CanSelectMultiple() As Boolean Implements ISelectionProvider.CanSelectMultiple - Get - Return False - End Get - End Property - ' - - ' - ''' - ''' Returns the UI Automation provider for the selected list items. - ''' - ''' The selected items. - ''' - ''' Because this is a single-selection list box, only one item is - ''' returned. - ''' - Private Function GetSelection() As IRawElementProviderSimple() Implements ISelectionProvider.GetSelection - Dim index As Integer = OwnerListControl.SelectedIndex - Return New IRawElementProviderSimple() { GetProviderForIndex(index) } - End Function - ' - - ' - ''' - ''' Specifies whether the list must have an item selected at all times. - ''' - Private ReadOnly Property IsSelectionRequired() As Boolean Implements ISelectionProvider.IsSelectionRequired - Get - Return True - End Get - End Property - ' - - #End Region ' ISelectionProvider Members - - #Region "Helper methods" - - ''' - ''' Gets the UI Automation provider for the item at the specified index. - ''' - ''' Index of the item. - ''' The provider object, or null if the index is out of range. - Public Function GetProviderForIndex(ByVal index As Integer) As IRawElementProviderFragment - Dim OwnerCustomListItemCount As Integer = OwnerListControl.ItemCount - 1 - If (index < 0) OrElse (index > OwnerCustomListItemCount) Then - Return Nothing - End If - Return CType(Me.OwnerListControl.GetItem(index).Provider, IRawElementProviderFragment) - End Function - - - ''' - ''' Responds to a focus change by raising an event. - ''' - ''' The item that has received focus. - Public Shared Sub OnFocusChange(ByVal listItem As CustomListItem) - If AutomationInteropProvider.ClientsAreListening Then - Dim args As New AutomationEventArgs(AutomationElementIdentifiers.AutomationFocusChangedEvent) - AutomationInteropProvider.RaiseAutomationEvent(AutomationElementIdentifiers.AutomationFocusChangedEvent, listItem.Provider, args) - End If - End Sub - - - ''' - ''' Responds to a selection change by raising an event. - ''' - ''' The item that has been selected. - Public Shared Sub OnSelectionChange(ByVal listItem As CustomListItem) - If AutomationInteropProvider.ClientsAreListening Then - Dim args As New AutomationEventArgs(SelectionItemPatternIdentifiers.ElementSelectedEvent) - AutomationInteropProvider.RaiseAutomationEvent(SelectionItemPatternIdentifiers.ElementSelectedEvent, listItem.Provider, args) - End If - End Sub - -' - ''' - ''' Responds to an addition to the UI Automation tree structure by raising an event. - ''' - ''' - ''' The list to which the item was added. - ''' - ''' - ''' For the runtime Id of the item, pass 0 because the provider cannot know - ''' what its actual runtime Id is. - ''' - Public Shared Sub OnStructureChangeAdd(ByVal list As CustomListControl) - If AutomationInteropProvider.ClientsAreListening Then - Dim fakeRuntimeId() As Integer = { 0 } - Dim args As New StructureChangedEventArgs(StructureChangeType.ChildrenBulkAdded, fakeRuntimeId) - AutomationInteropProvider.RaiseStructureChangedEvent(CType(list.Provider, IRawElementProviderSimple), args) - End If - End Sub - - ''' - ''' Responds to a removal from the UI Automation tree structure - ''' by raising an event. - ''' - ''' - ''' The list from which the item was removed. - ''' - ''' - ''' For the runtime Id of the list, pass 0 because the provider cannot know - ''' what its actual runtime ID is. - ''' - Public Shared Sub OnStructureChangeRemove(ByVal list As CustomListControl) - If AutomationInteropProvider.ClientsAreListening Then - Dim fakeRuntimeId() As Integer = { 0 } - Dim args As New StructureChangedEventArgs(StructureChangeType.ChildrenBulkRemoved, fakeRuntimeId) - AutomationInteropProvider.RaiseStructureChangedEvent(CType(list.Provider, IRawElementProviderSimple), args) - End If - End Sub -' - - #End Region ' Helper methods - - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb deleted file mode 100644 index ef461378679..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb +++ /dev/null @@ -1,298 +0,0 @@ -'************************************************************************************************ -' * -' * File: ListItemFragment.vb -' * -' * Description: Implements a list item as a fragment within a custom control -' * that supports UI Automation. -' * -' * See ProviderForm.vb for a full description of this sample. -' * -' * -' * This file is part of the Microsoft Windows SDK Code Samples. -' * -' * Copyright (C) Microsoft Corporation. All rights reserved. -' * -' * This source code is intended only as a supplement to Microsoft -' * Development Tools and/or on-line documentation. See these other -' * materials for detailed information regarding Microsoft code samples. -' * -' * THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY -' * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -' * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -' * PARTICULAR PURPOSE. -' * -' ************************************************************************************************ - -Imports System.Collections.Generic -Imports System.Text -Imports System.Windows.Automation.Provider -Imports System.Windows.Automation -Imports System.Drawing -Imports System.Windows.Forms -Imports System.Diagnostics -Imports System.Collections - -Namespace CustomControls - Public Class ListItemProvider - Implements IRawElementProviderFragment, ISelectionItemProvider - ' Provider for the list that contains the item. - Private containerListProvider As ListProvider - ' Control that contains the list. - Private listItemControl As CustomListItem - ' ArrayList that represents the collection of ListItems. - Private selectedItems As ArrayList - - - ''' - ''' Constructor. - ''' - ''' - ''' UI Automation provider for the fragment root (the containing list). - ''' - ''' The control that owns this provider. - Public Sub New(ByVal rootProvider As ListProvider, ByVal thisItem As CustomListItem) - containerListProvider = rootProvider - listItemControl = thisItem - selectedItems = New ArrayList() - End Sub - - - ''' - ''' Gets the index of the item within the list. - ''' - Public ReadOnly Property Index() As Integer - Get - Return listItemControl.Index - End Get - End Property - - - #Region "IRawElementProviderSimple Members" - - ''' - ''' Retrieves the object that supports the specified control pattern. - ''' - ''' The pattern identifier - ''' - ''' The supporting object, or null if the pattern is not supported. - ''' - Public Function GetPatternProvider(ByVal patternId As Integer) As Object Implements System.Windows.Automation.Provider.IRawElementProviderSimple.GetPatternProvider - If patternId = SelectionItemPatternIdentifiers.Pattern.Id Then - Return Me - End If - Return Nothing - End Function - - ''' - ''' Returns UI Automation property values. - ''' - ''' The identifier of the property. - ''' The value of the property. - Public Function GetPropertyValue(ByVal propertyId As Integer) As Object Implements System.Windows.Automation.Provider.IRawElementProviderSimple.GetPropertyValue - If listItemControl.IsAlive = False Then - Throw New ElementNotAvailableException() - End If - If propertyId = AutomationElementIdentifiers.NameProperty.Id Then - Return listItemControl.Text - ElseIf propertyId = AutomationElementIdentifiers.ControlTypeProperty.Id Then - Return ControlType.ListItem.Id - ElseIf propertyId = AutomationElementIdentifiers.AutomationIdProperty.Id Then - Return listItemControl.Id.ToString() - ElseIf propertyId = AutomationElementIdentifiers.HasKeyboardFocusProperty.Id Then - Return listItemControl.IsSelected - ElseIf propertyId = AutomationElementIdentifiers.ItemStatusProperty.Id Then - If listItemControl.Status = CustomControls.Availability.Online Then - Return "Contact is online" - Else - Return "Contact is offline" - End If - ElseIf propertyId = AutomationElementIdentifiers.IsEnabledProperty.Id Then - Return True - ElseIf propertyId = AutomationElementIdentifiers.IsKeyboardFocusableProperty.Id Then - Return True - ElseIf propertyId = AutomationElementIdentifiers.FrameworkIdProperty.Id Then - Return "Custom" - End If - Return Nothing - End Function - - ''' - ''' Returns a host provider. - ''' - ''' - ''' In this case, because the element is not directly hosted in a - ''' window, null is returned. - ''' - Public ReadOnly Property HostRawElementProvider() As IRawElementProviderSimple Implements System.Windows.Automation.Provider.IRawElementProviderSimple.HostRawElementProvider - Get - ' Because the element is not directly hosted in a window, null is returned. - Return Nothing - End Get - End Property - - ''' - ''' Gets provider options. - ''' - Public ReadOnly Property ProviderOptions() As ProviderOptions Implements System.Windows.Automation.Provider.IRawElementProviderSimple.ProviderOptions - Get - Return ProviderOptions.ServerSideProvider - End Get - End Property - - #End Region ' IRawElementProviderSimple Members - - #Region "IRawElementProviderFragment Members" - - ''' - ''' Gets the bounding rectangle, in screen coordinates. - ''' - Public ReadOnly Property BoundingRectangle() As System.Windows.Rect Implements IRawElementProviderFragment.BoundingRectangle - Get - Dim rc As Rectangle = Me.listItemControl.Location - Return New System.Windows.Rect(rc.X, rc.Y, rc.Width, rc.Height) - End Get - End Property - - ''' - ''' Gets the root of this fragment. - ''' - Public ReadOnly Property FragmentRoot() As IRawElementProviderFragmentRoot Implements IRawElementProviderFragment.FragmentRoot - Get - Return containerListProvider - End Get - End Property - - ''' - ''' Gets any fragment roots that are embedded in this fragment. - ''' - ''' Null in this case. - Public Function GetEmbeddedFragmentRoots() As IRawElementProviderSimple() Implements IRawElementProviderFragment.GetEmbeddedFragmentRoots - Return Nothing - End Function - - ''' - ''' Gets the runtime identifier of the UI Automation element. - ''' - ''' An array of integers. - Public Function GetRuntimeId() As Integer() Implements IRawElementProviderFragment.GetRuntimeId - Return New Integer() { AutomationInteropProvider.AppendRuntimeId, listItemControl.Id} - End Function - - ''' - ''' Navigate to adjacent elements in the UI Automation tree. - ''' - ''' Direction to navigate. - ''' The element in that direction, or null. - Public Function Navigate(ByVal direction As NavigateDirection) As IRawElementProviderFragment Implements IRawElementProviderFragment.Navigate - If direction = NavigateDirection.Parent Then - Return containerListProvider - ElseIf direction = NavigateDirection.NextSibling Then - Return containerListProvider.GetProviderForIndex(listItemControl.Index + 1) - ElseIf direction = NavigateDirection.PreviousSibling Then - Return containerListProvider.GetProviderForIndex(listItemControl.Index - 1) - End If - Return Nothing - End Function - - - ''' - ''' Responds to a client request to set the focus to this control. - ''' - Public Sub SetFocus() Implements IRawElementProviderFragment.SetFocus - If listItemControl.IsAlive = False Then - Throw New ElementNotAvailableException() - End If - listItemControl.Container.SelectedIndex = Index - End Sub - - #End Region ' IRawElementProviderFragment Members - - #Region "ISelectionItemProvider Members" - - ' - ''' - ''' Adds an item to the selection for list boxes that - ''' support multiple selection. - ''' - ''' - ''' In a single-selection list box, AddToSelection() is - ''' equivalent to Select(). - ''' selectedItems is the collection of selected ListItems. - ''' - Public Sub AddToSelection() Implements ISelectionItemProvider.AddToSelection - ' Return if the item is already selected. - If (CType(Me, ISelectionItemProvider)).IsSelected Then - Return - End If - selectedItems.Add(Me) - ' TODO: Update UI. - End Sub - ' - - ' - ''' - ''' Specifies whether the item is selected. - ''' - ''' - ''' selectedItems is the collection of selected ListItems. - ''' - Public ReadOnly Property IsSelected() As Boolean Implements ISelectionItemProvider.IsSelected - Get - Return selectedItems.Contains(Me) - End Get - End Property - ' - - ' - ''' - ''' Removes the item from the selection in list boxes that support - ''' multiple selection or no selection at all. - ''' - ''' - ''' selectedItems is the collection of selected ListItems. - ''' - Public Sub RemoveFromSelection() Implements ISelectionItemProvider.RemoveFromSelection - ' Return if the item is already selected. - If (CType(Me, ISelectionItemProvider)).IsSelected Then - Return - End If - If (CType(Me, ISelectionProvider)).IsSelectionRequired And selectedItems.Count <= 0 Then - Throw New InvalidOperationException("Operation cannot be performed.") - End If - - selectedItems.Remove(Me) - ' TODO: Update UI. - End Sub - ' - - ' - ''' - ''' Selects the item. - ''' - ''' - ''' selectedItems is the collection of selected ListItems. - ''' - Public Sub [Select]() Implements ISelectionItemProvider.Select - selectedItems.Clear() - selectedItems.Add(Me) - ' TODO: Update UI. - End Sub - ' - - ' - ''' - ''' Gets the list box that contains the item. - ''' - ''' - ''' Provider for the list that contains the item. - ''' - Public ReadOnly Property SelectionContainer() As IRawElementProviderSimple Implements ISelectionItemProvider.SelectionContainer - Get - Return containerListProvider - End Get - End Property - ' - - #End Region ' ISelectionPatternProvider Members - End Class -End Namespace diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/program.vb b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/program.vb deleted file mode 100644 index 382475a5c4f..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/program.vb +++ /dev/null @@ -1,42 +0,0 @@ -'************************************************************************************************ -' * -' * File: Program.vb -' * -' * Description: Entry point for an application that supports UIAutomation in a custom control. -' * -' * See ProviderForm.vb for a full description of this sample. -' * -' * -' * This file is part of the Microsoft Windows SDK Code Samples. -' * -' * Copyright (C) Microsoft Corporation. All rights reserved. -' * -' * This source code is intended only as a supplement to Microsoft -' * Development Tools and/or on-line documentation. See these other -' * materials for detailed information regarding Microsoft code samples. -' * -' * THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY -' * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -' * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -' * PARTICULAR PURPOSE. -' * -' ************************************************************************************************ - - -Imports System.Collections.Generic -Imports System.Windows.Forms - -Namespace CustomControls - Friend NotInheritable Class Program - ''' - ''' The main entry point for the application. - ''' - Private Sub New() - End Sub - - Shared Sub Main() - Application.EnableVisualStyles() - Application.Run(New SampleApplicationForm()) - End Sub - End Class -End Namespace \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.designer.vb b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.designer.vb deleted file mode 100644 index 846dcffcd5a..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.designer.vb +++ /dev/null @@ -1,153 +0,0 @@ -Namespace CustomControls - Partial Public Class SampleApplicationForm - ''' - ''' Required designer variable. - ''' - Private components As System.ComponentModel.IContainer = Nothing - - ''' - ''' Clean up any resources being used. - ''' - ''' true if managed resources should be disposed; otherwise, false. - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - If disposing AndAlso (components IsNot Nothing) Then - components.Dispose() - End If - MyBase.Dispose(disposing) - End Sub - - #Region "Windows Form Designer generated code" - - ''' - ''' Required method for Designer support - do not modify - ''' the contents of this method with the code editor. - ''' - Private Sub InitializeComponent() - Me.btnExit = New System.Windows.Forms.Button() - Me.btnRemove = New System.Windows.Forms.Button() - Me.btnAdd = New System.Windows.Forms.Button() - Me.label1 = New System.Windows.Forms.Label() - Me.txtItem = New System.Windows.Forms.TextBox() - Me.radioOn = New System.Windows.Forms.RadioButton() - Me.radioOff = New System.Windows.Forms.RadioButton() - Me.groupBox1 = New System.Windows.Forms.GroupBox() - Me.groupBox1.SuspendLayout() - Me.SuspendLayout() - ' - ' btnExit - ' - Me.btnExit.DialogResult = System.Windows.Forms.DialogResult.OK - Me.btnExit.Location = New System.Drawing.Point(179, 208) - Me.btnExit.Name = "btnExit" - Me.btnExit.Size = New System.Drawing.Size(68, 23) - Me.btnExit.TabIndex = 2 - Me.btnExit.Text = "E&xit" -' Me.btnExit.Click += New System.EventHandler(Me.btnExit_Click) - ' - ' btnRemove - ' - Me.btnRemove.DialogResult = System.Windows.Forms.DialogResult.OK - Me.btnRemove.Location = New System.Drawing.Point(179, 179) - Me.btnRemove.Name = "btnRemove" - Me.btnRemove.Size = New System.Drawing.Size(68, 23) - Me.btnRemove.TabIndex = 1 - Me.btnRemove.Text = "&Remove" -' Me.btnRemove.Click += New System.EventHandler(Me.btnRemove_Click) - ' - ' btnAdd - ' - Me.btnAdd.Location = New System.Drawing.Point(32, 109) - Me.btnAdd.Name = "btnAdd" - Me.btnAdd.Size = New System.Drawing.Size(68, 23) - Me.btnAdd.TabIndex = 4 - Me.btnAdd.Text = "&Add" -' Me.btnAdd.Click += New System.EventHandler(Me.btnAdd_Click) - ' - ' label1 - ' - Me.label1.AutoSize = True - Me.label1.Location = New System.Drawing.Point(13, 16) - Me.label1.Name = "label1" - Me.label1.Size = New System.Drawing.Size(106, 13) - Me.label1.TabIndex = 0 - Me.label1.Text = "&Enter Contact Name:" - ' - ' txtItem - ' - Me.txtItem.Location = New System.Drawing.Point(16, 38) - Me.txtItem.MaxLength = 15 - Me.txtItem.Name = "txtItem" - Me.txtItem.Size = New System.Drawing.Size(100, 20) - Me.txtItem.TabIndex = 1 - Me.txtItem.WordWrap = False - ' - ' radioOn - ' - Me.radioOn.AutoSize = True - Me.radioOn.Checked = True - Me.radioOn.Location = New System.Drawing.Point(32, 64) - Me.radioOn.Name = "radioOn" - Me.radioOn.Size = New System.Drawing.Size(55, 17) - Me.radioOn.TabIndex = 2 - Me.radioOn.TabStop = True - Me.radioOn.Text = "O&nline" - Me.radioOn.UseVisualStyleBackColor = True - ' - ' radioOff - ' - Me.radioOff.AutoSize = True - Me.radioOff.Location = New System.Drawing.Point(32, 86) - Me.radioOff.Name = "radioOff" - Me.radioOff.Size = New System.Drawing.Size(55, 17) - Me.radioOff.TabIndex = 3 - Me.radioOff.TabStop = True - Me.radioOff.Text = "O&ffline" - Me.radioOff.UseVisualStyleBackColor = True - ' - ' groupBox1 - ' - Me.groupBox1.Controls.Add(Me.radioOff) - Me.groupBox1.Controls.Add(Me.radioOn) - Me.groupBox1.Controls.Add(Me.txtItem) - Me.groupBox1.Controls.Add(Me.label1) - Me.groupBox1.Controls.Add(Me.btnAdd) - Me.groupBox1.Location = New System.Drawing.Point(147, 12) - Me.groupBox1.Name = "groupBox1" - Me.groupBox1.Size = New System.Drawing.Size(132, 146) - Me.groupBox1.TabIndex = 0 - Me.groupBox1.TabStop = False - ' - ' SampleApplicationForm - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6F, 13F) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(291, 254) - Me.Controls.Add(Me.groupBox1) - Me.Controls.Add(Me.btnRemove) - Me.Controls.Add(Me.btnExit) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog - Me.Margin = New System.Windows.Forms.Padding(2) - Me.MaximizeBox = False - Me.Name = "SampleApplicationForm" - Me.Text = "UIAutomation Fragment Provider" - Me.groupBox1.ResumeLayout(False) - Me.groupBox1.PerformLayout() - Me.ResumeLayout(False) - - End Sub - - #End Region - - Private WithEvents btnExit As System.Windows.Forms.Button - Private WithEvents btnRemove As System.Windows.Forms.Button - Private WithEvents btnAdd As System.Windows.Forms.Button - Private label1 As System.Windows.Forms.Label - Private txtItem As System.Windows.Forms.TextBox - Private radioOff As System.Windows.Forms.RadioButton - Private radioOn As System.Windows.Forms.RadioButton - Private groupBox1 As System.Windows.Forms.GroupBox - - - End Class -End Namespace - diff --git a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.vb b/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.vb deleted file mode 100644 index 6cd00da0fc7..00000000000 --- a/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/providerform.vb +++ /dev/null @@ -1,125 +0,0 @@ -'************************************************************************************************ -' * -' * File: ProviderForm.vb -' * -' * Description: -' * -' * The sample is shows how to implement UI Automation providers for the elements -' * of a fragment that is hosted in an HWND. The control itself has been kept -' * simple. It does not support scrolling and therefore an arbitrary limit has -' * been set on the number of items it can contain. -' * -' * The fragment consists of the root element (a list box) and its children (the -' * list items.) The UI Automation provider for the list box supports only one -' * control pattern, the Selection pattern. The provider for the list items -' * implements the SelectionItem pattern. -' * -' * To see the UI Automation provider at work, run the application and then open -' * UI Spy. You can see the application and its controls in the Control View. -' * Clicking on the control or on the list items in the UI Spy tree causes the -' * provider's methods to be called, and the values returned are displayed in the -' * Properties pane. (Note that some values are retrieved from the default HWND -' * provider, not this custom implementation.) You can also select an item in the -' * list by using the SelectionItem control pattern in UI Spy. -' * -' * -' * This file is part of the Microsoft Windows SDK Code Samples. -' * -' * Copyright (C) Microsoft Corporation. All rights reserved. -' * -' * This source code is intended only as a supplement to Microsoft -' * Development Tools and/or on-line documentation. See these other -' * materials for detailed information regarding Microsoft code samples. -' * -' * THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY -' * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -' * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A -' * PARTICULAR PURPOSE. -' * -' ************************************************************************************************ - - -Imports System.Collections.Generic -Imports System.ComponentModel -Imports System.Data -Imports System.Drawing -Imports System.Text -Imports System.Windows.Forms - - -Namespace CustomControls - Partial Public Class SampleApplicationForm - Inherits Form - Private customList As CustomListControl - - ''' - ''' Constructor for the application window. - ''' - Public Sub New() - InitializeComponent() - - ' Create a label. - Dim listLabel As New Label() - listLabel.Location = New Point(20, 10) - listLabel.AutoSize = True - listLabel.TabIndex = 0 - listLabel.Text = "&Contacts:" - Me.Controls.Add(listLabel) - - ' Create an instance of the custom control. - customList = New CustomListControl() - customList.Name = "customList" - - ' Add it to the form's controls. Among other things, this makes it possible for - ' UIAutomation to discover it, as it will become a child of the application window. - Me.Controls.Add(customList) - - ' Set some properties. - customList.Location = New Point(20, 30) - ' Text becomes the Name property for the custom control. - customList.Text = listLabel.Text - customList.TabIndex = 0 - - ' Add list items. - customList.Add("Prakash",CustomControls.Availability.Online) - customList.Add("James", CustomControls.Availability.Online) - customList.Add("Lisa", CustomControls.Availability.Offline) - customList.Add("Kim", CustomControls.Availability.Online) - customList.Add("Bailey", CustomControls.Availability.Offline) - End Sub - - ''' - ''' Handles Add button clicks. - ''' - ''' Object that raised the event. - ''' Event arguments. - Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click - If Me.txtItem.Text.Length <> 0 Then - If Me.radioOn.Checked Then - Me.customList.Add(Me.txtItem.Text, Availability.Online) - Else - Me.customList.Add(Me.txtItem.Text, Availability.Offline) - End If - Me.txtItem.Clear() - End If - End Sub - - ''' - ''' Handles Remove button clicks. - ''' - ''' Object that raised the event. - ''' Event arguments. - Private Sub btnRemove_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnRemove.Click - Dim success As Boolean = customList.Remove(Me.customList.SelectedIndex) - End Sub - - ''' - ''' Handles Exit button clicks. - ''' - ''' Object that raised the event. - ''' Event arguments. - Private Sub btnExit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnExit.Click - Application.Exit() - End Sub - End Class -End Namespace diff --git a/xml/System.ComponentModel/IEditableCollectionView.xml b/xml/System.ComponentModel/IEditableCollectionView.xml index a727106dd91..7b7c72ba35d 100644 --- a/xml/System.ComponentModel/IEditableCollectionView.xml +++ b/xml/System.ComponentModel/IEditableCollectionView.xml @@ -35,7 +35,6 @@ The following example shows how to add an item to a collection by using methods that are defined by . This application displays a list of items for sale and gives the user the option of adding, editing, or removing an item. When the user adds or edits an item, a form prompts the user to enter a new item. If the user submits the form, the item is committed to the collection. If the user cancels the form, the item is discarded. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetadditem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetadditem"::: ]]> @@ -79,7 +78,6 @@ The following example creates a that prompts the user to add a new item. Then it calls to create a new object and sets the of the to that object. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetadditem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetadditem"::: ]]> @@ -127,7 +125,6 @@ The following example checks whether an item can be added to the collection. If is `false`, the example tells the user that an item cannot be added. Otherwise, it shows a form that prompts the user to add a new item. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections) . :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetadditem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetadditem"::: ]]> @@ -171,7 +168,6 @@ The following example gets to check whether the original values of the edited item can be restored before it calls . If the values cannot be restored, you must supply additional logic to do so. If they can be, the values are restored when the example calls . For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetcanceledit"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetcanceledit"::: ]]> @@ -214,7 +210,6 @@ The following example gets to check whether the original values of the edited item can be restored before it calls . If the values cannot be restored, you must supply additional logic to do so. If they can be, the values are restored when the example calls . For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetcanceledit"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetcanceledit"::: ]]> @@ -252,7 +247,6 @@ The following example displays a form that prompts the user to add a new item. If the user submits the form, the example calls to add the item to the collection. If the user cancels the form, the example calls to discard the item. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetadditem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetadditem"::: ]]> @@ -296,7 +290,6 @@ The following example calls to check whether an item can be removed from the collection. If an item can be removed, the example prompts the user to confirm the action and calls if the user clicks **Yes**. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetremoveitem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetremoveitem"::: ]]> @@ -334,7 +327,6 @@ The following example creates a form that prompts the user to edit an existing item. If the user submits the form, the example calls to save the changes to the collection. If the user cancels the form, the example calls to discard the changes. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetedititem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetedititem"::: ]]> @@ -377,7 +369,6 @@ The following example displays a form that prompts the user to add a new item. If the user submits the form, the example calls to add the item to the collection. If the user cancels the form, the example calls to discard the item. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetadditem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetadditem"::: ]]> @@ -474,7 +465,6 @@ The following example creates a form that prompts the user to edit an existing item. If the user submits the form, the changes are committed to the collection. If the user cancels the form, the changes are discarded. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections) . :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetedititem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetedititem"::: ]]> @@ -620,7 +610,6 @@ The following example calls to check whether an item can be removed from the collection. If an item can be removed, the example prompts the user to confirm the action and calls if the user clicks **Yes**. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections). :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/IEditableCollectionView/Overview/Window1.xaml.cs" id="Snippetremoveitem"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/IEditableCollectionView/Overview/window1.xaml.vb" id="Snippetremoveitem"::: ]]> diff --git a/xml/System.ServiceModel.Channels/NamedPipeTransportBindingElement.xml b/xml/System.ServiceModel.Channels/NamedPipeTransportBindingElement.xml index ce6dbffdbb9..4e747a45a31 100644 --- a/xml/System.ServiceModel.Channels/NamedPipeTransportBindingElement.xml +++ b/xml/System.ServiceModel.Channels/NamedPipeTransportBindingElement.xml @@ -54,7 +54,6 @@ This example shows how to use this class: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet0"::: ]]> @@ -91,7 +90,6 @@ This example shows how to use the parameterless constructor: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet1"::: ]]> @@ -132,7 +130,6 @@ This example shows how to initialize a new instance of the class: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet2"::: ]]> @@ -181,7 +178,6 @@ This example shows how to create a channel factory of the specified type that can be used to create channels: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet6"::: ]]> @@ -221,7 +217,6 @@ This example shows how to create a copy of the current binding element: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet5"::: ]]> @@ -257,7 +252,6 @@ This example shows how to get a collection of connection pool settings: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet3"::: ]]> @@ -310,7 +304,6 @@ This example shows how to get a specified object from the : :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet8"::: ]]> @@ -351,7 +344,6 @@ This example shows how to get the URI scheme for the transport: :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/cs/program.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uenamedpipetransportbindingelement/vb/module1.vb" id="Snippet4"::: ]]> diff --git a/xml/System.ServiceModel.Description/IContractBehavior.xml b/xml/System.ServiceModel.Description/IContractBehavior.xml index 3db8e678b8c..137b9afed5f 100644 --- a/xml/System.ServiceModel.Description/IContractBehavior.xml +++ b/xml/System.ServiceModel.Description/IContractBehavior.xml @@ -102,7 +102,6 @@ To insert the instance provider customization, the example shows how to implement a custom attribute (`SingletonBehaviorAttribute`) that implements to insert the custom service instance provider. It also implements , which binds its use to the `ISampleService` contract. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/icontractbehavior/cs/objectproviderbehavior.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb" id="Snippet2"::: ]]> @@ -212,7 +211,6 @@ To insert the instance provider customization, the example shows how to implement a custom attribute (`SingletonBehaviorAttribute`) that implements to insert the custom service instance provider. It also implements , which binds its use to the `ISampleService` contract. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/icontractbehavior/cs/objectproviderbehavior.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb" id="Snippet2"::: ]]> @@ -275,7 +273,6 @@ To insert the instance provider customization, the example shows how to implement a custom attribute (`SingletonBehaviorAttribute`) that implements to insert the custom service instance provider. It also implements , which binds its use to the `ISampleService` contract. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/icontractbehavior/cs/objectproviderbehavior.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/icontractbehavior/vb/objectproviderbehavior.vb" id="Snippet2"::: ]]> diff --git a/xml/System.ServiceModel.Security/X509ServiceCertificateAuthentication.xml b/xml/System.ServiceModel.Security/X509ServiceCertificateAuthentication.xml index e46869bd2ed..df14e46138a 100644 --- a/xml/System.ServiceModel.Security/X509ServiceCertificateAuthentication.xml +++ b/xml/System.ServiceModel.Security/X509ServiceCertificateAuthentication.xml @@ -50,7 +50,6 @@ The following example shows how to use this class. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uex509servicecertificateauthentication/cs/client.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/client.vb" id="Snippet4"::: ]]> @@ -122,7 +121,6 @@ The following code shows how to set this property. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uex509servicecertificateauthentication/cs/client.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/client.vb" id="Snippet0"::: The property can also be set in a configuration file. @@ -172,7 +170,6 @@ The following code shows how to set this property. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uex509servicecertificateauthentication/cs/client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/client.vb" id="Snippet1"::: The property can also be set in a configuration file. @@ -223,7 +220,6 @@ The following code shows how to set this property. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uex509servicecertificateauthentication/cs/client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/client.vb" id="Snippet2"::: The property can also be set in a configuration file. @@ -274,7 +270,6 @@ The following code shows how to set this property. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/s_uex509servicecertificateauthentication/cs/client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/s_uex509servicecertificateauthentication/vb/client.vb" id="Snippet3"::: The property can also be set in a configuration file. diff --git a/xml/System.ServiceModel/ChannelFactory.xml b/xml/System.ServiceModel/ChannelFactory.xml index 6c8e8d31998..67b3cc387c1 100644 --- a/xml/System.ServiceModel/ChannelFactory.xml +++ b/xml/System.ServiceModel/ChannelFactory.xml @@ -87,7 +87,6 @@ The following code example shows how to insert programmatically a client behavior prior to the creation of the channel object by the factory. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vb" id="Snippet10"::: ]]> diff --git a/xml/System.ServiceModel/ChannelFactory`1.xml b/xml/System.ServiceModel/ChannelFactory`1.xml index 564de930a31..30ab264e3b7 100644 --- a/xml/System.ServiceModel/ChannelFactory`1.xml +++ b/xml/System.ServiceModel/ChannelFactory`1.xml @@ -79,7 +79,6 @@ The following code example shows how to insert programmatically a client behavior prior to the creation of the channel object by the factory. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/channelfactorybehaviors/vb/client.vb" id="Snippet10"::: ]]> diff --git a/xml/System.ServiceModel/ClientBase`1.xml b/xml/System.ServiceModel/ClientBase`1.xml index cf719e6f601..19b85fba951 100644 --- a/xml/System.ServiceModel/ClientBase`1.xml +++ b/xml/System.ServiceModel/ClientBase`1.xml @@ -144,7 +144,6 @@ The following code example shows how a client uses this constructor in a `SampleServiceClient` class that extends the class. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb" id="Snippet3"::: ]]> diff --git a/xml/System.ServiceModel/OperationContext.xml b/xml/System.ServiceModel/OperationContext.xml index 206376dd6d9..3e7a5e6c56f 100644 --- a/xml/System.ServiceModel/OperationContext.xml +++ b/xml/System.ServiceModel/OperationContext.xml @@ -92,7 +92,6 @@ The following code example uses the property and method to obtain the channel back to the caller from within a method. All methods in this example are one-way methods, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb" id="Snippet1"::: The following client implements the `SampleDuplexHelloCallback` to receive the callback message. The imported callback contract is not the same name as the one in the service, due to the use of the property in the preceding example. Note that the client makes no assumptions about whether or when it might receive a callback; the server callback is entirely independent of the client's outbound call. @@ -100,7 +99,6 @@ > For an example that uses the class in a client scenario, see . :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb" id="Snippet3"::: ]]> @@ -253,7 +251,6 @@ The following code example uses the property and method to create a channel back to the caller from within a method. All methods in this example are one-way methods, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb" id="Snippet1"::: ]]> @@ -370,7 +367,6 @@ Call the metho The following code example uses the property and method to create a channel back to the caller from within a operation. All operations in this example are one-way operations, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb" id="Snippet1"::: The following client implements the `SampleDuplexHelloCallback` to receive the callback message. The imported callback contract is not the same name as the one in the service, due to the use of the property in the preceding example. Note that the client makes no assumptions about whether or when it might receive a callback; the server callback is entirely independent of the client's outbound call. @@ -378,7 +374,6 @@ Call the metho > For an example that uses the class in a client scenario, see . :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/client.vb" id="Snippet3"::: ]]> diff --git a/xml/System.ServiceModel/ServiceContractAttribute.xml b/xml/System.ServiceModel/ServiceContractAttribute.xml index f8ea69cc4c3..3f7528b0446 100644 --- a/xml/System.ServiceModel/ServiceContractAttribute.xml +++ b/xml/System.ServiceModel/ServiceContractAttribute.xml @@ -97,7 +97,6 @@ The code example then implements that contract on the `SampleService` class. [!code-csharp[ServiceContractAttribute#1](~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/services.cs#1)] - [!code-vb[ServiceContractAttribute#1](~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/services.vb#1)] The following code example shows a simple configuration file for the preceding service that creates one endpoint. @@ -106,7 +105,6 @@ The following code example shows a simple client that invokes the preceding `SampleService`. [!code-csharp[ServiceContractAttribute#3](~/snippets/csharp/VS_Snippets_CFX/servicecontractattribute/cs/client.cs#3)] - [!code-vb[ServiceContractAttribute#3](~/snippets/visualbasic/VS_Snippets_CFX/servicecontractattribute/vb/client.vb#3)] ]]> @@ -195,7 +193,6 @@ The following code example shows a service that specifies a callback contract, which indicates that a service of type `IDuplexHello` must have a correspondent that implements a service of type `IHelloCallbackContract`. In addition, `IHelloCallbackContract` implements a one-way callback method, enabling the service to call the client without waiting for a reply to support a distributed, event-driven client. [!code-csharp[SCA.CallbackContract#1](~/snippets/csharp/VS_Snippets_CFX/sca.callbackcontract/cs/services.cs#1)] - [!code-vb[SCA.CallbackContract#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.callbackcontract/vb/services.vb#1)] ]]> @@ -318,12 +315,10 @@ The following code example shows how to use the and properties of the to set the corresponding values in WSDL. [!code-csharp[SCA.Names#1](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/services.cs#1)] - [!code-vb[SCA.Names#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb#1)] The following code example shows an Windows Communication Foundation (WCF) client for the preceding service that imported WSDL using the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe). This client uses a `HelloWorldProxy` client rather than a `SampleServiceProxy` client (as is the case with the sample in the Example section of ). [!code-csharp[SCA.Names#3](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/client.cs#3)] - [!code-vb[SCA.Names#3](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb#3)] ]]> @@ -366,12 +361,10 @@ The following code example shows how to use the and properties of the to set the corresponding values in WSDL. [!code-csharp[SCA.Names#1](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/services.cs#1)] - [!code-vb[SCA.Names#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/services.vb#1)] The following code example shows an Windows Communication Foundation (WCF) client for the preceding service that imported WSDL using the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe). This client uses a `HelloWorldClient` client rather than a `SampleServiceClient` client (as is the case with the sample in the Example section of ). [!code-csharp[SCA.Names#3](~/snippets/csharp/VS_Snippets_CFX/sca.names/cs/client.cs#3)] - [!code-vb[SCA.Names#3](~/snippets/visualbasic/VS_Snippets_CFX/sca.names/vb/client.vb#3)] ]]> @@ -493,7 +486,6 @@ The following service contract requires that configured bindings use sessions when interacting with `SampleDuplexHello` service implementations. [!code-csharp[SCA.Session#1](~/snippets/csharp/VS_Snippets_CFX/sca.session/cs/services.cs#1)] - [!code-vb[SCA.Session#1](~/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb#1)] ]]> diff --git a/xml/System.ServiceModel/SessionMode.xml b/xml/System.ServiceModel/SessionMode.xml index d5efcc77ad9..5d5f6927991 100644 --- a/xml/System.ServiceModel/SessionMode.xml +++ b/xml/System.ServiceModel/SessionMode.xml @@ -66,7 +66,6 @@ The following code example shows how to use the property of the to specify that the `IMyService` service contract requires bindings that support session state. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/sca.session/cs/services.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/sca.session/vb/services.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Windows.Automation.Provider/ISelectionItemProvider.xml b/xml/System.Windows.Automation.Provider/ISelectionItemProvider.xml index 99817c07d64..7ffec094424 100644 --- a/xml/System.Windows.Automation.Provider/ISelectionItemProvider.xml +++ b/xml/System.Windows.Automation.Provider/ISelectionItemProvider.xml @@ -77,9 +77,7 @@ The following example code adds the item to a collection of selected items. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetaddtoselection"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetaddtoselection"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetisselected"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetisselected"::: ]]> @@ -119,7 +117,6 @@ The following example code returns `true` if this item is in the collection of selected items. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetisselected"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetisselected"::: ]]> @@ -166,9 +163,7 @@ The following example code removes the item from a collection of selected items. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetremovefromselection"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetremovefromselection"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetisselected"::: -:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetisselected"::: ]]> @@ -207,7 +202,6 @@ The following example code clears all items from the collection of selected items and then adds this one. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetselect"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetselect"::: ]]> @@ -246,7 +240,6 @@ The following example code returns the UI Automation provider for the list box that contains this list item. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListItemFragment.cs" id="Snippetselectioncontainer"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listitemfragment.vb" id="Snippetselectioncontainer"::: ]]> diff --git a/xml/System.Windows.Automation.Provider/ISelectionProvider.xml b/xml/System.Windows.Automation.Provider/ISelectionProvider.xml index ea74815def0..531d16e11ed 100644 --- a/xml/System.Windows.Automation.Provider/ISelectionProvider.xml +++ b/xml/System.Windows.Automation.Provider/ISelectionProvider.xml @@ -75,7 +75,6 @@ The following example shows an implementation of this method for a list that does not allow selection of more than one item at a time. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListFragment.cs" id="Snippetcanselectmultiple"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb" id="Snippetcanselectmultiple"::: ]]> @@ -120,7 +119,6 @@ The following example shows one possible implementation of this method for a list box that supports only single selection. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListFragment.cs" id="Snippetgetselection"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb" id="Snippetgetselection"::: ]]> @@ -165,7 +163,6 @@ The following example shows an implementation of this method for a list that requires an item to be selected at all times. :::code language="csharp" source="~/snippets/csharp/System.Windows.Automation.Provider/ISelectionItemProvider/AddToSelection/ListFragment.cs" id="Snippetisselectionrequired"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/UIAISelectionProvider_ISelectionItemProvider_snip/visualbasic/listfragment.vb" id="Snippetisselectionrequired"::: ]]> diff --git a/xml/System.Windows.Controls/GroupStyle.xml b/xml/System.Windows.Controls/GroupStyle.xml index be6fb3f2f88..b616d009660 100644 --- a/xml/System.Windows.Controls/GroupStyle.xml +++ b/xml/System.Windows.Controls/GroupStyle.xml @@ -364,7 +364,6 @@ The following example shows the `GroupByPrice` class, the `PurchaseItem` class, and the collection that the is bound to. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ContentControl/ContentStringFormat/Window1.xaml.cs" id="Snippetgroupstyledata"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb" id="Snippetgroupstyledata"::: ]]> diff --git a/xml/System.Windows.Controls/HeaderedContentControl.xml b/xml/System.Windows.Controls/HeaderedContentControl.xml index 624b4a67af5..d1356d06ef9 100644 --- a/xml/System.Windows.Controls/HeaderedContentControl.xml +++ b/xml/System.Windows.Controls/HeaderedContentControl.xml @@ -329,7 +329,6 @@ TabControl with different types in the Header property The following example implements the method to return either the `Name` of the student or a string that lists the student's courses. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ContentControl/ContentStringFormat/Window1.xaml.cs" id="Snippettabcontroltostring"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb" id="Snippettabcontroltostring"::: ]]> diff --git a/xml/System.Windows.Controls/InkCanvas.xml b/xml/System.Windows.Controls/InkCanvas.xml index 9a40e07d66b..2a5228483c9 100644 --- a/xml/System.Windows.Controls/InkCanvas.xml +++ b/xml/System.Windows.Controls/InkCanvas.xml @@ -47,7 +47,6 @@ The following example demonstrates how to simulate the use of both a pen and a highlighter on the same . The example assumes that the root element in the markup language (XAML) file is a called `root`. It also assumes that there is a called `switchHighlighter` and that both the and events are connected to the example's event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet3"::: The following example declares two objects in XAML and establishes data binding between them and other data sources. The first , called `ic`, is bound to two data sources. The and properties on `ic` are bound to objects, which are, in turn, bound to arrays defined in the XAML. The , , and properties of the second are bound to the first in the following code. @@ -701,7 +700,6 @@ The following example demonstrates how to use two objects to simulate the experience of using a pen and a highlighter on the same . The example assumes that the root element in the markup language (XAML) file is a called `root`. It also assumes that there is a called `switchHighlighter` and that the event is connected to the event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet3"::: The following example demonstrates how to bind the property to a data source. @@ -771,7 +769,6 @@ The following example checks the value of the property of the new object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet17"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet17"::: ]]> @@ -3912,7 +3909,6 @@ The following example prevents any strokes rendered as highlighters from being erased. The example assumes that the is connected to the event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet16"::: ]]> diff --git a/xml/System.Windows.Controls/Page.xml b/xml/System.Windows.Controls/Page.xml index 8f4b738b0b9..86fba2d1f3e 100644 --- a/xml/System.Windows.Controls/Page.xml +++ b/xml/System.Windows.Controls/Page.xml @@ -89,14 +89,12 @@ The following example shows how a standard page is defined using only code: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/Page/Overview/CodePage.cs" id="Snippetcodepagecodebehind"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/Page/Overview/codepage.vb" id="Snippetcodepagecodebehind"::: The following example shows how a standard page is defined using a combination of markup and code-behind. :::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/Page/Overview/MarkupAndCodeBehindPage.xaml" id="Snippetmarkupandcodebehindpagemarkup"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/Page/Overview/MarkupAndCodeBehindPage.xaml.cs" id="Snippetmarkupandcodebehindpagecodebehind"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/Page/Overview/markupandcodebehindpage.xaml.vb" id="Snippetmarkupandcodebehindpagecodebehind"::: ]]> diff --git a/xml/System.Windows.Controls/TabControl.xml b/xml/System.Windows.Controls/TabControl.xml index bacba1a64cd..74465bde76c 100644 --- a/xml/System.Windows.Controls/TabControl.xml +++ b/xml/System.Windows.Controls/TabControl.xml @@ -126,7 +126,6 @@ The following example creates a and bi The following example implements the method to return either the `Name` of the student or a string that lists the student's courses. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/ContentControl/ContentStringFormat/Window1.xaml.cs" id="Snippettabcontroltostring"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/GroupStyle/HeaderStringFormat/window1.xaml.vb" id="Snippettabcontroltostring"::: ]]> diff --git a/xml/System.Windows.Documents/Hyperlink.xml b/xml/System.Windows.Documents/Hyperlink.xml index 445968490b7..385316482cc 100644 --- a/xml/System.Windows.Documents/Hyperlink.xml +++ b/xml/System.Windows.Documents/Hyperlink.xml @@ -54,7 +54,6 @@ The following example shows how to create a programmatically. :::code language="csharp" source="~/snippets/csharp/System.Windows.Documents/Hyperlink/Overview/Window1.xaml.cs" id="Snippet_hyperlink_navuri"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb" id="Snippet_hyperlink_navuri"::: ]]> @@ -121,7 +120,6 @@ The following example demonstrates usage of this constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Documents/Hyperlink/Overview/Window1.xaml.cs" id="Snippet_hyperlink_const1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb" id="Snippet_hyperlink_const1"::: ]]> @@ -161,7 +159,6 @@ The following example demonstrates usage of this constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Documents/Hyperlink/Overview/Window1.xaml.cs" id="Snippet_hyperlink_const2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb" id="Snippet_hyperlink_const2"::: ]]> @@ -206,7 +203,6 @@ The following example demonstrates usage of this constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Documents/Hyperlink/Overview/Window1.xaml.cs" id="Snippet_hyperlink_const3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb" id="Snippet_hyperlink_const3"::: ]]> @@ -701,7 +697,6 @@ The following example shows how to set the property programmatically. :::code language="csharp" source="~/snippets/csharp/System.Windows.Documents/Hyperlink/Overview/Window1.xaml.cs" id="Snippet_hyperlink_navuri"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Documents/Hyperlink/Overview/window1.xaml.vb" id="Snippet_hyperlink_navuri"::: The following example shows how to use a **mailto:** uniform resource identifier (URI) to open a new mail window that contains an email address, an email address and a subject, and an email address, subject, and body. diff --git a/xml/System.Windows.Ink/DrawingAttributeIds.xml b/xml/System.Windows.Ink/DrawingAttributeIds.xml index 8c97d561442..dead58dc34a 100644 --- a/xml/System.Windows.Ink/DrawingAttributeIds.xml +++ b/xml/System.Windows.Ink/DrawingAttributeIds.xml @@ -30,7 +30,6 @@ The following example demonstrates how to use the class to detect the property that changed within a event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet6"::: ]]> diff --git a/xml/System.Windows.Ink/DrawingAttributes.xml b/xml/System.Windows.Ink/DrawingAttributes.xml index 9c336010f7b..41a94c753cd 100644 --- a/xml/System.Windows.Ink/DrawingAttributes.xml +++ b/xml/System.Windows.Ink/DrawingAttributes.xml @@ -47,7 +47,6 @@ The following example demonstrates how to use two objects to simulate using a pen and a highlighter on the same . The example assumes the root element in the XAML file is a called `root`. It also assumes that there is a called `switchHighlighter` and that the event is connected to the event handler defined in this example. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet3"::: ]]> @@ -137,7 +136,6 @@ The following example demonstrates how to add and retrieve a custom property from the object. The example adds a property that indicates whether the object is a pen or a highlighter. The code in the `ChangeColors_Click` event handler renders a new color for strokes on the that use the object, `inkDA`. This example assumes that there is an named `inkCanvas1`, and that there are two objects named `inkDA`, and `highlighterDA`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -182,7 +180,6 @@ The following example handles the event. This example assumes that there is a object called `inkDA` and that the event is connected to the event handler defined in this example. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet6"::: ]]> @@ -226,7 +223,6 @@ The following example demonstrates how to copy a object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet8"::: ]]> @@ -273,7 +269,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -316,7 +311,6 @@ The following example demonstrates how to add and retrieve a custom property from the object. The example adds a property that indicates whether the object is a pen or a highlighter. The `ChangeColors_Click` event handler changes all the strokes that were put on the with a called `inkDA` to a new color. This example assumes that there is an named `inkCanvas1`, and that there are two objects named `inkDA`, and `highlighterDA`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -383,9 +377,7 @@ The following example compares two objects for equality. Because the , , , and properties on `attributes1` and `attributes2` are set to the same values, the "The DrawingAttributes are equal" message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet12"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet12"::: ]]> @@ -433,7 +425,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -510,7 +501,6 @@ The following example demonstrates how to add and retrieve a custom property from the object. The example adds a property that indicates whether the object is a pen or a highlighter. The code in the `ChangeColors_Click` event handler renders a new color for strokes on the that use the object, `inkDA`. This example assumes that there is an named `inkCanvas1`, and that there are two objects named `inkDA`, and `highlighterDA`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -557,7 +547,6 @@ The following example demonstrates how to get the property data identifiers from the object. This example assumes that a called `inkDA` has been declared. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet7"::: ]]> @@ -611,7 +600,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -659,7 +647,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -707,7 +694,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -749,7 +735,6 @@ The following example ensures the property of the is set to a legal value. This example assumes that there is an called `inkCanvas1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet14"::: ]]> @@ -791,7 +776,6 @@ The following example ensures the property of the is set to a legal value. This example assumes that there is an called `inkCanvas1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet15"::: ]]> @@ -833,7 +817,6 @@ The following example ensures the property of the is set to a legal value. This example assumes that there is an called `inkCanvas1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet14"::: ]]> @@ -875,7 +858,6 @@ The following example ensures the property of the is set to a legal value. This example assumes that there is an called `inkCanvas1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet15"::: ]]> @@ -1065,9 +1047,7 @@ The following example compares two objects for equality. Because the , , , and properties on `attributes1` and `attributes2` are set to the same values, the "The DrawingAttributes are equal" message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet11"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet11"::: ]]> @@ -1136,9 +1116,7 @@ The following example compares two objects for inequality. Because the , , , and properties on `attributes1` and `attributes2` are set to the same values, the "The DrawingAttributes are equal" message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet13"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet13"::: ]]> @@ -1175,7 +1153,6 @@ The following example is part of a custom stroke that can draw a three-dimensional effect. The stroke defines and stores a custom property called `Shadowed`, which belongs to . When the `Shadowed` property changes, the event handler calls the method, which causes the stroke to be redrawn. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/CustomRenderedStroke.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/DrawingAttributes/PropertyDataChanged/CustomRenderedStroke.vb" id="Snippet1"::: ]]> @@ -1216,7 +1193,6 @@ The following example demonstrates how to remove a custom property from a object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet9"::: ]]> @@ -1265,7 +1241,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -1312,7 +1287,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> @@ -1400,7 +1374,6 @@ The following example demonstrates how to set the property. The example assumes that your application has an called `inkCanvas1`, and two objects called `inkDA` and `highlighterDA`. For the complete example, see the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet1"::: ]]> diff --git a/xml/System.Windows.Ink/Stroke.xml b/xml/System.Windows.Ink/Stroke.xml index cae795b582b..0cd7d76f0fa 100644 --- a/xml/System.Windows.Ink/Stroke.xml +++ b/xml/System.Windows.Ink/Stroke.xml @@ -75,7 +75,6 @@ The following example demonstrates how to create a from a and object. This example assumes that there is an called `myInkPresenter`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet2"::: ]]> @@ -119,7 +118,6 @@ The following example demonstrates how to create a from a and object. This example assumes that there is an called `myInkPresenter`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet2"::: ]]> @@ -175,7 +173,6 @@ The following example demonstrates how to add a custom property to a object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet3"::: ]]> @@ -223,7 +220,6 @@ The following example demonstrates how to get a copy of the current object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet5"::: ]]> @@ -265,7 +261,6 @@ The following example demonstrates how to determine whether a object has a custom property. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet3"::: ]]> @@ -405,7 +400,6 @@ The following example demonstrates how to draw a circle at each of a . If the property is set to `true`, the is used to get the stylus points. Otherwise, the property is used. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyStroke.cs" id="Snippet23"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb" id="Snippet23"::: ]]> @@ -450,7 +444,6 @@ The following example sets the to make a stroke green. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet7"::: ]]> @@ -494,7 +487,6 @@ The following example demonstrates how to add a handler for this event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet8"::: ]]> @@ -534,7 +526,6 @@ The following example demonstrates how to add a handler for this event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet9"::: ]]> @@ -580,7 +571,6 @@ The following example demonstrates how to draw a circle at each of a . If the property is set to `true`, the is used to get the stylus points. Otherwise, the property is used. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyStroke.cs" id="Snippet23"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb" id="Snippet23"::: ]]> @@ -619,7 +609,6 @@ The following example demonstrates how to get the boundary rectangle for a object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet11"::: ]]> @@ -958,7 +947,6 @@ The following example demonstrates how to draw a circle at each of a . If the property is set to `true`, the is used to get the stylus points. Otherwise, the property is used. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyStroke.cs" id="Snippet23"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb" id="Snippet23"::: ]]> @@ -1000,7 +988,6 @@ The following example demonstrates how to retrieve a custom property on a object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet3"::: ]]> @@ -1470,9 +1457,7 @@ The following example draws a either as a solid stroke or as a series of objects, depending on the `Mode` property. The example calls the method, which in turn calls the where the stroke is drawn. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.cs" id="Snippet24"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.vb" id="Snippet24"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.cs" id="Snippet25"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/CustomRenderedStroke.vb" id="Snippet25"::: ]]> @@ -1640,7 +1625,6 @@ The following example demonstrates how to add a handler for this event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet20"::: ]]> @@ -1684,7 +1668,6 @@ The following example demonstrates how to delete a custom property from a object. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet30"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet30"::: ]]> @@ -1733,7 +1716,6 @@ The following example is part of an overridden that draws a circle at each . If the property is set to `true`, the is used to get the stylus points. Otherwise, the property is used. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyStroke.cs" id="Snippet23"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb" id="Snippet23"::: ]]> @@ -1770,7 +1752,6 @@ The following example demonstrates how to handle the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet28"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet28"::: ]]> @@ -1807,7 +1788,6 @@ The following example demonstrates how to handle the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet29"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet29"::: ]]> diff --git a/xml/System.Windows.Ink/StrokeCollection.xml b/xml/System.Windows.Ink/StrokeCollection.xml index f2ea5b4d811..eba1565c83f 100644 --- a/xml/System.Windows.Ink/StrokeCollection.xml +++ b/xml/System.Windows.Ink/StrokeCollection.xml @@ -1828,7 +1828,6 @@ The following example adds the current time as a custom property to each new stroke in the event handler. The example assumes that the event is connected to the event handler defined in this example. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Windows.Ink/StylusTip.xml b/xml/System.Windows.Ink/StylusTip.xml index b1a49d7dcea..c3b27ed7820 100644 --- a/xml/System.Windows.Ink/StylusTip.xml +++ b/xml/System.Windows.Ink/StylusTip.xml @@ -40,7 +40,6 @@ The example assumes the root element in the "XAML" file is a called `root`. It also assumes that there is a called `btnToggleHighlighter` and that the event has been connected to the event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Controls/InkCanvas/Overview/Window1.xaml.vb" id="Snippet3"::: ]]> diff --git a/xml/System.Windows.Input/StylusDevice.xml b/xml/System.Windows.Input/StylusDevice.xml index 884c8713607..f351ba3dcd5 100644 --- a/xml/System.Windows.Input/StylusDevice.xml +++ b/xml/System.Windows.Input/StylusDevice.xml @@ -387,7 +387,6 @@ The following example demonstrates how to get objects from the current . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet26"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet26"::: ]]> diff --git a/xml/System.Windows.Input/StylusPoint.xml b/xml/System.Windows.Input/StylusPoint.xml index e285d3ec14a..755451eb963 100644 --- a/xml/System.Windows.Input/StylusPoint.xml +++ b/xml/System.Windows.Input/StylusPoint.xml @@ -39,9 +39,7 @@ The following example gets property names and values for each in a . This example assumes that there is a called `packetOutput`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -86,7 +84,6 @@ The following example demonstrates how to create a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -133,7 +130,6 @@ The following example demonstrates how to create a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -181,7 +177,6 @@ The following example demonstrates how to create a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -226,9 +221,7 @@ The following example uses the property to get property values from in a . This example assumes that there is a called `packetOutput`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -276,9 +269,7 @@ The following example checks two objects for equality. Because the , , and properties on `point1` and `point2` are set to the same value, the "The two StylusPoint objects are equal." Message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet7"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet7"::: ]]> @@ -324,9 +315,7 @@ The following example checks two objects for equality. Because the , , and properties on `point1` and `point2` are set to the same value, the "The two StylusPoint objects are equal." Message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet7"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet7"::: ]]> @@ -371,9 +360,7 @@ The following example checks two objects for equality. Because the , , and properties on `point1` and `point2` are set to the same value, the "The two StylusPoint objects are equal." Message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet8"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet8"::: ]]> @@ -450,7 +437,6 @@ The following example checks for the existence of a stylus point property before getting the property's value. This example assumes that there is a called `point`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet11"::: ]]> @@ -500,7 +486,6 @@ The following example checks for the existence of a stylus point property before getting the property's value. This example assumes that there is a called `point`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet11"::: ]]> @@ -537,7 +522,6 @@ The following example ensures that the property of the is set to a legal value. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet14"::: ]]> @@ -574,7 +558,6 @@ The following example ensures that the property of the is set to a legal value. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet14"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet14"::: ]]> @@ -619,9 +602,7 @@ The following example checks two objects for equality. Because the , , and properties on `point1` and `point2` are set to the same value, the "The two StylusPoint objects are equal." Message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet9"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet9"::: ]]> @@ -660,7 +641,6 @@ to a object to draw a circle at the beginning of every stroke. This example assumes that there is an object called `inkcanvas1` and that the event is connected to the event handler in the example. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet13"::: ]]> @@ -705,9 +685,7 @@ The following example demonstrates how to check two objects for inequality. Because the , , and properties on `point1` and `point2` are set to the same value, the "The two StylusPoint objects are equal." Message appears. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet10"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet10"::: ]]> @@ -750,9 +728,7 @@ The following example uses the property to retrieve and display the pressure value for each in a called `points`. This example assumes that there is a called `packetOutput`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -801,7 +777,6 @@ The following example checks for the existence of a stylus point property before setting the property's value. This example assumes that there is a called `point`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet12"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet12"::: ]]> @@ -870,9 +845,7 @@ The following example gets the property for each in a . This example assumes that there is a called `packetOutput`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -910,9 +883,7 @@ The following example gets the property for each in a . This example assumes that there is a called `packetOutput`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Windows.Input/StylusPointCollection.xml b/xml/System.Windows.Input/StylusPointCollection.xml index 7b7b7c2b25c..47b6675e99a 100644 --- a/xml/System.Windows.Input/StylusPointCollection.xml +++ b/xml/System.Windows.Input/StylusPointCollection.xml @@ -38,7 +38,6 @@ The following example overrides the method to draw a circle at each comprising a . If the property is set to `true`, the method returns the stylus points. Otherwise, the property returns the stylus points. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyStroke.cs" id="Snippet23"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyStroke.vb" id="Snippet23"::: ]]> @@ -77,7 +76,6 @@ The following example collects objects in the method of a custom control. The example creates a by specifying the and the initial size of the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet19"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet19"::: ]]> @@ -115,7 +113,6 @@ The following example creates a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet28"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet28"::: ]]> @@ -160,7 +157,6 @@ The following example creates a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet20"::: ]]> @@ -206,7 +202,6 @@ The following example collects objects in the method of a custom control. The example creates a by specifying both the and the initial size of the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet19"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet19"::: ]]> @@ -251,7 +246,6 @@ The following example collects objects in the method of a custom control. The example creates a by specifying the and the initial size of the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet19"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet19"::: ]]> @@ -298,7 +292,6 @@ The following example collects objects in the method of a custom control. The example creates a by specifying the and the initial size of the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet19"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet19"::: ]]> @@ -343,7 +336,6 @@ The following example collects objects in the method of a custom control. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet19"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet19"::: ]]> @@ -383,7 +375,6 @@ The following example demonstrates how to handle the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Ink/Stroke/.ctor/MyBorder.cs" id="Snippet27"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Ink/Stroke/.ctor/MyBorder.vb" id="Snippet27"::: ]]> @@ -451,7 +442,6 @@ The following example demonstrates how to copy a . The example creates a stroke comprised of members of the and adds them to an . This example assumes that there is an called `inkcanvs1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet18"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet18"::: ]]> @@ -489,9 +479,7 @@ The following example gets the for a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -650,7 +638,6 @@ The following example demonstrates how to create a new that uses a different . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet17"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet17"::: ]]> diff --git a/xml/System.Windows.Input/StylusPointDescription.xml b/xml/System.Windows.Input/StylusPointDescription.xml index 5fded13b8a6..a4dcfd5f274 100644 --- a/xml/System.Windows.Input/StylusPointDescription.xml +++ b/xml/System.Windows.Input/StylusPointDescription.xml @@ -37,9 +37,7 @@ The following example gets the for a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -83,7 +81,6 @@ The following example creates a object and uses it to create a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -126,7 +123,6 @@ The following example creates an object and uses it to create a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet5"::: ]]> @@ -176,9 +172,7 @@ The following example checks whether two objects are compatible. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet22"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet23"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet23"::: ]]> @@ -227,7 +221,6 @@ The following example demonstrates how to find the common from two different objects. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet26"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet26"::: ]]> @@ -269,7 +262,6 @@ The following example demonstrates how to find the common . This example assumes that the event has been connected to the event handler below. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet21"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet21"::: ]]> @@ -308,9 +300,7 @@ The following example demonstrates how to find the common for a together with the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -353,7 +343,6 @@ The following example demonstrates how to find the common . This example assumes that the event has been connected to the event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet21"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet21"::: ]]> @@ -396,9 +385,7 @@ The following example demonstrates how to find the common @@ -436,9 +423,7 @@ The following example demonstrates how to find the common in a . This example assumes there is a called `packetOutput`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Windows.Input/StylusPointProperties.xml b/xml/System.Windows.Input/StylusPointProperties.xml index bdc8af5b679..9d10b2b6818 100644 --- a/xml/System.Windows.Input/StylusPointProperties.xml +++ b/xml/System.Windows.Input/StylusPointProperties.xml @@ -35,7 +35,6 @@ The following example demonstrates how to create a using the fields. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet5"::: ]]> diff --git a/xml/System.Windows.Input/StylusPointProperty.xml b/xml/System.Windows.Input/StylusPointProperty.xml index c09eb0fdec6..7bb85c95b6c 100644 --- a/xml/System.Windows.Input/StylusPointProperty.xml +++ b/xml/System.Windows.Input/StylusPointProperty.xml @@ -35,9 +35,7 @@ The following example creates the object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -111,7 +109,6 @@ The following example demonstrates how to create a new . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet25"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet25"::: ]]> @@ -149,9 +146,7 @@ The following example creates the from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -190,9 +185,7 @@ The following example creates the object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Windows.Input/StylusPointPropertyInfo.xml b/xml/System.Windows.Input/StylusPointPropertyInfo.xml index de3d0517a25..de81d9b095f 100644 --- a/xml/System.Windows.Input/StylusPointPropertyInfo.xml +++ b/xml/System.Windows.Input/StylusPointPropertyInfo.xml @@ -35,9 +35,7 @@ The following example creates an object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -80,7 +78,6 @@ The following example demonstrates how to create a new . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet16"::: ]]> @@ -126,7 +123,6 @@ The following example demonstrates how to create a new . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet16"::: ]]> @@ -164,9 +160,7 @@ The following example creates an object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -204,9 +198,7 @@ The following example creates a object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -249,9 +241,7 @@ The following example creates a object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> @@ -289,9 +279,7 @@ The following example creates a object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Windows.Input/StylusPointPropertyUnit.xml b/xml/System.Windows.Input/StylusPointPropertyUnit.xml index 4a847694682..8a77f3784e3 100644 --- a/xml/System.Windows.Input/StylusPointPropertyUnit.xml +++ b/xml/System.Windows.Input/StylusPointPropertyUnit.xml @@ -29,9 +29,7 @@ The following example creates an object from a and gets the information for each in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet4"::: ]]> diff --git a/xml/System.Windows.Input/SystemGesture.xml b/xml/System.Windows.Input/SystemGesture.xml index c26bd00f775..84d2ca88b63 100644 --- a/xml/System.Windows.Input/SystemGesture.xml +++ b/xml/System.Windows.Input/SystemGesture.xml @@ -34,7 +34,6 @@ The following example determines which type of system gesture raised the event. This example assumes that there is an called `inkcanvas1`, and that is connected to the following event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet15"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet15"::: ]]> diff --git a/xml/System.Windows.Input/TabletDevice.xml b/xml/System.Windows.Input/TabletDevice.xml index 6a213268203..c04ba7d4748 100644 --- a/xml/System.Windows.Input/TabletDevice.xml +++ b/xml/System.Windows.Input/TabletDevice.xml @@ -30,7 +30,6 @@ The following example demonstrates how to get the properties that a supports. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet27"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet27"::: ]]> @@ -263,7 +262,6 @@ The following example demonstrates how to get the properties that a supports. :::code language="csharp" source="~/snippets/csharp/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.cs" id="Snippet27"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Input/StylusDevice/GetStylusPoints/Window1.xaml.vb" id="Snippet27"::: ]]> diff --git a/xml/System.Windows/Application.xml b/xml/System.Windows/Application.xml index 13c390736f8..bc747f03ffa 100644 --- a/xml/System.Windows/Application.xml +++ b/xml/System.Windows/Application.xml @@ -54,14 +54,12 @@ The following example shows how a standard application is defined using only code: :::code language="csharp" source="~/snippets/csharp/System.Windows/Application/Overview/AppCode.cs" id="Snippetapplicationcode"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows/Application/Overview/appcode.vb" id="Snippetapplicationcode"::: The following example shows how a standard application is defined using a combination of markup and code-behind. :::code language="xaml" source="~/snippets/csharp/System.Windows/Application/Overview/App.xaml" id="Snippetapplicationxaml"::: :::code language="csharp" source="~/snippets/csharp/System.Windows/Application/Overview/App.xaml.cs" id="Snippetapplicationcodebehind"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows/Application/Overview/application.xaml.vb" id="Snippetapplicationcodebehind"::: ]]> From 27371a7ad543d4c390b0bd1421643023efa5a7a8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:30:00 -0700 Subject: [PATCH 6/6] Document ECMA-335 augment III.1.7.7 recognition for UnscopedRefAttribute and RefSafetyRulesAttribute (#12902) --- .../UnscopedRefAttribute.xml | 11 ++++++++++- .../RefSafetyRulesAttribute.xml | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/xml/System.Diagnostics.CodeAnalysis/UnscopedRefAttribute.xml b/xml/System.Diagnostics.CodeAnalysis/UnscopedRefAttribute.xml index cc51f6d2eee..3a6b5577786 100644 --- a/xml/System.Diagnostics.CodeAnalysis/UnscopedRefAttribute.xml +++ b/xml/System.Diagnostics.CodeAnalysis/UnscopedRefAttribute.xml @@ -37,7 +37,16 @@ parameters. This attribute is used in those instances where the should be allowed to escape. - Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for API authors to understand the lifetime implications of applying this attribute and how it may impact their users. + Applying this attribute, in any form, affects consumers of the applicable API. It's necessary for API authors to understand the lifetime implications of applying this attribute and how it might impact their users. + is present on the module, so this attribute has its documented effect only in a module that's also annotated with `RefSafetyRulesAttribute`. + + ]]> diff --git a/xml/System.Runtime.CompilerServices/RefSafetyRulesAttribute.xml b/xml/System.Runtime.CompilerServices/RefSafetyRulesAttribute.xml index 48ded811b5d..444b1045afe 100644 --- a/xml/System.Runtime.CompilerServices/RefSafetyRulesAttribute.xml +++ b/xml/System.Runtime.CompilerServices/RefSafetyRulesAttribute.xml @@ -28,7 +28,17 @@ Indicates the language version of the ref safety rules used when the module was compiled. - To be added. + + +