|
Thanks for you great job!
Just one thing, sometimes the RibbonForm size will be error when dragging it. Also the performance should be improved. Hope it'll be better.
|
|
|
|
|
Juan,
I think you have shown you have a real talent for UI components/controls.
I must point out 1 thing. You are creating components/controls for .NET 2.0, which is a saturated market. If my company wants nice controls on a project, we would buy a suite of controls, for not much money when you consider how much the project is worth. I appreciate yours are free and useful to learn how to do some nice stuff, which is good.
I am not knocking your efforts, I think you rock. What I would say, is that you should download expression Blend BETA, and .NET 3.0, and come up with some WPF controls. This is a new market with not really anyone doing much as yet, mainly cos most folk dont get it and it scares the pants of them. Its very different.
So I think you could make a stack of credit/cash/fame/honour, what ever it is you seek, by ditching this .NET 2.0 stuff in favour of .NET 3.0 stuff.
Heres one I created earlier, and I dont have your artistic flair I know that for sure
http://www.codeproject.com/useritems/WPFFlickr.asp
So if I can do this, you would do much better.
Remember .NET 2.0 controls are everywhere, try and find a similiar control for .NET 3.0 and youll find nothing. OK this is because in WPF you can do almost what you want, Believe me I know. I've been messing with it a lot. I actually have a new article onn WPF/and electronic ink very soon.
I just think you have talent and it would be nice to see you use it to make something new, that will be ahead of its time instead of mimicing what is already available.
Of course if you go ahead with this idea, of mine, and become a multi-billionaire/millionaire I want 50%, or that beer in brighton you promised for beating me in last months C# comp. No, I am happy you won, well deserved.
Anyways, what do you think of this. New stuff is cool, so push it to the new stuff, you never know what you'll create (ooh aah, very frankenstein like, bring it on).
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Sacha
Of course you are right (I think U.K. must give you the name of Lord . Take look at my blog, my point is to finish this control library and between put the new way of overriding controls and new code with Orcas and Blend.
Thanks Sacha, and don't worry I wondering with your articles I always review them
|
|
|
|
|
Yeah I appreciate the work you are doing.
I would never use it myself, as although I like UIs, I dont like overriding this that and the other to do it.
WPF on the other hand is simply awesome, I cant think of enough good things to say about it.
For example take one of your gradient buttons, here is the equivalent WPF/XAML code. Took 2 minutes to do with BLEND.
<Style x:Key="ButtonFocusVisual"><br />
<Setter Property="Control.Template"><br />
<Setter.Value><br />
<ControlTemplate><br />
<Rectangle SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="3"/><br />
</ControlTemplate><br />
</Setter.Value><br />
</Setter><br />
</Style><br />
<LinearGradientBrush x:Key="ButtonNormalBackgroundFill" EndPoint="0.5,1" StartPoint="0.5,0"><br />
<GradientStop Color="#FFFFFFFF" Offset="0"/><br />
<GradientStop Color="#FFF0F0EA" Offset="0.9"/><br />
</LinearGradientBrush><br />
<SolidColorBrush x:Key="ButtonBorder" Color="#FF003C74"/><br />
<Style x:Key="GradientButton" TargetType="{x:Type Button}"><br />
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/><br />
<Setter Property="Background" Value="{StaticResource ButtonNormalBackgroundFill}"/><br />
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}"/><br />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/><br />
<Setter Property="HorizontalContentAlignment" Value="Center"/><br />
<Setter Property="VerticalContentAlignment" Value="Center"/><br />
<Setter Property="Template"><br />
<Setter.Value><br />
<ControlTemplate TargetType="{x:Type Button}"><br />
<Border Width="Auto" Height="Auto" BorderBrush="#FF3F3F9A" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5"><br />
<Border.Background><br />
<LinearGradientBrush EndPoint="0.92,0.266" StartPoint="0.92,1.409"><br />
<GradientStop Color="#FF14252E" Offset="0"/><br />
<GradientStop Color="#FFB0E3FE" Offset="1"/><br />
</LinearGradientBrush><br />
</Border.Background><br />
<ContentPresenter HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Center" Width="Auto" Height="Auto"/><br />
</Border><br />
<ControlTemplate.Triggers><br />
<Trigger Property="IsKeyboardFocused" Value="true"/><br />
<Trigger Property="ToggleButton.IsChecked" Value="true"/><br />
<Trigger Property="IsEnabled" Value="false"><br />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/><br />
</Trigger><br />
</ControlTemplate.Triggers><br />
</ControlTemplate><br />
</Setter.Value><br />
</Setter><br />
</Style>
And to use the style on the button
<br />
<Button HorizontalAlignment="Left" Margin="128,124,0,0" Style="{DynamicResource GradientButton}" VerticalAlignment="Top" Width="128" Height="56" Content="Nice Button"/><br />
How simple is that
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
I have tried using this to see the result in VS.NET 2005 without any success.
Please can you email me the xaml file so that I could compare the results?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Paul,
You will need to the WPF extensions for visual studio of course.
If you have those installed, simply create a new WPF Window, say Window1.xaml
and past the following code into it.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="UntitledProject1.Window1"
x:Name="Window"
Title="Window1"
Width="640" Height="480">
<Window.Resources>
<Style x:Key="ButtonFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="3"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<LinearGradientBrush x:Key="ButtonNormalBackgroundFill" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFFFFFF" Offset="0"/>
<GradientStop Color="#FFF0F0EA" Offset="0.9"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="ButtonBorder" Color="#FF003C74"/>
<Style x:Key="GradientButton" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
<Setter Property="Background" Value="{StaticResource ButtonNormalBackgroundFill}"/>
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Width="Auto" Height="Auto" BorderBrush="#FF3F3F9A" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5">
<Border.Background>
<LinearGradientBrush EndPoint="0.92,0.266" StartPoint="0.92,1.409">
<GradientStop Color="#FF14252E" Offset="0"/>
<GradientStop Color="#FFB0E3FE" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<ContentPresenter HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Center" Width="Auto" Height="Auto"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true"/>
<Trigger Property="ToggleButton.IsChecked" Value="true"/>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid x:Name="LayoutRoot">
<Button HorizontalAlignment="Left" Margin="128,124,0,0" Style="{DynamicResource GradientButton}" VerticalAlignment="Top" Width="128" Height="56" Content="Nice Button"/> </Grid>
</Window>
If you want a full project, email me at sachabarber@hotmail.com, and ill send it to you
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Thank you.
I have the WPF extensions for visual studio installed, and have the Expression Blend/Web - just cannot do any good artistic work
I wanted to see how you produced that effect that required the PathGradientBrush
of the GDI+.
Okay, I have verified it, and as I thought it never produced the RibbonRoundButton
button but just a simple gradient button!
In GDI+, you can get that with a simplier and smaller code!
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Yeah that may be the case for this example. I know in GDI there is a LinearGradientBrush, thats fine. My point was that XAML/WPF is truly amazing and you can do so much more with it then GDI+.
Thats all I meant. Its trivial to do cool stuff
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Thank you, I understand your point.
I, however, do not think a company will invest its money to develop XAML
application.
For a rapidly changing systems like Web development, it might make sense
but then Silverlight/Flash etc is there
That the Wii won over PS3/XBox360 gives a good example of "cool graphics not
always the best/only solution".
Anyway, thanks for the support and the time.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Paul Selormey wrote: For a rapidly changing systems like Web development, it might make sense
but then Silverlight/Flash etc is there
I just went to a SilverLight training course at Microsoft, and would not touch it with a barg pole at the moment. I have used Flash a fair ammount so can see the difference, Flash is way better IMHO.
WPF on the other hand is so cool, and there is nothing like it apart from Flex. But Flex still uses action script 3.0, and WPF uses C# or VB (the full set of classes and all), this is why WPF is better than both Flash and SilverLight.
Flash is better than SilverLight because its easier and more powerful
WPF is better than Flex because its easier and more powerful
Those are my 2 cents and way
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Thanks for the reply and the information.
I wish you could give out some of the weakness of the Silverlight.
For my current project, I have no choice - I give the users what they want and try
to be ahead of the competition (and that will mean supporting Flex, Silvelight,
WPF, PDF, JavaFX etc).
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Paul Selormey wrote: For my current project, I have no choice - I give the users what they want and try
to be ahead of the competition (and that will mean supporting Flex, Silvelight,
WPF, PDF, JavaFX etc).
Sounds like a very interesting project.
Where are you based?
Ok as far as Silverlight vs Flash.
Flash has full OO action script that supports video, tweens, vector animation manipulation, XML parsing, IO handling. Basically it's very mature language these days.
Silverlight Alpha (the one out now) is Javascript only object model, no .NET CLR support at all. So you simply can't compare the functionality available with Silverlight Alpha with Flash. Flash wins hands down. As I prefer Action script to javascript any day of the week. From what we saw of Silverlight Alpha, its was just quite clunky and didnt look that usable, Mike Ormond (MSFT man, kept saying cant do this at this version, but next one youll be able to). Flash on the other hand is easy to use, loads of resources tutorials available, right now.
Silverlight Beta (1.1 apparently) will have CLR support, but will run in a sandbox, basically a safe cutdown CLR enviroment, it remains to be seen just what will and wont be allowed. If Microsoft go completely security mad, they could end up with something like a Java Applet, which is very very limited, perhaps too limited for most interesting apps. If they open the security too wide, theyll end up with something that could do activeX type activities, such as delete or create files. This could be bad for a internet user. Remember Microsoft have released a plugin that stops ActiveX until the user confirms they are allowed for the given page. This is their own technology being stopped by them. Thats bad.
I just think at this moment in time Flash is the better system, its model just works.
Like I say I think, WPF proper, is totally different, and seems fairly mature already. Silverlight just doesnt seem ready yet.
But if you want to be ahead of the game, go for it.
Anyways thats just my opinion, who am I to say.
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Thanks so much.
Sacha Barber wrote: Sounds like a very interesting project.
It should be but the work load is too heavy
Sacha Barber wrote: Where are you based?
I work for a small company here in Japan. We are initially doing factory/fault management systems for companies here, but decided to expand some of the components for sale.
Just a note...the alpha is 1.1, but beta which is out is 1.0.
I really appreciate you taking the time to explain all these. The analysis is
good, and very educative.
Sacha Barber wrote: Anyways thats just my opinion, who am I to say.
It is a great help, and I really like it.
Best regards,
Paul.
-- modified at 8:46 Monday 18th June, 2007
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Paul Selormey wrote: Just a note...the alpha is 1.1, but beta which is out is 1.0.
Fair enough.
Paul Selormey wrote: I really appreciate you talking the time to explain all these. The analysis is
good, and very educative.
Absolutely no bother, I like this software stuff, believe it or not, so talking to another like minded person, is just fine by me.
Anyways, hope you sort it out. I Still think it sounds interesting.
Best of luck
I may soon (after short holiday) publish a new WCF/WPF/VISTA app that may interest you, look out for it.
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Sacha Barber wrote: Best of luck
Thank you, I will need it
Sacha Barber wrote: I may soon (after short holiday) publish a new WCF/WPF/VISTA app that may interest you, look out for it.
Hello, article come on...
I have not yet started WCF, but will soon have to since most of the systems I have designed so far are based on .NET Remoting, and that senior brother really has a lot to offer.
WPF I am playing with the little bits currently.
Vista, currently mainly for testing. Our main customer here (a well-known car company) takes time to upgrade. They only use "trusted systems" and that until recently was only Windows 2000. They are now slowing taking on WinXP, mainly because of the new machines and use of the embedded version of the XP for panel display. (Well, the secret is maximum profit...if it runs don't fix it. )
Please have a nice holiday, hope you will have some exercise too to prepare for the next marathon.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
Paul,
I have not yet done any WCF, so this article will be a challenge for me also. But I have a plan and I think ive got it sorted in my head now. So once im back of holiday, ill start it. BUt it will be a good one I hope, if its not good i wont put it up til it is good.
You may or may not know, WCF kind of brings together remoting, MSMQ, sockets etc etc, in one uniform programming paradigm. I have used a fair ammount of Remoting, but from what I have seen WCF, actually seems to be a tad more compliacted, at least initially. Im sure this is just cos its new. Well see, watch this space. I think call backs in WCF are a lot easier than remoted events back to client, that was evil.
So all in all im looking forward to it.
May take a while but ill get it done eventually.
Thanks for now, bye.
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
Also Juan, I noticed that you have installed C# Express Orcas on Vista. Was this painful, or OK. I would like to do this, but already have cider and Blend so, cant see why I should install this. Any comments on that?
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
At the moment you have to design the control in Blend and after copy the xaml code to the control in Orcas, the real question I think is: Can I do a complete app with Blend? because sincerely I have no idea. I'm getting crazy with releasing software everyweek from part of MS and they dont finish any of them, all are betas. Summarizing Can I do a complete app with Blend?
Thanks again Sacha.
|
|
|
|
|
Juan,
Expression Blend and Visual Studio 2005 with the WPF addin (Cider) can be used together no problem, You can create an entire application/project in either or both of them.
How I like to use them is as follows.
I create a new solution with a project (or more than 1 if you like) and open the project in BLEND and the solution in Visual Studio 2005.
I then create all templates and styles and layout in Blend, save run and compile in blend. Flip back to visual studio solution, who knows the code is out of snyc, so reloads it, and I do manual edits in Visual Studio. This seems to work well for a number of reasons.
1. You get all the nice blend type help for creating styles etc etc
2. You get the intellisense of visual studio (blend has none), visual studio gives intellisense for XAML. Blend does not.
That said you can certainly create an entire app in just BLEND I have done this many times, its dead easy. Though resources should be watched, as if you dont watch it, all resources, styles, templates could end up in one file. Not nice, far better to have seperate resources, and use
<MergedDictionary> to bring in the resources you need.
I think your question really related to controls, I think you need to be careful about simply overriding controls and inherting from them. There is not as much need to do that anymore, as styles and templates really fix a lot of these issues. But if you want to do this and use a new inherited control you may find the following article and bit of code quite interesting
<Window x:Class="ColorControlApp.Window1"<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
xmlns:src="clr-namespace:ColorPicker;assembly=ColorPickerControl" <br />
Title="ColorControlApp" Height="300" Width="300"><br />
<br />
....<br />
<src:ColorPickerControl HorizontalAlignment="Center" <br />
VerticalAlignment="Center" Name="lstColorPicker"/>
This is how you would use a custom control (from another project) in a XAML page. If it were in the same project, we would not need to specify the assembly: part, but rather would fully qualify the clr-namespace: to point to the control in the current project. Read about clr-namespace: and assembly: youll get it. You're a bright lad.
Have a play with BLEND, its a great product.
PS : Microsoft are moving too quick, last count it was something like
Expression Blend BETA
Expression Blend BETA 2
Expression Web
Expression Design
Sliverlight Alpha
Visual Sttudio Orcas BETA
Visual Sttudio Express C# Orcas BETA
Visual Sttudio Express VB Orcas BETA
Visual Sttudio Express WEB Orcas BETA
LINQ
Microsoft Surface
Of which ive tried about 5. Have you seen Microsoft Surface, if not go here youll love it
-- modified at 3:33 Thursday 7th June, 2007
-- modified at 5:01 Thursday 7th June, 2007
Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
My Blog : sachabarber.net
|
|
|
|
|
It seems like we have more than one winner this month!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Why dont you enter in my profile and take a look to my other articles? Maybe you get a surprise.
|
|
|
|
|
So you are the mastermind behind these controls.
Thanks for willing to share and explain!
And will they ever get grouped into 1 library?
It's good that you release them as separate articles but will there be some project where eventually all your components will be in and then get updated as one package? Or merge them with Ascend.NET or...
Tnx,
Nick
|
|
|
|
|
It would be great indeed for them to be grouped, in a way integrated to the VS Studio. Of course it would be great for it to remain free too
|
|
|
|
|
Yes - this is superb! I can't believe you've made such excellent code free - thnx!
|
|
|
|
|