Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chatter...
Message
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
Miscellaneous
Thread ID:
01324136
Message ID:
01324486
Views:
13
>>Just thought I'd say hi! I check at least once a day to see if anyone has asked a WPF question. But no one has so I feel kind of invisible.
>
>I went through the first few chapters of a book called WPF Unleashed, and was so confused and disgusted I put it back on my 'technologies I'll only look at with a gun to my head' bookshelf.
>
>It seems like an awful lot of work and a huge learning curve to do something that we can do over 90% of now much easier.
>
>Did I miss something?

Your right about the learning curve, it was a rather insane. So many new concepts and totally different ways of doing things.

In my last code in VFP I was starting to write dynamic layouts that shifted a bit depending on the data. I had only a minimal investment in WinForms when I did some Silverlight coding. I liked it well enough that I decided to go with WPF for my app library. WPF is ideally suited for dynamic layouts so it works well for what I was trying to do.

However it is a technology that is still in it's infancy, many of the built in controls need major work to bring them up to being truly usable. If I had a decent investment in WinForms and/or I didn't specifically need the features of WPF I would wait a bit before playing with it.

I am however starting to get the hang of it, and am enjoying coding in it. My first app is now installed and running and so far so good.

Once you get the controls rewritten so they do what you want (which is a major amount of work), it's pretty easy to work with, layout is similar to HTML. For instance this is how I draw a treeview:
XAML:
<HierarchicalDataTemplate DataType    = "{x:Type prob:cdsContact}"
                          ItemsSource = "{Binding Path=Children, Mode=TwoWay}">
  <TextBlock Text="{Binding Path=Name}"  />
</HierarchicalDataTemplate>
<cdsc:cdsTreeView Grid.Column="0" Grid.Row="0"  Name="treeView" />
C#
Contact = cdsProBusinessFactory.GetContact();
EntityTree = Contact.GetContactTreeForID(id);
treeView.ItemsSource = EntityTree;
Children is an observable collection in my business class, so the treeview handles updating itself as the data changes no additional code required.
Previous
Reply
Map
View

Click here to load this message in the networking platform