ctodx

This Blog

News

Favorite Posts

Archives

October 2008 - Posts

  • VCL subscription: new localization tool coming in next build

    clip_image001 We've been working on a new tool for native Delphi and C++Builder developers and will release it in the next build (build 40). It's known, catchily, as the TcxLocalizer component. Oh, and it's free with the subscription.

    WAY COOL UPDATE: I totally misinterpreted the information I was given. Apparently TcxLocalizer is going to be shipped with the "Express Cross Platform Library" which is included as part of all our active latest products. So you don't need the subscription, you'll, well, just get it anyway, provided you're up to date. And a little birdie tells me that Build 40 is on target for release next week. With that, back to your normal programme...

    The TcxLocalizer component helps you localize those of your applications that use our controls, as well as third-party or standard controls. This component provides centralized control over an application’s UI language or locale. Using this component, switching to another locale is as simple as changing a single option.

    Here's how it works -- the brief version.

    Create a resource string file using the Localizer Editor, which is a standalone application shipped with the component. You then drop the TcxLocalizer component onto a form, link the resource string file to it, and select the current locale.

    clip_image003

    At this point, you can just run the application and see it localized. Voilà!

    Localizing Developer Express controls

    With our controls, the text displayed by various UI elements is provided by resource strings. Prior to the TcxLocalizer component, you had to go and manually change resource string values with the translated text. Now, you can use the Localizer Editor to browse all the available resource strings for our controls, specify resource string values for any number of locales, and store these values to a resource strings file.

    clip_image005

    clip_image007

    After this, the created file can be linked to the TcxLocalizer component, and at runtime, the controls will display the text based on the selected locale.

    clip_image009

    Localizing standard or third-party controls

    Along with the configured TcxLocalizer component that you use in the application, specify the IdxLocalizerListener interface for the control to be translated (whether that is a form, frame, or custom control), and implement the IdxLocalizerListener.TranslationChanged method. In this method, perform all the necessary modifications to the UI, such as label and caption initializations, etc.

    Of course, you are free to programmatically assign string constants based on the current locale specified by the TcxLocalizer component, however the Localizer Editor provides a more convenient and elegant way to accomplish this. You can define custom resource strings with unique names, store them to a resource strings file, and later retrieve them in the TranslationChanged method.

    clip_image011

    This way, you can control and modify all the resource strings used in your applications in a centralized manner.

    The following example demonstrates how a form’s caption and some labels are localized using resource strings from a resource strings file created with the Localizer Editor.

    // Delphi
    // ...
    uses
    cxLocalization, dxCore, cxClasses, ;
    type
    TForm1 = class(TForm, IdxLocalizerListener)
    // ...
    public
    procedure TranslationChanged;
    end;
    // ...
    procedure TForm1.TranslationChanged;
    begin
    Caption := cxGetResourceString(@sMainFormCaption);
    lblDescription.Caption := cxGetResourceString(@sDescription);
    lblFileLocation.Caption := cxGetResourceString(@sFileLocation);
    // ...
    end;
  • DXperience v2008 vol 3: What's New is now live

    OK, there I was writing about the new features in DXperience v2008 vol 3, and I needed to find out about a particular one. So I nipped into the next room to ask Andrew about it, and he said, duh, the What's New has just been uploaded to the main website and I can read about it there.

    Heh! So, if you want to know about the new features in DXperience v2008 vol 3, go here.

    A quick note: we just released beta 1 of v2008 vol 3. We will release at least another beta and most probably a Release Candidate (RC) over the next two or three weeks. The main reason for this is that the new WinForms Rich Text editor wasn't quite ready and we didn't want to delay the first beta any more. So, in the next beta you'll be getting some bug fixes and also the beta for XtraRichTextEdit.

    This new component (of which you'll be seeing more information over the near future) is going to remain in beta until v2009 vol 1. It will have a Go Live license, so if you want to use it in your production apps before then, you can. However I would point out that the reason we're not moving it out of beta yet is that we want our customers to bash at it and use it in earnest in order to tease out any remaining bugs it may have (OK, OK, that it will have Smile). We're extremely pleased with it and its architecture (and if you were at PDC you'll have seen a demo of the Silverlight version) and it's very stable and performant. Check it out in the next beta.

  • DXperience v2008 vol 3: End-user report designer now fully skinnable (WinForms)

    We've now replaced the standard property grid in XtraReports' end-user report designer with our own XtraPropertyGrid.

    This has two consequences. First, the end-user designer is now fully skinnable with our various skins. Here it is with the Pumpkin skin.

    image

    Second, if it wasn't really obvious before, it certainly is now: if you want to change the end-user report designer for your own application or house style, you will need licenses to the various DevExpress products used to create the look-n-feel in order to recompile it. If you have DXperience WinForms, Enterprise, or Universal, no sweat, but if not, please be aware of this requirement.

  • DXperience v2008 vol 3: sorting by any column/row in the pivot grid (WinForms)

    This one is for those hard-core types who live and breathe pivot grids (and I'm talking about the end-users here).

    In version v2008 vol 3, you can specify the summary columns or rows that can be sorted. At run-time, the user merely has to right-click the column or row header to bring up a context menu and then select the required sorting option.

    Since pictures are worth a thousand words, check this out. Here's a pivot grid showing orders generated by the sales people, ordered by month.

    image

    I'd really like to see those sales people sorted by order amount for each month. So, I right click on the Order Amount column header:

    image

    And select Sort Sales Person by This Column:

    image

    That showed the data in ascending order (and note the small icon in the Order Amount column header that shows it's the "sorting data". To show it in descending order, I merely click the Sales Person column header:

    image

  • Breaking Changes for DXperience v2008 vol 3 (miscellaneous)

    This is the fourth part of the Breaking Changes list for v2008 vol 3, covering miscellaneous changes.

    This list is not the What's New list for v2008 vol 3, but merely the changes we've had to make to DXperience in order to fix bugs, add new functionality, or improve the user experience. If you already have projects using DXperience, you will need to peruse this list in order to understand the changes you might need to make to your source code to support this new major release.

    Note that we only publish the changes to the public interface of our controls. We reserve the right to change the protected, internal, or private interfaces when needed.

    Data Library

    • If a control's data source is being changed from a non-UI thread, an exception is now thrown.
      When a control is notified from a non-UI thread that its data source has been changed, an exception will now be thrown. This is now the default behavior.
      If you don't want these exceptions to be thrown (as it worked in previous versions), set the CurrencyDataController.DisableThreadingProblemsDetection property to True.

    Breaking Changes part 1 covering charts, reports, gauges.
    Breaking Changes part 2 covering scheduling.
    Breaking Changes part 3 covering XAF.

  • Breaking Changes for DXperience v2008 vol 3 (frameworks)

    This is the third part of the Breaking Changes list for v2008 vol 3, covering changes to XAF (eXpress App Framework).

    This list is not the What's New list for v2008 vol 3, but merely the changes we've had to make to DXperience in order to fix bugs, add new functionality, or improve the user experience. If you already have projects using DXperience, you will need to peruse this list in order to understand the changes you might need to make to your source code to support this new major release.

    Note that we only publish the changes to the public interface of our controls. We reserve the right to change the protected, internal, or private interfaces when needed.

    eXpressApp Framework

    • Many classes and interfaces have been replaced with interfaces from the new TypesInfo system.
      The following classes and interfaces will no longer be used from XAF v2008 vol 3 onwards:
      ComplexMemberDescriptor
      ComplexPropertyDescriptor
      DescriptorFactory
      FieldInfoWrapper
      IMemberInfoWrapper
      PropertyDescriptorWrapper
      PropertyInfoWrapper
      ReflectionMemberInfoWrapper
      XpoDescriptorFactory
      XpoMemberInfoWrapper (The IAssemblyInfo, ITypesInfo, ITypeInfo and IMemberInfo interfaces should be used instead.)
    • The CollectionSourceBase.IsObjectFitForCollection method now returns a nullable bool instead of the standard bool.
    • Rules applied to non-public properties are not supported anymore.
      If you need to apply a rule to a property that should not be visible in a UI, apply the [Browsable(false)] attribute to the property instead of making it private or protected. For example:

      [Browsable(false)]
      [RuleFromBoolProperty(....)]
      public bool IsValid {
        get { ... }
      }
    • Several members of the DevExpress.ExpressApp.Validation.ValidationExceptionId enumeration have been renamed. The corresponding resource strings were renamed as well.
      - DeleteErrorMessageHeaderFormat was renamed to DeleteErrorMessageHeader;
      - SaveErrorMessageHeaderFormat was renamed to SaveErrorMessageHeader.
    • The DevExpress.ExpressApp.Validation.Serialization.IRuleSerializerOnDictionaryNode interface has been changed.
      There are two new methods:
      - bool IsRuleSupported(Type ruleType)
      - bool IsRuleSupported(DictionaryNode ruleNode)
    • The IAnalysisInfo interface has been changed.
      The DimensionProperties property now has the IList<string> type.
    • The PropertyEditor.MemberDescriptor property now returns an object of the IMemberInfo type.

    • The size of the DevExpress.Persistent.BaseImpl.Analysis business class' Criteria property has been changed.
      The Criteria property of the DevExpress.Persistent.BaseImpl.Analysis business class has been enlarged. It now has an unlimited size, since it became necessary to save large criteria. If you use this class in your application, you should update your database. To learn how to do this, see the UpdateAnalysisCriteriaColumn method in the MainDemo.Module.Updater class.

    • The XafApplication.CreatePropertyCollectionSource method has been changed.
      Its MemberDescriptor parameter is now of type IMemberInfo.

    • The XafApplication.CustomizeCulture and XafApplication.CustomiseFormattingCulture events have been removed.
      These events were obsolete. The CustomizeLanguage and CustomizeFormattingCulture events are now used instead.

    • XAF attributes should be added via XafTypeInfo, and not via XPDictionary.
      For instance, in previous XAF versions, the CreatableItemAttribute attribute was added in the following way:
      xpDictionary.QueryClassInfo(typeof(Person)).AddAttribute(new CreatableItemAttribute(false));
      It must now be added in the following manner:
      XafTypesInfo.Instance.FindTypeInfo(typeof(Person)).AddAttribute(new CreatableItemAttribute(false));

    Breaking Changes part 1 covering charts, reports, gauges.
    Breaking Changes part 2 covering scheduling.
    Breaking Changes part 4 covering miscellaneous changes.
  • Breaking Changes for DXperience v2008 vol 3 (scheduling)

    This is the second part of the Breaking Changes list for v2008 vol 3, covering changes to XtraScheduler (WinForms) and ASPxScheduler.

    This list is not the What's New list for v2008 vol 3, but merely the changes we've had to make to DXperience in order to fix bugs, add new functionality, or improve the user experience. If you already have projects using DXperience, you will need to peruse this list in order to understand the changes you might need to make to your source code to support this new major release.

    Note that we only publish the changes to the public interface of our controls. We reserve the right to change the protected, internal, or private interfaces when needed.

    ASPxScheduler and XtraScheduler

    • The PersistentObjectCollection interface has been removed.
      All persistent objects for the scheduler now inherit from the NotificationCollection<T> class. For example, AppointmentBaseCollection is now declared as NotificationCollection<Appointment> and ResourceBaseCollection as NotificationCollection<Resource>.

    • The type of the PersistentObjectStorage<T>.Items property has been changed.
      The PersistentObjectStorage<T>.Items property's type was changed from PersistentObjectCollection to NotificationCollection<T>.

    • Multiple obsolete members are no longer usable.
      Using the following members, already marked as obsolete in previous versions, no longer results in compiler warnings, but compiler errors instead. You should update your code to use those members recommended by the warning/error instead.
      object PersistentObject::Tag { get; set; }
      int AppointmentCollection::Add(DateTime start, DateTime end, string subject)
      int AppointmentCollection::Add(DateTime start, TimeSpan duration, string subject)
      Appointment AppointmentCollection::GetOccurrence(Appointment pattern, int recurrenceIndex)
      void AppointmentCollection::DeleteExceptions(Appointment pattern)
      AppointmentBaseCollection AppointmentCollection::GetExceptions(Appointment pattern)
      Appointment AppointmentCollection::CreateException(Appointment pattern, AppointmentType type, int recurrenceIndex)
      void AppointmentCollection::RestoreOccurrence(Appointment apt)
      AppointmentBaseCollection AppointmentCollection::GetPatternOccurrences(Appointment pattern, DateTime start, DateTime end)
      public static AppointmentBaseCollection AppointmentCollection::GetPatternOccurrences(Appointment pattern, TimeInterval interval)
      AppointmentBaseCollection AppointmentCollection::GetConflicts(Appointment appointment, TimeInterval interval)
      public bool AppointmentCollection::IsIntersecting(TimeInterval interval, Resource resource)

    • Several non-generic classes have been made generic instead.
      In general these classes are for internal use only so should have no effect on your code. In essence, they have the same name but are now decorated with the T parametrized type.
      PersistentObjectStorage has become PersistentObjectStorage<T>
      DataManager has become DataManager<T>
      IPersistentObjectStorageProvider has become IPersistentObjectStorageProvider<T>
      QueryPersistentObjectStorageEventHandler has become QueryPersistentObjectStorageEventHandler<T>
      QueryPersistentObjectStorageEventArgs has become QueryPersistentObjectStorageEventArgs<T>
      CustomFieldMappingBase has become CustomFieldMappingBase<T>
      MappingInfoBase has become MappingInfoBase<T>
      CustomFieldMappingCollectionBase has become CustomFieldMappingCollectionBase<T>
      MappingsAutoPicker has become MappingsAutoPicker<T>
      PersistentObjectUserModificationsRegistrator has become PersistentObjectUserModificationsRegistrator<T>
      StorageXmlConverter has become StorageXmlConverter<T>
      PersistentObjectStorageFilteredComponentImplementation has become PersistentObjectStorageFilteredComponentImplementation<T>
      SchedulerStorageActionList has become SchedulerStorageActionList<T>
      DefaultDataFieldsProvider has become DefaultDataFieldsProvider<T>
      PersistentObjectStorageTypeEditor has become PersistentObjectStorageTypeEditor<T>
      MappingsChecker has become MappingsChecker<T>
      SetupMappingsBaseWizard has become SetupMappingsBaseWizard<T>
      MappingsChecker has become MappingsChecker<T>
      NotificationCollection<T>: CollectionChangedEventHandler has become CollectionChangedEventHandler<T>
      NotificationCollection<T>: CollectionChangedEventArgs has become CollectionChangedEventArgs<T>

    Breaking Changes part 1 covering charts, reports, gauges.
    Breaking Changes part 3 covering XAF.
    Breaking Changes part 4 covering miscellaneous changes.

  • Breaking Changes for DXperience v2008 vol 3 (reporting, charting, gauges)

    This is the first part of the Breaking Changes list for v2008 vol 3, covering changes to XtraCharts and XtraReports in WinForms and AS.NET, as well as XtraGauges (WinForms only, the ASP.NET version of our gauges product is known as ASPxGauges).

    This list is not the What's New list for v2008 vol 3, but merely the changes we've had to make to DXperience in order to fix bugs, add new functionality, or improve the user experience. If you already have projects using DXperience, you will need to peruse this list in order to understand the changes you might need to make to your source code to support this new major release.

    Note that we only publish the changes to the public interface of our controls. We reserve the right to change the protected, internal, or private interfaces when needed.

    XtraCharts Suite

    • DateTime scale - The AxisBase.GridSpacing property is now measured in the measure units specified by the AxisBase.DateTimeGridAlignment property.

    • DateTime scale - The AxisRange.MinValueInternal and AxisRange.MaxValueInternal properties are now measured in the measure units specified by the AxisBase.DateTimeGridAlignment property.

    • DateTime scale - The BarSeriesView.BarWidth, Bar3DSeriesView.BarWidth, Bar3DSeriesView.BarDepth properties are now measured in the measure units specified by the Axis.DateTimeGridAlignment property.

    • DateTime scale - The FinancialSeriesView.LevelLineLength and FinancialDrawOptions.LevelLineLength properties are now measured in the measure units specified by the Axis.DateTimeGridAlignment property.

    • If several series contain different arguments of a Qualitative type, their order may be changed if some series have the sorting option enabled, while others don't.

    • The ChartControl.DateTimeOptions, WebChartControl.DateTimeOptions, XRChart.DateTimeOptions obsolete properties have been removed.
      Use the AxisBase.DateTimeOptions property instead.

    • The ConstantLine.Value, CustomAxisLabel.Value and the StripLimit.Value obsolete properties have been removed.
      Use the AxisValue property instead.

    • The DateTimeOptions.MeasureUnit obsolete property has been removed.
      Use the AxisBase.MeasureUnit property instead.

    • The PercentOptions.ValuePercentPrecision obsolete property has been removed.
      Use the PercentageAccuracy property instead.

    • The PointOptions.BeginText, PointOptions.EndText, PointOptions.Separator obsolete properties have been removed.
      Use the Pattern property instead.

    • The ScrollingRange.AlwaysShowZeroLevel property value should now be explicitly set.

    • The Series.Label property for the StackedAreaSeriesView type now returns an object of the StackedAreasSeriesLabel type instead of PointSeriesLabel.
      This is required to return the OverlappingOptions object instead of the PointOverlappingOptions object for the SeriesLabelBase.OverlappingOptions property.

    • The SideMarginsEnabled property's behavior (when adding or removing series at runtime, or changing a series view at runtime) was changed.
      Previously, if the Series.View property value was changed at runtime, or the ChartControl.Series collection was changed (either new series were added or some existing series were removed from this collection), the Axis.Range.SideMarginsEnabled property might inadvertently change its value. Now these operations don't have any effect on the SideMarginsEnabled property value.

    XtraGauges

    • A new assembly has been added to store presets data: XtraGauges.Presets.
      The presets data was moved to this assembly from the XtraGauges.Win.Design assembly.

    • All platform-independent code has been moved to the XtraGauges.Core assembly.

    • BaseTextAppearance: The Format property is now of type StringFormatObject.
      The native StringFormat type was replaced by our own StringFormatObject.

    • Some properties now have different type converters and therefore their appearance has been changed in the Property Grid.
      This is caused by implementing editing for some type converters (BrushObject,ShaderObject... etc.), to correctly support the Visual Studio design time for ASPxGauges.

    • The GaugeBase class was renamed to BaseGaugeWin.

    • The Tickmark inheritance hierarchy was changed.
      In v2008 vol 2, the IMajorTickmark interface was inherited from IMinorTickmark. Now, in v2008 vol 3, the IMajorTickmark interface inherits from ITickmark.

    XtraPrinting Library

    • If you create custom Print Preview forms, the new appearance of the Status Bar isn't applied until you choose the Update context link for the PrintBarManager in its smart tag.
      NOTE: All your custom changes to the PrintBarManager will be removed when you click on the Update context link.

    • Printing and exporting is now disabled until all pages are created.
      You shouldn't call a report's Print, PrintDlg, or any ExportTo~ methods right after calling the ShowPreview or ShowPreviewDialog methods since an exception will be raised because all pages might not be ready.
      To make sure that all pages have been created, you need to either call the XtraReport.CreateDocument method without any parameters, or call the XtraReport.CreateDocument(true) method and wait until the document has been fully created by polling the XtraReport.PrintingSystem.Document.IsCreating property value.

    • The DevExpress.XtraPrinting.IPageHeaderFooter interface has been removed.
      Actually, this interface couldn't be properly used in user applications, and now it is no longer necessary for internal purposes.

    • The IPageHeaderFooter Link.pageHF protected field has been removed.
      You don't need to use this property at all.

    • The obsolete ExportOptions.CompressPdfImages property has been removed.
      You should use the ExportOptions.Pdf.ImageQuality property instead.

    • The obsolete ExportOptions.HtmlCharSet property has been removed.
      You should use the ExportOptions.Html.CharacterSet and Mht.CharacterSet properties instead.

    • The obsolete ExportOptions.XlsNativeFormat property has been removed.
      You should use the Xls.UseNativeFormat property instead.

    • The obsolete Watermark.Transparency property has been removed.
      You should use the Watermark.TextTransparency and Watermark.ImageTransparency properties instead.

    • The progress bar is no longer visible if you only use a PrintControl to preview a document.
      The progress bar was moved to the status bar in order to incorporate a Stop button next to it. So, if you want to embed the progress bar and the Stop button into your custom Print Preview, you need to use the PrintBarManager component in addition to the PrintControl.

    • The types of the PrintingSystem.AfterPagePaint event handler and event args were changed.
      This was done in order to implement suggestion S91761.
      -- PageEventHandler was changed to PagePaintEventHandler;
      -- PageEventArgs was changed to PagePaintEventArgs.
    • The usage of the ProgressReflector class has been changed, and this class is no longer static.
      This was done in order to correctly implement suggestion AS3017.
      Note that you can find previous and updated approaches concerning the use of the ProgressReflector class in our Code Central here.

    XtraReports Suite

    • If an XRLabel, XRPageInfo or XRBarCode is created at runtime, its Padding property will be set to its parent's Padding property value by default.
      This breaking change was caused by fixing issue B33057.
      The obsolete XRBarCode's Padding property of type int is changed to type PaddingInfo. The original property is now obsolete and hidden.
      Note that this breaking change has no effect if you add these controls at design time -- in this case a control's Padding property value is automatically changed to the value used in previous versions. And, in order to inherit the Padding property value from a control's parent, you will need to reset this property via the context menu in the Property Grid.
      So, all reports that were created with previous versions of XtraReports will be correctly de-serialized and are not affected by this breaking change.

    • It's now required to add a reference to the DevExpress.XtraVerticalGrid assembly if your application uses the End-User Designer.
      This was done to embed the PropertyGrid control from the XtraVerticalGrid Suite into the End-User Report Designer. Note that if you want to edit and recompile the end-user designer you will need licenses to the required products used in the designer or to DXperience WinForms, Enterprise, or Universal.

    • The obsolete XtraReport.HtmlCharSet property has been removed.
      You should use the ExportOptions.Html.CharacterSet and ExportOptions.Mht.CharacterSet properties instead.

    • The obsolete XtraReport.HtmlCompressed property has been removed.
      You should use the ExportOptions.Html.RemoveSecondarySymbols and ExportOptions.Mht.RemoveSecondarySymbols properties instead.

    • The obsolete XtraReportBase.RowIndex property has been removed.
      You should use the CurrentRowIndex property instead.

    • The obsolete XtraReportBase.SortFields property has been removed.
      You should use DetailBand's SortFields property instead.

    Breaking Changes part 2 covering scheduling.
    Breaking Changes part 3 covering XAF.
    Breaking Changes part 4 covering miscellaneous changes.

  • DXperience v2008 vol 3: Conditional formatting in reports (WinForms and ASP.NET)

    An oft-requested feature in XtraReports is the ability to print certain report controls in the report differently based on some formatting rule. The rule would (presumably) be based on the values in the record bound to that control.

    As usual, a picture is worth a thousand words. In this report the rows that have an extended price greater than $1000 are shown with a light green background.

    image

    In essence, the way this works is that the report controls you drop on the report designer surface have a property called FormattingRules, a collection of formatting rule objects. A formatting rule has a condition -- that is, an expression using the fields that evaluates to true or false -- and a set of display formatting properties, such as font color, attributes, background color and so on. At report generation time, these rules are evaluated and if satisfied the data is printed using the display formatting options. Otherwise, the default printing options are used.

  • DXperience v2008 vol 3: First page preview for reporting in WinForms

    This is a cool feature that improves the user experience when generating preview reports on a lot of data. Until v2008.3, XtraReports used to generate the entire report before showing it to the end-user, and, in those cases when there was a lot of data to report on, this could take an appreciable amount of time and leave the user with an unresponsive program as the preview was being created.

    In the new XtraReports, there's an option to generate the first page of the report preview as before and display it immediately. Meanwhile another thread continues to generate the second and subsequent pages in the background. This gives the user control of the report and the program so that they can view it and page through it as normal. As the second thread produces pages to view, they become available to the end user.

    Here's a screenshot from the demo program showing this in action (the final report is over 2000 pages long).

    image

1
2 3
LIVE CHAT

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

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. 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-2017 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners