Design workflows for WF4 in Silverlight - c#

Our system is based on flows and activities and we want to give the analysts users the opportunity to create dynamics flows (at runtime). The designer UI based on SL 4.0 .
It looks like WorkflowFoundation is the most valuable solution but we didn`t find any WF version that fits to SL (to create the xaml in SL).
Any ideas? any other capable engines?

The standard workflow designer is WPF and doesn't work in silverlight. Creating a similar designer will be quite a bit of work. However a simplified designer might do the trick and as a workflows is just xaml which is just XML generating that should be no problem. I guess it depends on the flexibity required.
I am not aware of any 3rd party alternatives out there.

Neither WF3 or WF4 execute within the Silverlight client. This includes the designers.

Update: Check Here , it might do the job.

Related

System.Windows.Automation is extremely slow

System.Windows.Automation is EXTREMELY slow.
I execute:
element.FindAll(TreeScope.Children, Condition.TrueCondition);
Obtaining only 30 child elements may take 1000ms on a very fast computer.
I have even seen it hanging forever while getting the child elements of a Tree in a QT application.
Is this a known problem?
I cannot find any usefull answer after googling a lot.
System.Windows.Automation is EXTREMELY slow.
System.Windows.Automation is full of bugs. It may not return all children of an AutomationElement, which is a very severe bug.
Apart from that the implementation is not thread safe.
System.Windows.Automation is deprecated. Do not use it!
In the MSDN you find the following note:
UI Automation was first available in Windows XP as part of the
Microsoft .NET Framework. Although an unmanaged C++ API was also
published at that time, the usefulness of client functions was limited
because of interoperability issues. For Windows 7, the API has been
rewritten in the Component Object Model (COM).
Although the library functions introduced in the earlier version of
UI Automation are still documented, they should not be used in new
applications.
The solution to slow performance is to use the new IUIAutomationElement COM interface instead of the old System.Windows.Automation C# interface. After that the code will be running lightning fast!
Apart from that the new interface offers much more patterns and Microsoft is extending it continously. In the Windows 10 SDK (UIAutomationClient.h and UIAutomationCore.h) several patterns and properties have been added which are not available in the .NET Automation framework.
The following patterns are available in the COM version of UIAutomation which do not exist in System.Windows.Automation:
IUIAutomationLegacyIAccessiblePattern
IUIAutomationObjectModelPattern
IUIAutomationAnnotationPattern
IUIAutomationTextPattern2
IUIAutomationStylesPattern
IUIAutomationSpreadsheetPattern
IUIAutomationSpreadsheetItemPattern
IUIAutomationTransformPattern2
IUIAutomationTextChildPattern
IUIAutomationDragPattern
IUIAutomationDropTargetPattern
IUIAutomationTextEditPattern
IUIAutomationCustomNavigationPattern
Additionally the following Control types have been added:
AppBar
SemanticZoom
Additionally the following Element's have been added:
IUIAutomationElement2
IUIAutomationElement3
IUIAutomationElement4
And what concerns the bugs: The new COM UIAutomation Framework is very well designed and I could not find bugs on the client side of the framework which is a great progress compared to System.Windows.Automation. But several missing features and even bugs on the server side of the framework. On the server side each GUI framework must implement an UIAutomation provider (see MSDN: Interfaces for Providers). So these problems differ depending on what type of application you are automating because each GUI framework has it's own problems:
In the Native Windows GUI features are missing: Lots of controls do not implement the patterns that they should implement. For example a SplitButton in a native Toolbar should implement the Invoke pattern to click the button and the ExpandCollapse pattern to open the drop-down menu. But the ExpandCollapse pattern is missing which makes it difficult to use SplitButtons. If you obtain a Toolbar SplitButton by IUIAutomation->ElementFromPoint() and then ask for it's parent you will get a crippled element. And the Pager control cannot be automated at all.
Also in WPF applications there are controls that are implemented buggy by Microsoft: For example if you have a Calendar control you see two buttons at the top to switch to the next/previous month. If you execute the Invoke pattern on these buttons you will get an UIA_E_NOTSUPPORTED error. But this is not a bug on the client side of the framework, because for other buttons the Invoke pattern works correctly. This is a bug in the WPF Automation server. And if you test IUIAutomationTextRange with a WPF RichTextBox, you will find that several commands are not implemented: Select() and ScrollIntoView() do simply nothing.
For .NET Forms applications Microsoft did not make much effort to support them. The .NET Calendar control cannot be automated at all. The entire control is not even recognized as Calendar. It has the ControlType "Pane" with no child elements in it. The same applies to the DateTimePicker. And for complex controls like DataGrid and PropertyGrid the only implemented pattern is LegacyIAccessible which is a poor support. These controls should implement at least the Table and the Grid and the ScrollItem pattern.
Also Internet Explorer cannot be automated because elements outside the visible area cannot be scrolled automatically into view due to missing coordinates. (The Bounds are returned as an empty rectangle) And the ScrollItem pattern is not implemented. (Yes, I know that Internet Explorer has been replaced with Edge in Windows 10, but the UIAutomation framework exists since Windows 7 and Microsoft did not implement a usefull automation support in Internet Explorer in all these years)
I saw even complete crashes of the automated application. For example Visual Studio and TotalCommander will crash if you execute certain automation commands on a certain control. Here - once again - the bug lies in the server side implementation of the framework.
Summary: We have a great framework with limited usefullness. The Microsoft team that developed the new UIAutomation framework did a great job, but the other areas in Microsoft (the native GUI, WPF, .NET and Internet Explorer team) do not support this framework. This is very sad because only a small effort would have to be made to offer a better functionality. But it seems that the users who use UIAutomation in the first place (handicapped people) are not a profitable market.

How can I copy the Win8 metro File Picker UI

I'm creating a Windows 8 metro style application for navigating a rest api which is essentially the same as a file system. I would like to use the same UI as you get with the File picker and the built in search results.
How can I get the XAML (or ideally XAML+code) used in this UI? Are there any samples? Could I use a tool? Is the code available anywhere?
Thanks,
Jon
The FilePicker is provided as an OS piece of UI that is common across all the WinRT dev environments. There is not any source or XAML available for it.
Just build it, right? The UI is so simplistic, that I think an hour and some TLC and you will have what you want. You can't get the raw XAML as it's in the OS itself, but you don't want it anyway - it's certainly implemented with more complexity than you want or need.
I would offer this one bit of advice. It makes sense to copy the general look of the file picker for the sake of usability. However, do yourself a favor and make something different. There's no reason the user should be confused by the similarity - wondering where their SkyDrive is or something else. You may have already thought of this.

What is name of this component

Please say name of this component and does c# have it?
As others have suggested, this is commonly called an Outlook Bar after it's most famous usage in the Microsoft Outlook application.
Something similar is available in most third-party control suites, but if you're looking for something that is free and easily customizable, you might check out the OutlookBar control available on CodeProject:
The control itself is pretty simple, and implemented entirely in managed C# code as a UserControl.It should work under all versions of the .NET Framework back to 1.1, and is painless to integrate into your application. Best of all, with the source code freely downloadable, it's infinitely customizable to fit your specific needs!
I think it is called accordion, at least in jQuery.
And I do not know of any such in the basic controlles that comes with c# but I am cetrain that there are many 3:rd party components like this.
ComponentArts or Telerik are the first that comes to mind.
In WinForms, this is called an Outlook Bar or Navigation bar.
Most (if not all) third-party control suites, such as DevExpress, offer it.
I think its name is Accordion and it doesn't exists natively on Windows Forms Architecture.
Accordion ? Try searching among different control toolkits - there should be an implementation.

Can I use silverlight to replace javascript and JQuery?

I have a webapplication that heavily uses JQuery. I would like to start using silverlight in its place if its possible. Instead of using jquery ajax features and other jquery features I would like to use silverlight. is this possible to do with silverlight?
Different tools. jQuery is best for manipulating the DOM. Silverlight is (ostensibly) best for rich internet apps, not manipulating the DOM. If your web application tries to create a cool UI using JavaScript, Silverlight might be a good fit to replace tons of JavaScript code.
If you application uses JQuery now replacing it with Silverlight will most likely not only entail redoing your JQuery features but also any HTML, CSS, forms processing and really everything about your application depending on what it does and how it is current designed.
I agree with Jonathon, they are really are two different tools.
Thanks.
Nick
nickgs.com
Technically, Yes.
But you must understand that you will have to rewrite all your application from the bottom. Microsoft propose the RIA Services as the best practice design to use with Silverlight but with this will make you change all your design and even the Data layer.
So the answer is Yes. But you would better stick with jQuery.
#Luke101, you can design an whole website using Silverlight no probs. The question though is what is your target audience?
Silverlight doesn't come shipped with the browsers as yet so a lot of computers don't have it yet and so need to download it.
Given the amount of paranoia out there I think people are a little hesitant to download something when a broswer asks you to.
The environment you'll be working in i don't think will be HTML any longer and you'll be working in xaml.
Also consider your target browser. There are still a lot of people using <gasp> IE6 and i'm not sure if SL will run on it.
What is the motivation behind moving to SL? If it's because it looks cool, don't forget a lot of that comes down to design and if you're not a design person you're likely to make a bigger hash of it than if you were working in HTML.
You may also want to look at how you integrate with a designer. I know MS Expression is designed to make the job easier but it's still an early product. Also, does your designer know about Expression or Blend and know how to use it?
What I'm getting at is there is a large learning curve here which equates to someones money and you may not see anything for some time.
Yes.
Silverlight runs in the browser, jQuery (JavaScript) also runs in the browser. So they can technically replace each other, assuming all the functionality you want in one exists in the other (including support in various browsers).
Yes. Silverlight with RIA services can replace a jQuery AJAX site. Depending on the site's features, you may even be able to break up the features of the site into silverlight "widgets" for individual functionality. The danger is that Silverlight can quickly balloon into an application that is difficult to update (though it will guarantee cross browser compatibility). Silveright is entering version 4 and it's still not finished yet, so it's changing rapidly.

What is the best 3rd party GUI framework for application development in C#?

Examples could be Infragistics or DevExpress.
But I'm also looking for your opinions on other frameworks. It could even be WPF if that is your favorite.
Infragistics is very good. I think they have a better product for windows than the web. However, I get very upset using their products sometimes. I just want to find some hidden property, and it is impossible to find. They have way to many properties. Sure, you can do anything with their grid, but it should be easier. All of these vendors are leap frogging each other. You really have to compare all of them every year or two. I am currently using Infragistics on most web and windows project. If I could switch today, I would go to DevExpress for Web and Windows. Everything that Mark Miller and the guys at DevExpress produce is beautiful, and thoughtful. On a side point, you should check out CodeRush and Refacter. I may sound like a salesman, but I am not. I just could no longer code without CodeRush. It would feel like coding with one hand. If you are going to spend $1000 or more on a framework, you should also get CodeRush.
I've used Telerik RAD Controls for Asp.Net and it is a very comprehensive suite of controls that are easily converted to AJAX. The support is top notch, with the forum as a first place to go to for research before contacting the staff.
The client side API is fairly easy to understand, and they have good examples of mixed implementations with client and server side code.
I would say Infragistics
Haven't used it before, but I've heard good things about Telerik. My experience with the Infragistics Web components has been less than stellar. I found there were a lot of hidden features that I required, which were undocumented and had to go hunt around in the sample code for examples.
These toolkits can make sense for intranet applications but when you start providing it out on the web, the functionality can come at the cost of a bigger download for users. Just something to keep in mind.
What frameworks are you looking for? I currently use Janus Grids for grids on the winform side, but DevExpress has an awesome web grid that is amazing.
For current Winforms development my favorite is Infragistics. DevExpress seems to have more Silverlight controls in the works, but Infragistics may deliver.
I don't do much non-web development, but if I do I like to use gtk# for Mono (screenshots). It's much more fun and very easy to program then winforms. WPF looks good to, but I only tried an Hello World.
Infragistics has got good controls for Applications. WinGrid is one of the most important ones which would help you displaying information professionally and is quick.
the only drawback is the time consuming process of contacting their helpdesk or searching for the hidden properties. But they do work after you get to know them !
I would say go for DevExpress seems to be the most elegant, intuitive and well document suite out there.
To see their product offering in action demos.devexpress.com
Do the same for any component suite check out their demos and see which best suit you needs.

Categories