|
/// FileName : MappingNameConverter.cs
/// Author : Somnath Mondal
/// Created Date : 10/03/2007
///
/// Modification History :
/// **********************************************************************************************
/// Date Author Description
/// **********************************************************************************************
/// 10/03/2007 Somnath Mondal. Created
/// **********************************************************************************************
using System;
using System.ComponentModel;
namespace Somsoft.ReportDesigner
{
/// <summary>
/// Implementation of StringConverter to get appropriate support in PropertyBrowser control.
/// In a host such as a property browser in a forms designer, type converters allow a property value
/// to be represented as text to the user, and they can convert user-entered text into a value of
/// the appropriate data type. This class will return appropriate value and based on the value
/// property browser decide which control needs to active for the current property value.
/// </summary>
public class MappingNameConverter : StringConverter
{
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
//true means show a combobox
return true;
}
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
//true will limit to list. false will show the list, but allow free-form entry
return true;
}
public override
System.ComponentModel.TypeConverter.StandardValuesCollection
GetStandardValues(ITypeDescriptorContext context)
{
// These standard values can be dropped down in the PropertyGrid at design-time
return new StandardValuesCollection(GlobalFields.ListOfFields);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.