WPF text entrance and exit transition effects - c#

I want to create a WPF program with some nice effects (especially enterance and exit effects) for some text inside application.
I know transitionals library, but it doesn't have professional effects! (and some professional ones in that library are slow and laggy...)
Actually, I want some effects like effects in Microsoft Powerpoint 2010...
Is there any library or something to have such effects?

Yes - there are several pixel shader style effects libraries. WPFFx is probably the most widely known one at http://wpffx.codeplex.com/.
Note: the site says "This requires .NET framework 3.5 SP1 and requires Direct X SDK at compile time.. (to build the PS files)." You will need to verify it works if you are running a later version of .NET.

Related

Blueprism-like spying and bot development

Blueprism gives the possibility to spy elements (like buttons and textboxes) in both web-browsers and windows applications. How can I spy (windows-based only) applications using Python, R, Java, C++, C# or other, anything but not Blueprism, preferrably opensource.
For web-browsers, I know how to do this, without being an expert. Using Python or R, for example, I can use Selenium or RSelenium, to spy elements of a website using different ways such as CSS selector, xpath, ID, Class Name, Tag, Text etc.
But for Applications, I have no clue. BluePrism has mainly two different App spying modes which are WIN32 and Active Accessibility. How can I do this type of spying and interacting with an application outside of Blueprism, preferrably using an opensource language?
(only interested in windows-based apps for now)
The aim is of course to create robots able to navigate the apps as a human would do.
I guess you are using selenium for web-browsers
There is also some projects for windows based applications working with a Windows Driver.
Take a look to the project on github, it may be what you are looking for.
https://github.com/2gis/Winium
https://github.com/microsoft/WinAppDriver
Autoit: https://www.autoitscript.com/site/
It also comes with an identify mode for application elements and is has a big community
There is a free version of Blue Prism now :) Also Blue Prism uses win32, active accessibility and UI Automation which is a newer for of the older active accessibility.
To do this yourself without looking into Blue Prism you would need to know how to use UIA with C#/VB.new or C++. There are libraries however given that Blue Prism now has a free version I would recommend using that. Anything specific can be developed withing a code stage within Blue Prism.

Win CE 7 application development

I have requirement that we need to develop a rich UI application(similar to WPF or silverlight). The target device is having embedded OS Win CE 7. how can i achieve this, after so much R&D i got to know that
1. we have to user Silverlight for GUI and C++ as backend coding
2. we can create the MFC application using some third party SDK we will not be able to get rich UI
Also, i read that we can add components in WIN CE 7 for compact framework.
Is my above understanding correct, can someone throw some light on this?
Just to add my 2 cents to Chris and Paolo's replies, if you are not building the OS image for the target device or, at least, can't control the features it supports, your choice may be limited by the set of components that were included into the OS image provided with the device.
Windows CE is highly componentized and both the badly named "Silverlight for Windows Embedded" (XAML) and .NET Compact Framewor runtimes can be left out of the OS image to save storage space and memory.
The XAML runtime can leverage graphic acceleration (if the HW you are using provides it and the BSP includes drivers to use it, of course) and this may lead to a more responsive system, compared to a full .NET implementation.
I would also try to stay away from MFC for new implementation. The only good reason to use MFC is that you already have an UI framework that fit your needs and is based on it.
Currently on CE you can decide between an easy to design and rich UI with complex to develop and debug code-behind (XAML) or an easy to develop .NET application with an ugly windows 95-like UI that require lot of work to be "beautified". XAML in the hand may merge the best of both worlds (requiring additional cost and two heavvy runtimes on your target, but this may not be an issue if you have a powerful x86 machine or a graphic accelerated ARM Cortex).
To develop application on WEC 7 you need an SDK built from OEM that give you the target board.
If you want to develop on a Virtual PC image you need Platform Builder to use CEPC BSP and create an O.S. image and the corresponding SDK.
After that, you can develop using Silverlight only with C++ but you can use .Net Compact Framework and managed code for Windows Forms development.
Paolo.
It really, really depends on both your definition of "rich" and the graphics capability of the hardware you're targeting.
CE 7 supports the .NET Compact Framework. Many people will say that you can't do "rich" UI in the CF, but that's not really true. You can't do it with the standard controls, but if you do your own custom control drawing, you can do pretty well. Yet, it's a lot of work, but it can be done. The limitations here are in alphablending (not fun to get working) and animation (also not fun), but with dedication you can work around many issues.
CE 7.0 also supports "Silverlight for Windows Embedded" (a.k.a. SWE). First thing to know there is that it's really not Silverlight. It's a XAML rendering engine, but any other Silverlight assets you might have won't work with it.
SWE supports only C++, though since it is COM based, it can be wrapped in CF classes and then used from managed code. I've seen a couple of companies do this, and one even offers it as a product.
MFC is available, but since MFC was crap even 10 years ago, I definitely wouldn't use it today. If you want to use C++ but not SWE, there are better options than MFC. STL and WTL come to mind for windowing apps.

wpf app invisible remotely (via radmin)

