Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to subclass control?
Message
From
24/04/2008 14:00:49
 
 
To
23/04/2008 21:32:26
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01184867
Message ID:
01312932
Views:
21
>>I just really like the IDE and especially the Properties tab. It has a color chooser and a font chooser. Keeps me from knowing all the code it takes to specifify a font. Also, I like the way the Properties tab uses the bold font to show which values are overrides of the default values. It could also keep me out of all that [DefaultValue], Get{}, Set{} stuff.
>>
>>Visually seeing my UI component on a Designer surface, and it's properties on full display in the Properties tab just seems more comfortable to me.
>>
>>Any way, after about one more month of all this WinForms stuff, I plan to jump into WPF controls and UI design, and take beating over there. I really plan to go WPF on my app's UI design, but remember I am a newbie to .NET from VFP, so I at least wanted to peek at the WinForms approach to see what I have missed over these last 6 years or so that .NET has been around.
>
>Get yourself comfortable with C# first. WPF has a rather nasty learning curve to it, so I wouldn't jump into it until I was comfortable with C#.
>
>And if you are worried about "all that [DefaultValue], Get{}, Set{} stuff." you may not like WPF. This is what a WPF get set looks like:
>
>
>public static readonly DependencyProperty MyNameProperty =
>  DependencyProperty.Register("MyName", typeof(string), typeof(MyClass),
>                               new UIPropertyMetadata(MyClass.MyNameValueChanged));
>
>public string MyName{
>   get { return (string)GetValue(MyNameProperty); }
>   set { SetValue(MyNameProperty, value); }
>
>private static void MyNameValueChanged(DependencyObject d,
>                                       DependencyPropertyChangedEventArgs e)
>  {
>  MyClass myClass = (MyClass)d;
>  myClass.someObject.Text = (string)e.NewValue;
>  }
>
Awww c'mon - not all properties have to be dependency properties. You're just trying to scare the lad away <g>

>
>Other than a number of decent "Hello World" type demos, the online resources for WPF are poor so if you do decide to try WPF I would also recommend getting a book, Apress 'WPF in C#2008' seems to be the best one.
>
>I am having a lot of fun working with WPF, it is very powerful, but it is also very much in it's infancy as a technology.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform