• WPF: Read-only Dependency Properties

    Yup, awkward creatures but they do exist! :)

    To be honest I came across these only recently and decided to share this (potentially) valuable information as well -- you cannot use it if you do not know it's there.

    Why do we need read-only dependency properties?

    There is a certain brand of dependency properties within the WPF framework that are used primarily for state determination. Often multiple conditions affect certain control state thus calculating and setting the state value directly is not feasible and generally leads to unpredictable and inconsistent results.

    Here is an example -- the UIElement.IsMouseOver dependency property ...

  • WPF: The Static Nature of Dependency Properties

    With dependency properties being so heavily used across the WPF platform, there is a good chance that sooner or later you will get bitten by this issue my colleague Hristo Deshev and I were debugging not long ago. Some heads-up can't really hurt anybody so here it is;).

    We will declare a simple class Foo with a single collection dependency property (note that this is a reference type). We will also supply our brand new property with a default value through the convenient DependecyProperty.Register(...) method:

    staticDependencyProperties_foo1

    Let us put our class to the test by creating two Foo instances and adding ...

  • WPF Line Drawing and the Device-Pixel-(In)dependence

    As you are probably aware resolution and device independence is one of the fundamental design goals of WPF. In order to achieve the desired effect the framework does not work directly with physical (device-dependent) pixels but abstracts this notion into device-independent measuring units like inches.

    There are two main benefits that you get from this:
    • Automatic DPI-aware scaling
    • Sub-pixel positioning -- WPF coordinates use floating point numbers that theoretically give you the ability to draw with higher precision than the one provided by the ordinary pixel grid.
    However, there is one nasty side-effect related to the fact that WPF graphics ...
  • RadChart: Auto Text-wrapping

    Hello,

    With the Q1 2008 release date closing-in fast, I'd like to present to you yet another big improvement that will be introduced in the new version of RadChart -- automatic text-wrapping support.

    So what's it all about? 

    RadChart introduces automatic Notepad-like word-wrapping functionality for the following text elements:

    • Chart Title
    • Chart Legend Item Labels
    • Axis Item Labels
    • Axis Labels
    • MarkedZone Labels
    • EmptySeriesMessage Label
    • DataTable-related text elements

    Automatic text-wrapping will be disabled by default but the chart control provides fine-grained API that allows you to enable wrapping for all elements, or alternatively on individual element basis.

    Here are a few screenshots that demonstrate the rich customization options provided for text-wrapping (also ...

  • RadChart: AutoLayout

    Hello,

    We have been quite busy lately here in the Charting Labs and I would like to draw your attention on another slick feature we are adding to the Charting toolset -- RadChart AutoLayout. The AutoLayout functionality instructs the control to perform out-of-the-box layout arrangement that provides optimal utilization of the whole chart area and ensures that all chart elements are fully readable and do not overlap with one another.

    Here are a few samples that illustrate the described functionality:

    AutoLayout calculates the necessary space for all elements so they are fully readable and not clipped (notice the axis item ...
  • RadChart: Zooming and Scrolling Support

    Hello,

    We've been receiving a lot of feedback on our charting control lately that indicated interactivity is one of the most desired aspects where we can significantly improve our offering. And we listened! It's my pleasure to announce that starting from the Q1 2008 release in April our RadChart Prometheus control will provide scrolling and zooming support out-of-the-box.

    Here is a sneak preview that just made it out of the Telerik Charting Labs:

    Default view:



    Choose zooming area / factor:



    Scaled part is displayed -- you can scroll into view other parts of the chart as well (and they are ...
  • The CodeDom provider type Microsoft.VJSharp.VJSharpCodeProvider could not be located

    Scary, isn't it?

    With a brand new Vista and VS2008 on my laptop, I was just about to migrate some old projects of mine in the new studio format. The conversion wizard went smoothly but when I tried to rebuild the accompanying C# website I was greeted by the following dreadful error message:

    The CodeDom provider type "Microsoft.VJSharp.VJSharpCodeProvider, VJSharpCodeProvider, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.



    That's it. No File, no line, no project. Nowhere to look for the specific problem. Yay!

    A check of the web.config and the project references showed nothing suspicious -- google seemed to be the ...
  • Live from DevConnections'07

    Hello,

    This one is live from the Mandalay Bay Hotel at Las Vegas... ok I admit it's a bit late but better later than never;). DevConnections'07 is turning to be a really great event this year and I hope you had the chance to actually make it to the hot spot as well -- man, it's awesome!!!

    It's been quite a busy day today but alongside the fatigue there is pretty much a sense of delight among all of us here that we were able to share with you all the good stuff that is coming from the Telerik Labs. ...
  • ASP.NET AJAX Inheritance Gotcha

    Hello, my name is Manol Donev and I'm part of the ASP.NET team responsible for the development and maintenance of our grid, ajax, calendar, input, and chart components. With time ticking away and the September release date closing down I can assure you there is a lot going on here at the moment -- gradually orienting our ASP.NET product line towards ASP.NET AJAX is by far our main focus of course and probably you will find some of the ASP.NET AJAX tips and tricks I'll be writing about useful in your own projects as well.

    OK, this one does not qualify ...