I've built a little WPF utility that watches a serialport and visualises monitoring information with WPF. It works fine, but a colleague just tried using it from another machine via radmin and my app is completely invisible! if you're at the machine you see it, if you view it via radmin you see the same screen but no app. Instead you see the app behind it (in this case windows explorer), but can't click on anything in the space where my app is.
Has anyone else come across this before??
It sounds like you need to upgrade to .NET 3.5 SP1.
On .Net Framework 3.5 SP1
We now remote as bitmaps in ALL cases.
The reason is that WPF 3.5 SP1 now
uses a new graphics DLL (wpfgfx.dll)
and certain changes could not be made
to Vista’s existing graphics DLL
(milcore.dll) that is also used by
DWM. Although this could be seen a
regression at first, depending on the
complexity of the application scene
(e.g. very rich scenes) this can
actually improve performance in
certain scenarios . Also, connections
with reasonably high bandwidth and
scenarios that don’t involve a lot of
animation or 3D, for instance, tend to
remote just fine via bitmaps.
Source
Checked the framework and it was already 3.5 SP1.
It's ok via RDP, so my colleague is happy. It just seems to be radmin, which I'd never used before and don't see the need for.

Vector Graphics on Windows Mobile

I have to make an application that runs on both Windows (XP/Vista) and Windows Mobile. The graphics interface must be scalable (for different resolutions) and the controls must be custom (like the ones usually found on music apps).
SVG was my instant choice but the lack of support on Windows Mobile pretty much kill my time budget. I've tried to evaluate WMF and it seems the right answer but i don't really like it.
I was thinking about WPF/XAML but i don't know what are the differences between Windows and Windows Mobile.
The project must be in C# or C++ and it's a commercial project (thus no GPLed libraries).
What would be the best choice? What ma I overlooking?
WinForms has limited support for scaling:
http://sellsbrothers.com/writing/winformsAutoScaling.htm
You may also want to look at "anchor" and "docking":
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-6165908.html
Combined together you should be able to create a UI that works for both desktop and mobile.
You can do scaling UI in .NET compact framework, like Erwin said with docking and achoring. In the windows mobile applications i have written i do normaly have to write some custom code that deals with things like Font scaling ( Touch founds might need bigger Font then system default if the text should be clickable).
I dont think your going to get it to scale picture correctly without code, i found some question releated that on this site. In my experience i write 99.9% of my code so it runs fine on both windows and windows mobile, but i do make a different UI for windows mobile.
If normaly write code in .NET 2.0 / .NET 2.0 Compact Framework, but if your you dont care about having to install .NET 3 then it should be better ( .NET 2 is wider spread out then .NET 3 )
Another option is the Qt library which is written in C++. It is LGPL which means that it can be used in commercial products without having to release your sources (except for changes to the library itself). If for some reason that isn't good enough they also sell commercial licenses.
It runs on Windows and Windows Mobile. As a bonus if you do a reasonable job of programming (and assuming everything else you're doing coding wise supports it) your application can also be run on Mac OSX, Linux and S60.
It has support for Scalable Vector Graphics, a Canvas with full widget support and a bunch of other nifty features as well! I'd suggest checking out the documentation and seeing if it has everything you need.
Silverlight?

Howto draw "pages" in a C# WinForms project

I want to display data on a Windows Forms project in C#.
The general sketch for the GUI is similar to Acrobat Reader or MS Word - meaning i want to display the data on several pages, and let the user navigate between the pages. The data i`m displaying isn't special, i just want to give the user a "page" feeling when viewing it.
I`m searching for a good starting point, preferably open-source.
I thought about using some kind of a reporting tool, such as Crystal Reports, is that a good idea?
Also, is better to use WPF then WinForms for this?
Any thought and recommendations are welcome.
Thanks.
It sounds like you would be better off going the WPF route. You have MUCH better control over how your "form" looks.
What you would want to do is define each "page" in a user control or something, then you can display each one however you like. WPF can handle the zooming for you, all you have to do is hook it up (look into transforms). I can't see WinForms doing this. I would suggest looking at this project on codeplex.
If this project is just for fun, and if you already are using Visual Studio 2008, then WPF is a good choice for this.
If you intend to make this a commercial project, however, I would recommend making it a WinForms application. WPF requires Visual Studio 2008 and .Net 3.5. Many Windows users (especially corporate customers) are still using .Net 2.0 and don't plan to upgrade soon. Some are even still on .Net 1.1 (or no .Net at all). .Net 2.0 comes pre-installed now on new PCs, and the installer for 2.0 is only 23 MB (versus close to 200 MB for the somewhat-buggy .Net 3.5 installer). Also, .Net apps can (potentially) be made to run on Mac, Linux and the iPhone thanks to Mono, but Mono now is somewhere between .Net 2.0 and .Net 3.5, so WPF applications can't be cross-platform yet.
Here is a previous answer to a sort-of-similar question about doing a zoom effect in .Net with GDI+:
Auto sizing zoom on an image in .NET
This should give you a start on doing this kind of graphics work in .Net (and it's as open source as it gets).
Update: If you want to render XPS documents (easily), then you should use WPF. However, this choice would effectively eliminate the possibility of making your application cross-platform via Mono, at least in the short-term.
An alternative would be to export your documents as PDF files, or use Adobe Acrobat to convert your XPS documents into PDF files. Here is a link to a CodeProject sample that renders PDFs entirely in C#/.Net 2.0 or older:
http://www.codeproject.com/KB/showcase/pdfrasterizer.aspx
This code would allow your WinForms application to render a PDF file as a collection of Bitmaps (one for each page), and from there it's a relatively simple matter to display these Bitmaps in the manner you describe (with zoom and everything). Because the project would use .Net 2.0, it should work in Mono without any modifications.
TabControl doesn't do what you want?
It sounds like what your trying to do is make an application behave like a web page. Would just adding a WebBrowser control suffice ?

Categories