Are there any WPF projects?

As part of my ongoing attempt to come to terms with WPF / XAML, I became interested in using smooth interfaces for coding the user interface.

I am aware of Fluent Silverlight ( http://code.google.com/p/fluent-silverlight/ ), but I cannot find anything equivalent for WPF.

As a personal note, it is very difficult for me to buy everything in a combination of XAML and C # / MVVM. It just seems to me that there are some aspects of user interface programming (e.g. data binding) that are better expressed in code than in declarative XAML.

The free WPF interface seems to be just an achievement of these goals.

+2
interface wpf silverlight fluent
Aug 28 '09 at 14:05
source share
3 answers

Free API for creating teams in WPF http://code.google.com/p/present/

+1
Sep 07 '10 at 10:16
source share
— -

In a recent Herding Code podcast: http://herdingcode.com/?p=212, one of the guests discusses that they tried to create a user-friendly interface for creating WPF user interfaces. Perhaps one of them could do what they did.

By the way, this same podcast and the one that was in front of it ( http://herdingcode.com/?p=208 ), talk about your problems with the first and first code, why is it profitable to focus on xaml.

The arguments mainly concern the creation of user interfaces "Blendable" (the possibility of their development in Microsoft Expression Blend) by the designer in addition to the testability of your code. A code-based approach reduces this ability if you are not very careful.

You are not alone in your fears. I hope these podcasts help you make a decision.

+2
Aug 28 '09 at 17:43
source share

As I come across parts of WPF that I prefer to run fluently, I add helper extension methods to my personal assembly.

For example, here is a program that demonstrates the properties of TaskbarItemInfo ProgressValue and ProgressState . This version is written in a standard fuzzy way.

 using System.Windows; using System.Windows.Controls; using System.Windows.Shell; namespace TaskbarItemProgress { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); TaskbarItemInfo = new TaskbarItemInfo(); TaskbarItemInfo.ProgressValue = 0.5; var stackPanel = new StackPanel(); Content = stackPanel; var normalButton = new Button() { Content = "Normal" }; normalButton.Click += (s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Normal; stackPanel.Children.Add(normalButton); var pausedButton = new Button() { Content = "Paused" }; pausedButton.Click += (s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Paused; stackPanel.Children.Add(pausedButton); var errorButton = new Button() { Content = "Error" }; errorButton.Click += (s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Error; stackPanel.Children.Add(errorButton); var indeterminateButton = new Button() { Content = "Indeterminate" }; indeterminateButton.Click += (s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Indeterminate; stackPanel.Children.Add(indeterminateButton); var noneButton = new Button() { Content = "None" }; noneButton.Click += (s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.None; stackPanel.Children.Add(noneButton); var increaseButton = new Button() { Content = "Increase" }; increaseButton.Click += (s, e) => TaskbarItemInfo.ProgressValue += 0.10; stackPanel.Children.Add(increaseButton); var decreaseButton = new Button() { Content = "Decrease" }; decreaseButton.Click += (s, e) => TaskbarItemInfo.ProgressValue -= 0.10; stackPanel.Children.Add(decreaseButton); } } } 

Here is the free version:

 using System.Windows; using System.Windows.Controls; using System.Windows.Shell; using FluentWpf; namespace TaskbarItemProgress { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); TaskbarItemInfo = new TaskbarItemInfo(); TaskbarItemInfo.ProgressValue = 0.5; Content = new StackPanel() .AddChildren( new Button() { Content = "Normal" } .AddClick((s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Normal), new Button() { Content = "Paused" } .AddClick((s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Paused), new Button() { Content = "Error" } .AddClick((s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Error), new Button() { Content = "Indeterminate" } .AddClick((s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Indeterminate), new Button() { Content = "None" } .AddClick((s, e) => TaskbarItemInfo.ProgressState = TaskbarItemProgressState.None), new Button() { Content = "Increase" } .AddClick((s, e) => TaskbarItemInfo.ProgressValue += 0.10), new Button() { Content = "Decrease" } .AddClick((s, e) => TaskbarItemInfo.ProgressValue -= 0.10)); } } } 

The free version uses two extension methods, AddChildren (instead of Children.Add ) and AddClick (instead of Click += ... ).

The program is as follows:

enter image description here

I keep my personal FluentWpf library on github .

+2
Apr 19 2018-12-12T00:
source share



All Articles