Upgrading to Visual WebGui v6.4 - Changes & Requirements

From Visual WebGui Wiki

Jump to: navigation, search


Contents

Overview

This article discusses the known changes (breaking or non-breaking) you might encounter while upgrading your application from an earlier version to version 6.4 of Visual WebGui, as well as any known specifics that this version requires and earlier versions did not.

Important notice

The differences detailed in this article sum up all the differences we have found and documented here up to this point. Surely it does not document every possible difference.
If you have encountered any difference between Visual WebGui v6.4 and v6.3 that is not detailed in this article, please post the details in the Visual WebGui forums and we will add a section about this change in this article here.

General

  • WinFormsCompatible - A new Windows Forms compatability configuration flag added for keeping Windows Forms capability on spacific controls where Visual WebGui has different implementation for the Web - VWG-3882 (6.4.0P3)
  • Registering Controls - A new Action="Remove" mode added to control registration in web.config to prevent their resources being sent to the client - VWG-5338 (6.4.0P3)
  • ForceHTTPS - Enhanced this setting to support Value=None, Redirect or Rewrite in addition to Mode=On or Off - VWG-7040 (6.4.0B3)
  • SEO - Rendering static SEO content (Google Crawler engine) - VWG-6865 (6.4.0B3)

Application

  • It is now possible to map applications as paths - VWG-2007 (6.4.0P3)
  • It is now possible to map applications dynamically using IFormFactory - VWG-3207 (6.4.0P3)
  • It is now possible to run specific forms in SSL - VWG-3300 (6.4.0P3)
  • It is now possible to run specific forms in stateless mode - VWG-4842 (6.4.0P3)
  • It is now possible to define metadata tags that apply to all applications - VWG-5716, VWG-5758, VWG-2410 (6.4.0B1c)
  • Visual WebGui applications can now run in less than full trust mode, but do require adjustments in web.config - VWG-6234 (6.4.0B1c)

Authentication

  • It is now possible to have some of your forms using non-authenticated, while others are authenticated - VWG-2702 (6.4.0P3)
  • Context level IsLogged on implemented where you can have different forms authentication with different credentials - VWG-5411 (6.4.0P3)

Context

  • Browser's Presentation, PresentationEngine and PresentationCapabilities can now be determined via the Context - VWG-3736 (6.4.0P3)
  • HttpContext, HttpRequest, HttpResponse - Abstraction layer added as HostContext, HostRequest, HostResponse - recommended to use the abstraction - VWG-7126, Wiki (6.4.0B3)
  • ForcePageInstance - Setting implemented in web.config and when On, forces creation of new context even if within the same session - VWG-6927, Wiki (6.4.0B3)

Cultures

  • Japaneese culture added - VWG-6253 (6.4.0B1a)

DataBindings

  • OnValidation databinding implemented and fires it's events correctly - VWG-3933 (6.4.0B1c)

Designer

  • Schema created for Visual WebGui specific entries in web.config so designer accepts them as valid - VWG-4194 (6.4.0P3)
  • Working with images in Control library projects now supported - VWG-6997 (6.4.0B3)

Gateway

  • It is now possible to send parameters via a gateway request - VWG-2508 (6.4.0P3)

JavaScript client resources

  • Aux_IsEmptyOrNull - JavaScript function was renamed to Aux_IsNullOrEmpty (same as .NET) - VWG-6250 (6.4.0B3)

MSBuild folder

Session state

Session state variables - Now stored within the ASP.NET session directly, instead of within an object within the ASP.NET session. Better interoperability with ASP.NET - VWG-6642 (6.4.0B2)

Wrapper - ASP.NET controls wrapper

  • Conflicting properties - Wrapper now handles properties that conflict with the hosting control - VWG-6221 (6.4.0B1 partially)
  • Value cannot be null - C# Wrapped control no longer generated "Value cannot be null" error in designer - VWG-6203 (6.4.0B1c)

Controls General

Docking and Anchoring

In Visual WebGui v6.4 we changed the Docking and Anchoring implementation to match the Windows Forms implementation like so:
1. When setting the value of the Anchor property of a control to any new value, the value of the Dock property of the control will be changed to the default None.
2. When setting the value of the Dock property of a control to any new value, the value of the Anchor property of the control will be changed to the default TopLeft.

Docking of controls changed to match Windows Forms

Visual WebGui v6.4 (RC0) got us closer to the Windows Forms implementation of docking. This causes the serialization to use a different order of adding controls to containers and the desrialization to need to get that specific order also, for you to get the expected result.
We have added a configuration element that allows you to force the system to work without the Windows Forms compatibility.
This is the configuration element:
<WebGUI>
    <PreReleaseDockFillCompatibility Mode="On"/>
</WebGUI>
Once added you will be able to use previously created applications as before.

Samples of use

Forum threads

Issues

Enter and Leave events implemented

In version 6.4 the Enter and Leave events were implemented for controls. This may be of concern for those that already attached event handlers to those events, as now in version 6.4 those events will start firing - VWG-5304 (6.4.0B1c)

RegisteredComponent

  • In previous versions you could use the Guid property on a Component to get its numeric ('double' type) unique identifier (also used in client-side).
    Beginning with VWG v6.4 This property has changed to ID. - VWG-0903 (6.4.0P1)
    The "RegisteredComponent" class is the base class of the "Component" class that is the base class of the "Control" class.
  • InvokeScript - Method implemented for the purpose of invoking generic JavaScript code. Script is not obscured before being executed. - VWG-4783 (6.4.0P3)

Control

  • BackColor default was changed to System.Drawing.Color.Control, but was white in earlier versions. - VWG-4507 (6.4.0P1)
  • BorderColor should have a casting to Gizmox.WebGUI.Forms.BorderColor (example: New Gizmox.WebGUI.Forms.BorderColor(System.Drawing.Color.DarkCyan) ).
  • BorderWidth
    • In prior versions (before 6.4 ) the BorderWidth was a simple integer property. (Example: 10 + Control.BorderWidth was a correct syntax in pre 6.4 versions.)
    • In version 6.4, the BorderWidth is a Class. (Example: Same expression as above needs to be written as 10 + Control.BorderWidth.All, or using any other BorderWidth property)
    • Assignment to Control.BorderWidth should use casting to Gizmox.WebGUI.Forms.BorderWidth (example: Control.BorderWidth = new Gizmox.WebGUI.Forms.BorderWidth(2) )
  • Click - In version 6.4, Click event is now fired when Right-Clicking a control (with a few exceptions), even if the control has a ContextMenu assigned- VWG-6923 (6.4.0RC1)
    • To distinguish between Left and Right mouse buttons, cast EventArgs of the Click event to a MouseEventArgs and use the Button property - VWG-1456 (6.4.0P4)
  • Enter / Leave - Events are now implemented - VWG-5304 (6.4.0B1c)
  • Focus - Programatically setting focus to controls is now supported. - VWG-4067 (6.4.0P2)
  • Focusing when clicking on a non-focusable container
    • New configuration element, PreserveFocusElement, added to web.config to adjust the behaviour - VWG-8305, VWG-8306 (6.4.0a)
    • Default (Mode=On) - In version 6.4 and later, when clicking on a non-focusable element, focus will, by default, be returned to either the last focused focusable control, or the first focusable element on the Form - if no element was previously focused. If that control is outside of view on the screen, scrolling or positioning will change to place that control in view.
    • 6.3 behaviour (Mode=Off) - In version 6.3 and earlier When clicking on a non-focusable element, focus will not be returned to the last focused focusable control. Tabbing will resume though from that control (so tab and shift+tab will return focus to that control for example).
  • Resize - Event now fires consistently on all controls when browser window is resized - VWG-6898 (6.4.0B3)

Forms

  • Activated - The activated event now fires when form becomes the active form, not only when ShowDialog() is called as it did in earlier versions - VWG-2151
  • PopUps - PopUp windows/forms are now implemented in Visual WebGui as floading DIVs. In earlier versions this was implemented as actual browser popup windows and would therefore sometimes be considered as un-safe popups in certain security settings of browsers - VWG-4094
  • PopUps - Opening a non-popup form from within a popup form will now close the initiating popup - VWG-5630

Controls and classes specifics

BindingNavigator

  • PositionItem has changed type from ToolBarButton to BindingNavigatorLabel. To fix, change the type of the ToolBarButton assigned to BindingNavigator.PositionItem to be of type BindingNavigatorLabel, which inherits from ToolBarButton. Be sure to check Issue-7864 for more info.

BindingSource

  • CurrentChanged - Event now fires when current item changes - VWG-5271

Chart

CheckBox

In pre VWG v6.4 versions the CheckState and Checked properties were not always synchronized in the Form designer serialized code. Beginning with VWG v6.4 the two properties are synchronized and if they have contradicting values as a result of a previous version bug, the results may be different than you would expect. As a result, it is recommended that if the CheckState property is not synchronized with the Checked property, the CheckState line should be deleted.

CheckedListBox

  • RadioButtons - This property is not used and is now hidden - VWG-2375

ColorComboBox

  • The ColorComboBox is now obsolete and you should use ListBox control instead. - VWG-5390

Combobox

  • Enabled - The combobox now behaves and renders consistently when Enabled=False - VWG-2464 (6.4.0B3)
  • ESC - Pressing ESC key should close ComboBox Dropdown - VWG-5808
  • Text - Although ComboBox.Text works for reading the selected value, it is recommended to use SelectedValue to retrieve the selected value of the ComboBox - VWG-5847
  • ImageBoxBorderStyleskin property has been replaced by the ColorBoxStyle - VWG-6171  (6.4.0B3)

DatabaseResourceHandle

Version 6.4 requires you to use the abstracted HostContext, HostRequest and HostResponse instead of HttpContext, HttpRequest and HttpResponse in earlier versions. See more in the article about the new abstraction.

DataGridView

  • TotalItems = 1 is added by some previous version designers. This property doesn't exist in version 6.4, so just remove the line.
  • RowEnter / RowLeave - Events now fire in CellSelect mode - VWG-4730 (remember to set IsSelectionChangeCritical = True)
  • RowTemplate.Height = 9 is added by previous versions designers (started in early 6.3.x and was discovered in a 6.4 preview release). In these same earlier versions, this setting was ignored by the rendering process, so this setting did not hurt your DataGridViews. In the most recent versions of 6.4, more precisely 6.4.0RC1, the rendering process now honors this setting. This means that if an old designer generated code, that includes this setting, is left alone, all your DataGridView row heights will be 9 instead of the default of 22. This setting should be removed from designer generated code, or set to a value that fits your application.

DataGridViewComboBoxColumn

  • Keyboard navigation to drop down now supported (Alt-Down and more) - VWG-3598
  • OwnerDrawn (custom) combobox now supported for DataGridView - VWG-5789
  • Value - When initializing a DataGridViewComboBoxCell with both a ValueMember and a DisplayMember and requesting the Value (property) of this cell, the value of the ValueMember is now returned. Version 6.3 and earlier returned DisplayMember. VWG-3032
  • ValueChange - ComboBoxCell now complies with Windows Forms and only fires ValueChanged event when clicking or on enter key - VWG-5811

DataGridViewTextBoxColumn

  • MaxInputLength = -1 is added by some previous version designer. This setting should be removed in 6.4.

DateTimePicker

  • CloseUp - Event implemented - VWG-3614
  • Text - DateTimePicker now formats it's short and long date formats according to active culture settings - VWG-6276

DomainUpDown

  • TextAlign - Property now defaults to Left - VWG-5520

FCKEditor

  • The FCKEditor.BasePath should be "../../../../../../FCKeditor/", while in earlier versions it was "../../../../../FCKeditor/" (one less ".." in 6.3)
  • You must also remember to copy the contents of the fckeditor resource folder from a Catalog or CompanionKit of the same version of Visual WebGui you are using

FlowLayoutPanel

  • BorderStyle - Default BorderStyle has been changed to None - VWG-5188
  • WrapContents - In versions prior to 6.4, the designer by default generated code with WrapContents = False, but runtime this setting was ignored and the version 6.3 FlowLayoutPanel still wrapped it contents. In version 6.4 this has changed in two ways. First, the designer now defaults to WrapContents = True and second, this setting is now honored runtime. For 6.3 code upgraded to 6.4, this means that your FlowLayoutPanel will include the old 6.3 setting of FlowLayoutPanel.WrapContents = False, and will not wrap it's contents. When upgrading, remove the FlowLayoutPanel.WrapContents = False setting from designer generated code.- VWG-3897

Form

  • Enabled - In version 6.4 setting the Enabled property goes down to all controls on the form, where in 6.3 in only applied to the form itself. - VWG-3639
  • Focusing - Each form now remember the control that last had the focus and reestablishes focus to that control when activated again - VWG-3221
  • MinimumSize and MaximumSize properties were not honored in versions prior to 6.4, but are now honored. This can have side effects when rendering (or loading in designer) forms that had their Size property set outside of either boundaries, as the designer/rendering will automatically adjust the Size value to be within these boundaries. As a result, forms might open with different sizes than before if this is not handled.

GoogleMap

  • GoogleMap now has the ability to create an overlay by address in addition to Latitude and Longtitude - VWG-6306

HeaderedPanel

Header - The Header property is not visible in designer any more and must be set programatically. In earlier versions there was a duplicate control error when assigning control to this property via designer - VWG-4141

PanelType - This property is not visible any more as it is obsolete. - VWG-3696

Help / HelpDialog

  • In Version 6.4 and later, the HelpDialog needs to be registered in the Controls section of web.config with the below registration.
  • Please note that the above line is for the VS2008 / NET3.5 version of the framework. If using VS2005 / NET2.0, replace the version with "2.0.5701.0" and for VS2010 / NET4.0 use "4.0.5701.0"
<Controls>
  <Control Type="Gizmox.WebGUI.Forms.*, 
           Gizmox.WebGUI.Forms.Help, Version=3.0.5701.0, Culture=neutral, PublicKeyToken=null" />
</Controls>

HtmlBox

  • IsWindowLess - Property implemented and when true, will embed the Html contents without an IFrame. Default is True, which uses IFrame.- VWG-6863 (6.4.0B3)

Label

  • Multiline Label now wraps it's text - VWG-5201

Link

  • Download - Link.Download API added for easy downloading - VWG-6906 (6.4.0B3)

LinkLabel

  • LinkLabel is now focus and tab enabled - VWG-5809, VWG-5828
  • ForeColor / LinkColor - In Visual WebGui version 6.3 and earlier, the ForeColor property was incorrectly used to set the color of the link. In Version 6.4 (Beta3) and later, the LinkColor property is now used for the same purpose, and in accordance with Windows Forms.
  • Image - Property now supported - VWG-4291

ListBox

  • ImageMember - The ListBox now supports icons via ImageMember - VWG-5390
  • KeyDow, KeyPress, KeyUp - These events are now supported on the ListBox control. - VWG-3647

