CodingWPF

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  ALL
35512.1 
I've just started using WPF for a production project, and it's the first time I've done anything real with it. There are a few new ways of doing things that take a minute or two to understand, but overall, I completely love it. The data-binding is incredibly powerful, and working with the form layout in the XAML view makes life so much easier. I might go on a bit more later.

0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.2 In reply to 35512.1 
Will you get off these happy pills please.

0/0
 Reply   Quote More 

 From:  Rowan  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.3 In reply to 35512.1 
I have never so much as glanced at WPF, but if it's databinding is anything like ASP.NETs, is it not evil, and should it not die?
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Rowan     
35512.4 In reply to 35512.3 

WPF's databinding is absolutely fuck-all like ASP.NET's abortion of a workaround of a kludge. It is a thing of beauty, it goes like shit off a shovel, and it lets you do almost anything. For a start, you can bind to properties of complex object properties. You can provide custom formatters, type converters and stuff. There's multi-binding and priority-binding.

 

The only thing it's got that's anything like ASP.NET is DataTemplates, and those are great.

 

Microsoft really have nailed that whole "make the simple stuff easy and the complex stuff possible" thing this time.

0/0
 Reply   Quote More 

 From:  Rowan  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.5 In reply to 35512.4 

I shall believe that when I see it.

 

Been using the whole data entity framework / ESQL thing lately, which is sooooo painful it's untrue. The only other ORM type affair I've used in a production setting is ActiveRecord, and though I whined a bit about that, I never shall again.

 

"What, you want to use a view? Then you shall have to manually write this 2000 line XML file, and a pox on you! Also, do not try to use the edmx in the editor, or I shall overwrite all of that handcoded XML of yours. Thank Christ you use subversion."

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Rowan     
35512.6 In reply to 35512.5 

I'm just putting the finishing touches to my own hand-rolled business-object + ORM framework, and it's much nicer than EF. It's got a Query Language and everything.

 

The thing I'm doing in WPF is the front-end for the code generator, in fact.

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Rowan     
35512.7 In reply to 35512.5 
And yes, EF 1.0 is shocking. I don't know what they were thinking. I've never had a problem that EF would solve. Some of the things they're talking about for 2.0 are interesting, but then, they always are.

0/0
 Reply   Quote More 

 From:  Rowan  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.8 In reply to 35512.6 
Surely the fact that you had to roll your own ORM means that MS hasn't got the whole 'make simple things easy' quite right yet?
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Rowan     
35512.9 In reply to 35512.8 

That was just referring to WPF.

 

The best thing about it is being able to work with the layout as a proper hierarchy, and copy and paste bits and bobs properly and easily. Like docking, which was a complete bastard in Windows Forms, is a doddle when you're editing XAML directly. And the flexible layout controls like Grids and StackPanels are great, and don't slow down to a crawl just cos you embed a few of them. And the Command system, which is like MFC but much, much easier, is also great.

 

I haven't even started mucking about with Themes yet, but those look very nice too.

0/0
 Reply   Quote More 

 From:  Ally  
 To:  Rowan     
35512.10 In reply to 35512.3 
I've come to the conclusion that ASP.NET is utterly evil and should die. Well maybe bar one or two bits, but I find myself fighting against it with every project I make.
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.11 In reply to 35512.9 
Are they anything like the themes in Frontpage. They was wonderous indeed, they was.

some things never change
0/0
 Reply   Quote More 

 From:  99% of gargoyles look like (MR_BASTARD)  
 To:  99% of gargoyles look like (MR_BASTARD)     
35512.12 In reply to 35512.11 
:|

some things never change
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  99% of gargoyles look like (MR_BASTARD)     
35512.13 In reply to 35512.11 
Heh. No. They're like CSS on meth.

0/0
 Reply   Quote More 

 From:  Rich  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.14 In reply to 35512.1 
Have just finished a year-long WPF project and I absolutely adore WPF.

I love the fact you can do crazy things like embed a movie as the border of a textbox, or you can bind the Visual property of something as the visual of something else (eg, binding the visual property of a MediaElement as the visual property of a panel so it gives you a very efficient reflection of the movie playing - see below)

I LOVE WPF LOVE IT LOVE IT LOVE IT. Unfortunately, now I'm stablising some old code. .NET 2.0 WinForms. Lovely.... :-\

XAML code:
 
    <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"; xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"; Margin="0" Background="#FFC0C0C0">
<StackPanel Margin="34">
 
<MediaElement Source="C:\video.wmv" Width="300" Name="mypic"/>
<!-- <Image Source="C:\picture.jpg" Width="300" Name="mypic"/> -->
<Rectangle Height="{Binding ElementName=mypic, Path=ActualHeight}" Width="{Binding ElementName=mypic, Path=ActualWidth}">
<Rectangle.Fill>
<VisualBrush Visual="{Binding ElementName=mypic}"/>
</Rectangle.Fill>
<Rectangle.LayoutTransform>
<ScaleTransform ScaleY="-0.7"/>
</Rectangle.LayoutTransform>
<Rectangle.OpacityMask>
<LinearGradientBrush EndPoint="0,1">
<GradientStop Offset="0" Color="Transparent"/>
<GradientStop Offset="1" Color="#77000000"/>
</LinearGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
</StackPanel>
</UserControl>
 


Just make sure C:\video.wmv is a valid movie file.

I also love the runtime-evaluation of binding. For example, you can bind to a property of type 'Object' and in the XAML bind to a property that may or may not exist at runtime:

XAML code:
 
    <TextBlock Text="{Binding ElementName=SomeObject, Path=MyProperty}" />
 


If it exists, it works, if not, it silently ignores it.

This is VERY useful. And she's quite hot: http://www.beacosta.com/blog/




Rich
Web: LostJohnnies.com
Email: rich [at] lostjohnnies [dot] com
MSN Messenger: dexta1984 [at] hotmail [dot] com
____________________________________________________

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Rich     
35512.15 In reply to 35512.14 
I love the Command model, with the CanExecute handler. No more fucking about with enabling menu items, toolbar buttons, keyboard shortcuts and all that nonsense. One check in one place and it's magically picked up by everything.

I created a DialogCommands class with OK and Cancel commands in it, and got them to automatically wire themselves up to Enter and Escape.

So much better than any other UI framework I've ever used.

0/0
 Reply   Quote More 

 From:  Rich  
 To:  THERE IS NO GOD BUT (RENDLE)     
35512.16 In reply to 35512.15 
Commands are pretty awesome.

I find constructing DependencyPropertys to be a bit faffy.

We've been doing a bit of stuff around amendability using XAMLReader.Load() which allows for really easy control injection.

I especially like the way you can specify assemblies in your imported XAML that the originating program has no concept of, and do your code-behind stuff in them. Really flexible.

I'm sold, can you tell? :)




Rich
Web: LostJohnnies.com
Email: rich [at] lostjohnnies [dot] com
MSN Messenger: dexta1984 [at] hotmail [dot] com
____________________________________________________

0/0
 Reply   Quote More 

Reply to All    
 

1–16

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats