CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 4/16/2004 9:07:58 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 15 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
FancyKetsup
Asp.Net User
Setting Sub Properties in VisualStudio Property Browser.4/16/2004 9:07:58 AM

0/0

Below is a sample control that exposes a property that has one sub property. Can someone give me a hint as to how I can set the set the sub property. It all shows up in the designer property browser of VisualStudio just fine but I can not change it from false to true and the light bulb just isn't going off for me. I can persist it just fine thats not the problem the problem is I just can't see how to change it's value to true.

public class BoolControl : WebControl
{
public BoolControl() : base(HtmlTextWriterTag.Div)
{this.Width=Unit.Pixel(100);this.Height=Unit.Pixel(100);}
[TypeConverter(typeof(ClassPropertyConverter))]
public ClassProperty SetBool{get{return new ClassProperty();}set{}}
public class ClassProperty
{
protected bool mybool = false;
public bool MyBool{get{return mybool;}set{mybool = value;}}
}
internal class ClassPropertyConverter : ExpandableObjectConverter
{
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType )
{
if( destType == typeof(string) && value is BoolControl.ClassProperty)
{
return "How To Set Sub-Property?";
}
return base.ConvertTo(context,culture,value,destType);
}
}
}

Answering a question increases your knowledge asking a question shows your Intelligence!
master4eva
Asp.Net User
Re: Setting Sub Properties in VisualStudio Property Browser.4/17/2004 12:37:46 PM

0/0

You want an clue, then no explaination:

[NotifyParentProperty(true)]

-- Justin Lovell
FancyKetsup
Asp.Net User
Re: Setting Sub Properties in VisualStudio Property Browser.4/17/2004 3:55:33 PM

0/0

Wish it was that easy lol
Answering a question increases your knowledge asking a question shows your Intelligence!
master4eva
Asp.Net User
Re: Setting Sub Properties in VisualStudio Property Browser.4/17/2004 5:03:01 PM

0/0

Hmm... so did you figure it out?
-- Justin Lovell
FancyKetsup
Asp.Net User
Re: Setting Sub Properties in VisualStudio Property Browser.4/17/2004 9:11:25 PM

0/0

Yeah I wasn?t catching on to how to handle the changing of the sub-properties while in the designer... because of the way it handles sub-properties. Ended up just changing the properties manually during the CreateInstance stage in the type-converter. Not sure this is best place to do that, but at least I understand what the problem was now. Heck I was trying to change the existing instance instead of changing the class properties before creating a new instance. It's really simple once you catch on to what is going on in the background of the designer environment. Thanks :)
Answering a question increases your knowledge asking a question shows your Intelligence!
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Windows Forms Programming in Visual Basic .NET Authors: Chris Sells, Justin Gehtland, Pages: 680, Published: 2003
Professional Crystal Reports for Visual Studio .NET Authors: David McAmis, Pages: 384, Published: 2004
Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath Authors: Eric Carter, Eric Lippert, Pages: 992, Published: 2006
ASP.NET in a Nutshell: In a Nutshell Authors: G. Andrew Duthie, Matthew MacDonald, Pages: 979, Published: 2003
Programming ASP.NET: Building Web Applications and Services Using C and VB.NET. Authors: Jesse Liberty, Dan Hurwitz, Pages: 988, Published: 2003
Developing and Implementing Web Applications with Visual Basic .NET and Visual Studio .NET: Exam Cram 2, 70-305 Authors: Kirk Hausman, Mike Gunderloy, Ed Tittel, Pages: 624, Published: 2003
Pro .NET 1.1 Remoting, Reflection, and Threading: From Professional to Expert Authors: Syed Fahad Gilani, Tobin Titus, Mike Gillespie, Fabio Claudio Ferracchiati, David Curran, James Hart, Benny K. Mathew, Sandra Gopikrishna, Andy Olsen, Tejaswi Redkar, Robin Pars, Jon Pinnock, Srinivasa Sivakumar, Pages: 647, Published: 2005
Pro VB 2008 and the .NET 3.5 Platform Authors: Andrew Troelsen, Pages: 1377, Published: 2008

Web:
Cloudy in Seattle : How to: Sub-property editing in the Visual ... Mar 3, 2008 ... How to: Sub-property editing in the Visual Studio 2008 WPF Designer Property Browser. Recently I saw a post on the forums asking about how ...
Make Your Components Really RAD with Visual Studio .NET Property ... NET Framework and the Visual Studio .NET property browser, which is written using . .... It would make little sense to have sub-properties for type Boolean! ...
Properties Overview Set number = value End Set End Property ' Other members... End Class Public Class UsesSimpleProperty Public Shared Sub Main() Dim example As New ...
CodeGuru: Type Converters, Your Friendly Helpers! Any time you develop a Web form or windows form using the Visual Studio . ... The example shows how you use the property browser to set these values and how ...
Visual Studio 2008 Crashes When Applying Custom Attribute - BUG ... Feb 2, 2008 ... When applying a custom attribute to a property, and the custom attribute ... value End Set End Property Public Sub New() End Sub Public Sub ...
Type converters, your friendly helpers! The example shows how you then use the property browser to set these values and how you ... Type converters are an important part of the Visual Studio . ...
See Win App How to: Sub-property editing in the Visual Studio 2008 WPF Designer ... about how to get subproperties to show up in the Property Browser for WPF projects. ...
CodeProject: VML Web Controls. Free source code and programming help Sort() 'return values to be listed in the property browser's dropdown .... End Set End Property Protected Overrides Sub Render(ByVal output As _ System.Web. ...
InformIT: Sams Teach Yourself Visual Studio .NET 2003 in 21 Days ... The Culture Info Browser application uses the methods and properties in the .... Set the mouse cursor back to normal Me.Cursor = Cursors.Default End Sub ...
Microsoft Windows Forms QuickStarts Tutorial You can test the design-time behavior of a control in the Visual Studio ... Note : The property Set code includes a call to the OnDrawingModeChanged method. ...




Search This Site:










code of .aspx file....

how to create a role in c# codes?

changing the color of text in code

wierd error - help!!!!!!

webstone shadow module error with dnn 2.1.1

3.0.10 issue: logo displayed during page refresh

switching from anonymous profile to member profile

"object moved to here" problem (via ssl/tls)

login failed for user 'computername\aspnet'

encrypting http stream at server

missing buttons and controls

news/announcement ticker?

open and close an ascx file in vs 2005

providertoolkitsample.msi - where are the files?

how to retrieve password from database

capicom and web certificates

sql server 2005 and sql server 2005 lite

encryping <identity> section of webconfig file in asp.net 2.0

a first chance exception of type 'system.threading.threadabortexception' occurred in mscorlib.dll

publishing asp.net site

database connection help....

digital certificate

increase number of items in recent projects list

why different design approach between profile and membership ?

imagemap controls

guids as fields in sql server 2005 express

google and custom vertical market portal :(

sql db search module

no impersonation + windows authentication = acl required for individuals and not network service?

how can i create a custom "not authorized" page

 
All Times Are GMT