ListView

  • DataSource - When ListView is bound to BindingSource the current member of the BindingSource should change when selecting different ListViewItem - VWG-6877 (6.4.0B3)
  • FullRowSelect - Starting with version 6.4.0 Release d, this property defaults to False, meaning that only the first column in details view will be highlighted when row is selectd - VWG-8979 (6.4.0d)
  • ItemFormatting - The ListViewItemFormattingEventArgs now carries row and subitem index of the item being formatted - VWG-5695
  • ItemFormatting - This event only fires for subitems if UseItemStyleForSubItems = False - VWG-6680
  • ListViewItem.DataItemIndex - new property. See ListViewItem.Tag
  • ListViewItem.Tag - Two changes have been made for the Tag property of databound ListViews.
    1. For most controls in Visual WebGui, the Tag property is usually free for the programmer to store arbitrary information. For databound ListView, the ListViewItem.Tag is used to store a reference to the item in the datasource individual ListViewItem is bound do. This has now been extended and a new property, ListViewItem.DataItemIndex, will now at all times store that beforementioned index into the datasource. ListViewItem.Tag will by default also contain that same index, but can be set to any value needed to override that behaviour - VWG-8455
    2. When ListView is bound to DataTable (via ListView.DataSource), the ListViewItem.Tag (and the DataItemIndex) now contains an integer value, starting with version 6.4.0 Release a, and this integervalue in ListViewItem.Tag represents the Index value of the DataTable.Rows, and extract the row via DataTable.Rows(ListViewItem.Tag). This change was necessary to make the ListView serializable, as the DataRowView is not a serializable object - VWG-8359, VWG-8166 - Workaround thoughts
  • SelectOnRightClick - Property implemented and when true, will select the right clicked row - VWG-2388 (6.4.0B3)
  • TotalPages - ListView paging is now updated while adding items to the ListView - VWG-4416

MaskedTextBox

  • MultiLine - MaskedTextBox no longer supports the MultiLine property - VWG-8577
  • WordWrap - As MultiLine property is no longer supported, setting WordWrap to True has no effect - VWG-8577

MenuItem

  • MenuClick - This event is obsolete and not used any more and has now been hidden. (MenuClick event fires in Visual WebGui on the control being right-clicked, not on the MenuItem itself) - VWG-4175

NumericUpDown

  • Dragging an Inherited NumericUpDown control and dropping on a form no longer ends in error - VWG-5987
  • TextAlign - Property is now supported - VWG-3116 - and defaults to Left - VWG-5520
  • ThousandSeperator - Property is now supported - VWG-3116 VWG-4197 - correct seperator for French - VWG-2149
  • UpDownAlign - Property now supported - VWG-4612. In VWG v6.3.14 the default value is:
LeftRightAlignment.Left

and in VWG v6.4 Beta2 the default value is:

LeftRightAlignment.Right

OpenFileDialog

  • Casting to HttpPostedFileHandler it is now possible to get the original filename of file being uploaded - VWG-6963 (6.4.0B3)

Panel

  • BorderStyle - Default BorderStyle has been changed to None - VWG-5188

ReportViewer

  • Fixes in the way ReportViewer expands vertically when clicking on an item's '+' sign - VWG-3651

RichTextBox

  • Font - Property is now flagged as obsolete property and should not be used. It's not shown in designer - VWG-5684
  • SelectedFont - Property is now flagged as obsolete property and should not be used. It's not shown in designer - VWG-5684

ScheduleBox

  • ContextMenu - Now supported on ScheduleBox and it's subcontrols - VWG-2374

SplitContainer

Enabled - SplitContainer now supports Enabled=False behaviour of inactive splitter - VWG-4633 (6.4.0B3)

TextBox

  • Enabled / ReadOnly - In previous versions there was a different coloring for Enabled=False and ReadOnly=True, meaning you could distinguish between wheather the TextBox was disabled or readonly. In version 6.4 TextBox with Enabled=False and TextBox with ReadOnly=True are rendered exactly the same. This can however be changed by setting 'WinFormsCompatible Mode="On"' - VWG-8059, VWG-7269
  • ReadOnly - Coloring depends on setting of the WinFormsCompatible web.config switch. When Off, keeps version 6.3 behaviour. When On, uses default 6.4 and Windows Forms behaviour - VWG-6715
  • Validating/Validated - The "Validated" and "Validating" events are not fired when TextBox focus is lost only when the text is changed, which is different from Windows Forms behavior - VWG-6312.

