This Blog


Favorite Posts


October 2009 - Posts

  • Sneak peek: More fun with colors and themes in WPF

    Last week I published a blog post showing off our new color scheme customization dialog in WPF, with only a single example: blue to pink.

    Well, Mike, our lead graphics designer, positively chortled with glee, locked himself in the office for 30 minutes with the app (and it was his turn to fill the coffee maker as well) and came out with these. I think their naming took longer than creating them. I present them with no comment, apart from saying they possibly still need some tweaks.

    However, I just have to say that these new examples are a direct reflection of just how easy it is to use the color scheme customization dialog. Especially if you're Mike.



    Dark Side:


    Lilian (very similar to our WinForms skin of the same name):


    Soft Green:


    Old Windows:


    Windows Se7en:


  • Sneak Peek: Drag-n-drop, dialogs, more formats with the rich text editor in WinForms

    Part of a series on the new features appearing in DXperience v2009.3. This time around let's delve into the myriad new features of the XtraRichEdit control. This is going to be a long one, sorry in advance for taxing your broadband connection...

    First on the (alphabetical) list is drag and drop. We'll start off with an animated GIF showing drag-and-drop working from within the control. It works just as you'd expect: select some text, click within the selection and, without releasing the mouse button, drag the text to a new position and drop it there.


    Next up in the same vein is dragging files into a rich text editor. First in this set of examples is dragging an OpenOffice file:


    Second is dragging an RTF file:


    And last, but not least, dragging a DOCX file.


    Of course, drag-and-drop wouldn't be complete unless we could drag and drop rich text from, oh, say, Microsoft Word?




    Now if you'd been paying attention there with the drag-and-drop images you'd have noticed something new, so this formal announcement won't be a surprise: we now support the OpenOffice format:


    Another format we've added support for is the WordprocessingML format (a.k.a. the Word 2003 XML format):


    Third on our big list of new features are some essential standard dialogs. (And surely it goes without saying that all the new dialogs use the current application skin.) First up is the standard bullets and numbering dialog:

    bullets and numbering form

    Of course, you really want the ability to customize the bullets:

    customize bulleted form

    And the numbered list as well:

    customize numbered form

    On the twelfth day of DevExpress Christmas, Rachel gave me the chance to win a 12 month subscription for DXperience Universal so I can get all of my 12 Christmas wishes: http://is.gd/5hkp2

    Having done those two, we also added the ability to customize the numbered levels used in outlines:

    customize outline numbered form 

    Another standard dialog I've been waiting for is the Insert Symbol dialog (warning: we threw in a gratuitous Comic Sans reference in the image):

    insert symbol - 1

    insert symbol - 2

    Fourth in our big list of features is something else you may have spotted already: support for hyperlinks. This comes with its own standard Edit Hyperlink form:


    Once you have a hyperlink in your document, you can hover over it and get a standard tooltip. Also the context menu shows editing actions you can make with a hyperlink:


    A very nifty hyperlink-related feature we added is the ability to run a "macro" as the target of a link. A picture is worth a thousand words (and an animated one at least double that): here clicking on the hyperlink ">>Deadline Date<<" shows a form that allows the user to set a date. The result of that form replaces the hyperlink text.


    Finally, another feature you should have noticed by now if you are already a user of our WinForms rich text editor: rulers. Note the rulers support showing and adding margins, indents, and tabs.



    As you have seen, some remarkable new features for the XtraRichEdit control for v2009.3.

  • Sneak Peek: custom tooltips with ASP.NET scheduler

    This is part of a series of blog posts in the new features in DXperience v2009.3. This time it's the turn of our ASPxScheduler control.

    We've added the ability to create custom tooltips with ASPxScheduler. Here's an animated GIF showing the feature in action, creating and deleting an appointment.


    On the second day of DevExpress Christmas, Rachel announced the name of a new WPF control

  • Using the .NET 4 Client Profile

    With beta 2 of Visual Studio 2010 and .NET 4 came a lot more information about the ".NET Client Profile". This is an (admittedly large) subset of the full .NET Framework that targets "desktop client" applications. Because it's a subset, it's by definition smaller than the full thing and so would appear to be more palatable a download for those Windows PCs that don't have a copy of .NET 4 (which at launch will be everybody, of course). The .NET 4 Client Profile will be downloaded onto people's PCs using Windows Update.

    PlasticBlocks So, the pros are simple: smaller download; if you chain to the .NET installer in your installer, a smaller overall installer; by reducing the set of functionality in the client profile, a smaller possible attack surface; er and that's pretty much it. Shorter version: it's more compact.

    The cons? Well, if you create a desktop client (a WinForms or a WPF app), you will have another step to go through, another decision to make, in your design and implementation: which profile does your app target? The client profile or the full framework? By default, VS2010 will create a new project to target the client profile and not the full framework (unless it's a Class Library, in which case you'll be targeting the full framework). Note that I said project there and not solution. It seems it's valid to have mixed-profile solutions, although Microsoft do warn of possible build errors and/or run-time errors if you do so.

    If a user runs an application compiled for the full framework on a PC with only the client profile installed, they will get a dialog prompting them to download the full .NET framework. If an application compiled for the client profile runs on a PC with the full framework installed, it just works. If the application targets the client profile, but a class library within targets the full framework, and it is run on a client profile PC, you'll get an exception. Welcome to more "works on my machine" fun.

    So what's not in the client profile? What's been taken out? Developer-oriented code (design-time stuff especially); the Oracle client (it's being deprecated anyway); the design time libraries for EF and ADO.NET Data Services; ASP.NET; ASP.NET AJAX; Workflow rules integration; WF3 and WF3.5. Of course, having seen that list, you won't be surprised to learn that you'll be developing in VS2010 using the full framework; no .NET Framework "lite" for us developers.

    Sounds fairly innocuous right? As Microsoft put it, "most" client desktop apps should function perfectly well with the reduced functionality of the .NET 4 Client Profile. I would tend to agree; however, we've already found problems with that broad statement.

    Let's take a look. In essence, if nothing changed in .NET 4 between now and release (that is, the client profile functionality doesn't change, or we don't rewrite some of our assemblies), the way it stands at the moment you would be forced to target the full framework with your app that uses DevExpress components and controls. There are three main reasons:

    • We use System.Design.dll for some run-time related code, mostly related to attributes for serialization, type converters, localization, and the like. We use serialization all over the place to serialize information in charts, reports, bars, ribbons, what have you. This particular limitation is not too difficult to get around.
    • We use System.Web.dll. Before you wonder why on earth anyone would use web-related things in a client desktop app, consider this. We use common assemblies that span platforms (indeed, I was celebrating the fact in a recent blog post) and for the ASP.NET side, we use System.Web. In fact there's one type in particular we use a lot in these common assemblies: PersistenceMode.
    • Another use for System.Web.dll is in our export functionality in XtraReports, in particular the export to HTML. Rather than write our own classes, we've reused the ones in System.Web.dll. You know: reuse rather than copy/paste.

    Now, of course, these limitations can be circumvented by writing new code and modifying what's there. However, in doing so, we would necessarily break a lot of customer code. A lot. Also, there's no possible way for us to split and maintain our codebase in two parts, one for VS2005/2008 and the other for VS2010 and later. That way madness lies.

    In conclusion: at present we're investigating the issues that we see with .NET 4's Client Profile and how we can best mitigate them. I have a question for you though: would you prefer writing desktop apps that targeted the Client Profile (and therefore must have "client profile ready" controls), or do you not care in the slightest?

    (For more information on the .NET 4 Client Profile, see this blog post.)

  • Sneak peek: Fun with colors and themes in WPF

    On the eleventh day of DevExpress Christmas, The XtraRichEdit Team gave me drag and drop functionality! We know that creating a new theme or skin is a very long-winded and tedious process, even with a skin editor such as the one we provide with our WinForms controls. But, generally, you don't want to create a brand new theme, you just want to take a theme that you already have and then just tweak the colors, say from a predominantly blue color to a green one or a pinkish one. Well, the WPF guys as part of their general work in providing themes for our WPF controls have come up with a rather nifty little tool for doing exactly that. It has been enabled in most of our WPF demos, so you'll be able to see it in action once you get v2009.3.

    Here's an image of the tool itself. At the moment it's called the Color Scheme Customization Dialog, but that's a little unwieldy for a name and we may change it by the time we ship.


    At the moment, it's only activated for the Office 2007 Blue theme. Here's an example of it in use. First I'll show the standard Office 2007 Blue theme in the DXGrid demo:


    And a quick spin of the color wheel later, a pink version:



    PDC 2009 sponsor logo

  • DevExpress Newsletter 13: Message from the CTO

    Reprinting my Message from the CTO from the twelfth newsletter so that you may comment on my thoughts. Am I prescient or just nuts?


    After the rather controversial topic of the last newsletter's Message, I promised Joe Hendricks, one of our DXperience Universal customers, on Twitter that I would talk about orange juice this time around.

    OJ choices When you go to the supermarket wanting to buy orange juice, what sways your selection of which one to buy? After all, not to put too fine a point on it, orange juice is just orange juice.

    Perhaps it's the brand you always buy. Perhaps you go for the one with lots of pulp, or the one with none at all. Perhaps you just choose the cheapest. Perhaps you peruse the label to see if it was reconstituted or not. Perhaps you like the added calcium variety. Perhaps you tried them all at one point in a blind tasting, and now just go for the one you liked the best. Perhaps you prefer a carton, or a bottle, be it plastic or glass. Perhaps you go for the ultra expensive juice that was fresh-squeezed on the farm during the dawn hours, with the dew still beading on the fruit.

    My point is that orange juice is a commodity. One juice is very much like another, so there are other considerations you take into account before you buy. I'd venture to say that it's the same with buying UI controls: they are also commodities.

    When you buy a control, say a grid, you are not just buying any old grid, you have other considerations. After all, grids are all pretty similar, when push comes to shove. So, you also consider things like your familiarity with the vendor, how long they've been in business, how often they issue updates, the documentation (in all the forms it exists), how well the technical support team deal with your questions, how open the vendor is, the ease with which you understand the API and the design, the ease with which your users enjoy using the control and find it intuitive, how flexible the design is, and so on. Maybe it's performance, or the "weight" of the grid rendered in a web page, or the availability of the source code, or a particular feature that makes you decide on a particular one.

    At DevExpress, we understand this situation clearly. That's why we not only try and create the best controls you've ever seen or used (biased, me?), but we also spend a lot of time on the supporting "infrastructure" for the controls: our support team, our documentation, our videos, our skins/themes, our regular updates and upgrades, our community efforts, our desire to make software development fun, DXSquad, our evangelists, our management team, and so on. You get all of that for free when you buy any of our controls.

    So, next time you need some orange juice, try DXperience.

    After I wrote this, I suddenly thought that the same thing also applies to software like iPhone apps. You want a kid's game for the iPhone? There are a bazillion of them: they are in every way a commodity. Which do you choose? The rating? Recommendation from a friend? The vendor? And so on, so forth.

    So, do you write commodity software? What do you do to make your software stand out from everyone else's in the same market?

    PDC 2009 sponsor logo

  • Drive-by vulnerability for Firefox users with the .NET Framework Assistant

    Great. Way back in August 2008, I mentioned that the .NET Framework 3.5 SP1 would install a plug-in into Firefox called the .NET Framework Assistant.

    Well it turns out it has a security vulnerability in a "drive-by and you're infected" scenario. The vulnerability uses a modified XBAP (XAML Browser Application) as the attack vector. It seems that Microsoft fixed IE during their Patch Tuesday this week, but apparently the problem is also present in the .NET Framework Assistant, which they didn't patch. ZDNet's story about it is here.

    So, Firefox fans: disable the .NET Framework Assistant now (Tools | Add-ons | Extensions | Microsoft .NET Framework Assistant | Disable). I've just done it for both my machines.

    PDC 2009 sponsor logo

  • Sneak peek: enhancements for charts in WPF in v2009.3

    The Charts team hit code freeze this week, ready for v2009.3, so we now know for certain what is going to be in the release. Consequently, feast your eyes on these new features for DXCharts for WPF.

    Firstly, we have titles for the axes in both 2D and 3D charts. Here's a 3D stacked area chart showing such a title on the y-axis, the values axis.


    Next up, we've added custom draw capabilities. To see this, here's an unadorned bar chart:


    Now we'll color the bars according as to whether the bar height is less than 1.0, between 1.0 and 2.0, or greater than 2.0:


    Note we're also changing the bar label as well.

    The third feature is support for empty points within a series (that is, data points with no values). Here's an area chart in 2D, with both the "Entertainment" and "Travel" series missing some data points:


    And here's a 3D area chart showing similar data:


    Fourth, we've added a Date/Time scale for the y-axis, the values axis. This example has the values axis displayed horizontally:


    On the tenth day of DevExpress Christmas, I had fun with colors and themes in WPF with Julian Finally, we've added the series point Tag property. This works in a similar way to the same feature in XtraCharts: you write a handler for the CustomDrawSeriesPoint event and the eventargs has the SeriesPoint object, whose Tag property you can now set. Here's an example, showing the legend being more informative than the x-axis labels.


    Stay tuned for more sneak peeks over the coming days and weeks.

    PDC 2009 sponsor logo

  • Another Aussie for DXSquad: @aussiealf

    DXSquad is our team of proven developers who are gracious enough to help us and our customers on our forums and in the wider DevExpress community. It's a rare honor to be invited into the ranks. (I'm not a member, for example, that's how difficult it can be to get in. Oliver, though, was a member but was forced to resign. We don't like to talk about it.)

    Today we invited Michael Proctor (aka @aussiealf on Twitter) to join DXSquad and he was swayed enough by the tin DXSquad badge (free shipping to mainland USA) to say yes. If you've not heard of him, it's because you don't frequent the XPO forum; for if you did, you'd know him extremely well.

    Welcome, Michael!

    PDC 2009 sponsor logo

  • Bad code is good for you

    OK, admit it. You've got an RSS subscription to The Daily WTF. Part of The Daily WTF's self-applied remit is the CodeSOD section (Code Snippet of the Day) whose premise is simple: developers enjoy a jolly good laugh at seeing someone else's badly written code. We read it with our fingers crossed, fervently muttering under our breath that we hope that one of our colleagues didn't just send up something we wrote last month. Even though some of the posts there ring false to me (no one can be that dumb, surely?), there's just enough posts that ring true that you continue to read and laugh.

    Of course we have all written bad code. The only person I'm sure hasn't is Donald Knuth, and that's only because he used to send out checks for $2.56 to everyone who discovered a bug. (I will note that the bug discoverers just used to frame said checks and hang them on the wall rather than cashing them. I certainly would have. Notice as well that I've never dared emulate him.) Bear with me when I say bad code is nonetheless good for you; I'll explain. 

    Apart from being clichéd, the saying "you learn from your mistakes" holds a metric tonne of truth. Think back to when you wrote an appalling bit of code. Yes, I'll agree the deadline was tight, or you were meeting that rather pretty young lady (or gentleman) from Accounting for drinks that evening, or your kids needed taking to practice, but, no matter what the excuse, you laid down some rather nasty code. Remember what happened when the inevitable bug report was posted? You investigated and saw with some horror what you had managed to write in that moment of distraction. If you're like me, you'd have broken out into a sweat and uttered WTF, uncompressed. Perhaps you were able to cover it up in layers of updates to the version control system, but almost certainly there would remain a record in the bug tracking system and then you would have had to walk past people in the hallway who would fall silent from their conversations and watch as you shuffled by.

    But I bet you never wrote code like that again.

    Here's another aphorism you'll recognize: you learn by doing. You can read all the books and blogs about TDD (test-driven development) and understand that it can help you write better software, but you won't viscerally "get it" until you actually practice what it says. Until that point, it's merely an interesting thought experiment. But I wonder how many mistakes you'll endure before you speculate about whether a test suite that you maintain and run regularly could actually save your bacon. And once you have a unit test suite, you'll be adding tests to it all the time. Your code will get better because it's being tested constantly. You'll be able to refactor whenever you want with the knowledge that your tests will cover you. You'll avoid the mistakes you've made previously, possibly making other, different ones that you'll be able to fix more quickly. 

    You see, we do have that need for bad code. It is only through bad code that we recognize that we need and should use better tools, algorithms, and methodologies. Bad software is everywhere; it permeates the applications we use every day, it irritates the heck out of us. But it forces us, as developers, to exert ourselves to write better code, better than that — time for another initialism, I think — POS software over there.

    Most of all, though, it takes bad code to help us appreciate good code and gives us a good laugh into the bargain.


Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners