예제 #1
0
        public int UxThemeGetThemeFilename(IntPtr hTheme, int iPartId, int iStateId, FilenameProperty prop, out string result)
        {
            Text.StringBuilder sb = new Text.StringBuilder(255);
            int hresult           = UXTheme.GetThemeFilename(hTheme, iPartId, iStateId, (int)prop, sb, sb.Capacity);

            result = sb.ToString();
            return(hresult);
        }
예제 #2
0
        public string GetFilename(FilenameProperty prop)
        {
            if (!System.Windows.Forms.ClientUtils.IsEnumValid(prop, (int)prop, 0xbb9, 0xbc0))
            {
                throw new InvalidEnumArgumentException("prop", (int)prop, typeof(FilenameProperty));
            }
            StringBuilder pszThemeFilename = new StringBuilder(0x200);

            this.lastHResult = System.Windows.Forms.SafeNativeMethods.GetThemeFilename(new HandleRef(this, this.Handle), this.part, this.state, (int)prop, pszThemeFilename, pszThemeFilename.Capacity);
            return(pszThemeFilename.ToString());
        }
예제 #3
0
        public string GetFilename(FilenameProperty prop)
        {
            if (!Enum.IsDefined(typeof(FilenameProperty), prop))
            {
                throw new System.ComponentModel.InvalidEnumArgumentException("prop", (int)prop, typeof(FilenameProperty));
            }

            string result;

            last_hresult = VisualStyles.UxThemeGetThemeFilename(theme, this.part, this.state, prop, out result);
            return(result);
        }
예제 #4
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public string GetFilename(FilenameProperty prop)
        {
            //valid values are 0xbb9 to 0xbc0
            if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)FilenameProperty.ImageFile, (int)FilenameProperty.GlyphImageFile))
            {
                throw new InvalidEnumArgumentException(nameof(prop), (int)prop, typeof(FilenameProperty));
            }

            StringBuilder filename = new StringBuilder(512);

            lastHResult = SafeNativeMethods.GetThemeFilename(new HandleRef(this, Handle), part, state, (int)prop, filename, filename.Capacity);
            return(filename.ToString());
        }
예제 #5
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public unsafe string GetFilename(FilenameProperty prop)
        {
            // Valid values are 0xbb9 to 0xbc0
            SourceGenerated.EnumValidator.Validate(prop, nameof(prop));

            Span <char> filename = stackalloc char[512];

            fixed(char *pFilename = filename)
            {
                _lastHResult = GetThemeFilename(this, Part, State, (int)prop, pFilename, filename.Length);
            }

            return(filename.SliceAtFirstNull().ToString());
        }
예제 #6
0
        /// <summary>
        ///  [See win32 equivalent.]
        /// </summary>
        public unsafe string GetFilename(FilenameProperty prop)
        {
            // Valid values are 0xbb9 to 0xbc0
            if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)FilenameProperty.ImageFile, (int)FilenameProperty.GlyphImageFile))
            {
                throw new InvalidEnumArgumentException(nameof(prop), (int)prop, typeof(FilenameProperty));
            }

            Span <char> filename = stackalloc char[512];

            fixed(char *pFilename = filename)
            {
                _lastHResult = GetThemeFilename(this, Part, State, (int)prop, pFilename, filename.Length);
            }

            return(filename.SliceAtFirstNull().ToString());
        }
예제 #7
0
 public string GetFilename(FilenameProperty prop)
 {
 }
        /// <include file='doc\VisualStyleRenderer.uex' path='docs/doc[@for="VisualStyleRenderer.GetFilename"]/*' />
        /// <devdoc>
        ///    <para>
        ///       [See win32 equivalent.]
        ///    </para>
        /// </devdoc>
        public string GetFilename(FilenameProperty prop) {
            //valid values are 0xbb9 to 0xbc0
            if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)FilenameProperty.ImageFile, (int)FilenameProperty.GlyphImageFile))
            {
                throw new InvalidEnumArgumentException("prop", (int)prop, typeof(FilenameProperty));
            }

            StringBuilder filename = new StringBuilder(512);
            lastHResult = SafeNativeMethods.GetThemeFilename(new HandleRef(this, Handle), part, state, (int)prop, filename, filename.Capacity);
            return filename.ToString();
        }
 public string GetFilename(FilenameProperty prop)
 {
     if (!System.Windows.Forms.ClientUtils.IsEnumValid(prop, (int) prop, 0xbb9, 0xbc0))
     {
         throw new InvalidEnumArgumentException("prop", (int) prop, typeof(FilenameProperty));
     }
     StringBuilder pszThemeFilename = new StringBuilder(0x200);
     this.lastHResult = System.Windows.Forms.SafeNativeMethods.GetThemeFilename(new HandleRef(this, this.Handle), this.part, this.state, (int) prop, pszThemeFilename, pszThemeFilename.Capacity);
     return pszThemeFilename.ToString();
 }
예제 #10
0
 public int UxThemeGetThemeFilename(IntPtr hTheme, int iPartId, int iStateId, FilenameProperty prop, out string result) => throw new InvalidOperationException();
 public string GetFilename(FilenameProperty prop)
 {
 }
		public string GetFilename (FilenameProperty prop)
		{
			if (!Enum.IsDefined (typeof (FilenameProperty), prop))
				throw new System.ComponentModel.InvalidEnumArgumentException ("prop", (int)prop, typeof (FilenameProperty));

			string result;
			last_hresult = VisualStyles.UxThemeGetThemeFilename (theme, this.part, this.state, prop, out result);
			return result;

		}
예제 #13
0
 public string GetFilename(FilenameProperty prop)
 {
     throw null;
 }
예제 #14
0
 set => SetValue(FilenameProperty, value);
		public int UxThemeGetThemeFilename (IntPtr hTheme, int iPartId, int iStateId, FilenameProperty prop, out string result)
		{
			result = null;
			return (int)S.S_FALSE;
		}
예제 #16
0
		public int UxThemeGetThemeFilename (IntPtr hTheme, int iPartId, int iStateId, FilenameProperty prop, out string result)
		{
			Text.StringBuilder sb = new Text.StringBuilder (255);
			int hresult = UXTheme.GetThemeFilename (hTheme, iPartId, iStateId, (int)prop, sb, sb.Capacity);

			result = sb.ToString ();
			return hresult;
		}
예제 #17
0
 set { SetValue(FilenameProperty, value); }