Timer

  • Stop a Timer in version 6.4.0 Release and earlier - In all versions of Visual WebGui up to and including 6.4.0 Release, starting a Timer on a Dialog form and then later closing the Dialog form, does NOT by itself stop the firing of the Timer.Tick event. In order to fully stop the timer, you must explicitly stop it, by calling Timer.Stop(), before or while closing the form.
  • Stop a Timer in version 6.4.0 Release a and later - In version 6.4.0 Release a, a new property, Form.RegisteredTimers, was implemented. This property is an Array of Timer controls, and all Timer controls enlisted in that array will be guaranteed to be stopped when the form is closed runtime. This property is automatically populated by the designer (in 6.4.0 Release a and later) with all the Timer controls added to the form via the designer.  Timer controls added programatically at runtime will need to be added to the Form.RegisteredTimers array to benefit from this feature  - VWG-6980
  • Stop a Timer in forms designed in earlier version designers - Forms designed in earlier version designer will not have the Form.RegisteredTimers() array populated and will need to be opened in designer and saved, in order to have the property populated properly

ToolBar

  • BackColor setting on ToolBar is honored in version 6.4, while in earlier versions setting it had no effect, it inherited the color from the active Theme.
  • Buttons - Now ToolBar adapts it's size and it's buttons according to Windows Forms - VWG-6023
  • Click event is for clicking on non-button areas of the Toolbar and in 6.4 only carries EventArgs (in pre-6.4 it had ToolBarItemEventArgs) - Use ToolBar.ButtonClick instead - VWG-5589
  • RightToLeft in pre 6.4 is set to either True or False. Usually safe to delete this property setting from your code, else this needs to be adjusted to RightToLeft.Yes, RightToLeft.No or RightToLeft.Inherit.
  • TextAlign is by default "Right" in pre 6.4 versions, but in 6.4 it defaults to "Underneath". This might need adjustments in 6.4.

TrackBar

  • TrackBar did not always appear when form was minimized and later restored in FF2 - VWG-5569

TreeView

  • In pre 6.4 versions, TreeView by default loaded with all nodes expanded. Version 6.4 changes this behaviour to the Windows Forms behaviour of opening all nodes collapsed. If needed, call TreeView.ExpandAll() on Load.
  • TreeView.Nodes.Add gave error when in stateserver mode - VWG-6919 (6.4.0B2e)
  • Removing TreeNode - Removing a TreeNode in designer now also removes all form level subnodes of that node - VWG-4780

TreeViewNode

  • TreeNode.Visible - Property implemented to hide or show a TreeViewNode - VWG-6959 (6.4.0B3)

WorkSpaceTabs

  • ShowCloseButton - Override added which defaults to false, and determines if close buttons will show on the tabs or not - VWG-6804

Form Designer

Beginning with VWG v6.4 Beta2 Form designer produces different code in the InitializeComponent method of the edited Form, in comparison to previous versions.

We have made it so, that the designer will be able to successfully handle code that was serialized (generated) by Form designers of previous versions.

When you for example open an application created with for example VWG v6.3.x and load the design-view of a Form or UserControl, the code that was serialized by the v6.3.x Form designer will be read, and changes will be made by the new Form designer, adding VWG v6.4.x (or later) code.
You should be aware that this v6.4.x (or later) code may not work properly if you then take it back to VWG v6.3.x.

Application Configuration Manager

Accessing the Application Configuration Manager was possible in two ways in version 6.3, but now only the bottom one is available in the sample below to read the absolute path of the UserData folder within the Resources folder.

  • Gizmox.WebGUI.Server.Context.Config.GetDirectory("UserData")
  • Gizmox.WebGUI.Common.Global.Context.Config.GetDirectory("UserData")

References

Articles

Issue Tracker










Personal tools