Thanks for your reply.
I played a lot with PropertySort as it seemed the obvious thing but the only thing it does right now is that every property are seperated instead of actually being grouped. When the PropertySort is AlphabeticalCategorized,it looks like the image I attached when my code is this
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Italic"
)]
[Description(
"Italic"
)]
public
bool
Italic
{
get
{
return
mItalic;
}
set
{
if
(mItalic != value)
{
mItalic = value;
Generate();
UpdateFontChanges();
NotifyPropertyChanged();
}
}
}
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Font Name"
)]
[Description(
"Font Name"
)]
[ReadOnly(
true
)]
public
String FontName
{
get
{
return
mFontName;
}
set
{
if
(mFontName != value)
{
mFontName = value;
Generate();
UpdateFontChanges();
NotifyPropertyChanged();
}
}
}
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Font Outline"
)]
[Description(
"Font Outline"
)]
public
byte
Outline
{
get
{
return
mOutline;
}
set
{
if
(mOutline != value)
{
mOutline = value;
if
(Generate() < 0)
{
// An Error occured
MessageBox.Show(
"Bad value, No font generated!"
,
"Error"
, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
UpdateFontChanges();
NotifyPropertyChanged();
}
}
}
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Border Width"
)]
[Description(
"Border Width"
)]
public
byte
BorderWidth
{
get
{
return
mBorderWidth;
}
set
{
if
(mBorderWidth != value)
{
mBorderWidth = value;
Generate();
UpdateFontChanges();
NotifyPropertyChanged();
}
}
}
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Exported Char"
)]
[Description(
"Exported Char"
)]
public
String ExportChar
{
get
{
return
mExportChar;
}
set
{
if
(mExportChar != value)
{
mExportChar = value;
Generate();
UpdateFontChanges();
NotifyPropertyChanged();
}
}
}
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Font Color"
)]
[Description(
"Font Color"
)]
public
Color FontColor
{
get
{
return
mFontColor;
}
set
{
if
(mFontColor != value)
{
mFontColor = value;
UpdateFontChanges();
NotifyPropertyChanged();
}
}
}
[Category(
"Settings Font Creation"
)]
[DisplayName(
"Optimized Texture Size"
)]
[Description(
"Optimized Texture Size"
)]
public
Size FontTextureSize
{
get
{
return
new
Size(mTextureWidth, mTextureHeight);
}
}
[Browsable(
false
)]
public
bool
IsOptimizeMode
{
get
{
return
mIsOptimizeMode;
}
set
{
mIsOptimizeMode = value;
}
}
I'm wondering why this use to work perfectly with the PropertyGrid.
Kaven