iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
There is a serious issue with the WebAqua’s StackButtons. Adding StackButtons at runtime to any Button.StackButtons collection after the toolbar has been shown, will result in a fatal exception from the WebAqua assembly. Specifically the exception will surface the next time the button containing the newly added StackButton is clicked. Here is the resulting unhandled error.
System.NullReferenceException: Object reference not set to an instance of an object. at ISNet.Silverlight.WebAqua.WebFishEye.ƒ__(WebFishEyeButton button) at ISNet.Silverlight.WebAqua.WebFishEye.š__(Object sender, MouseEventArgs e) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
WebAqua version == 2.0.1000.220
Currently WebAqua will cause an error if we try to modify button collection during click event handler. A bug report has been submitted to the developer. We will inform you if there is any update or progress regarding this issue.
It doesn't seem that you've grasped the full scope of the issue. The button collection seems to be unmodifiable from any event or code after it has been loaded. NOT JUST A CLICK EVENT. For example, the following code demonstrates adding a StackButton on a 5 second delay. This will also crash the FishEye when the button is clicked.
public MainPage() { InitializeComponent(); AddStackButton(); AddStackButtonWithDelay(5); } private void AddStackButtonWithDelay(double delayDuration) { Storyboard toolbarDelay = new Storyboard() { BeginTime = TimeSpan.FromSeconds(delayDuration) }; toolbarDelay.Completed += (s, e) => AddStackButton(); toolbarDelay.Begin(); } private void AddStackButton() { WebFishEyeButton button = _MainToolbar.FindButton("cmdTools"); if (button.StackButtons == null) { button.StackButtons = new ObservableCollection<WebFishEyeStackButton>(); } string stackText = string.Format("StackButton{0}", _StackCounter++); WebFishEyeStackButton stackButton = new WebFishEyeStackButton(); stackButton.ItemName = stackText; stackButton.Text = stackText; stackButton.ImageSource = new BitmapImage(new Uri("Resources/toolbox.128.png", UriKind.Relative)); button.StackButtons.Add(stackButton); }
In your scenario, you will need to invoke the RefreshUIElement function in the WebFishEye in order to render the new stack button. Here is the modified snippet for the AddStackButtonWithDelay
private void AddStackButtonWithDelay(double delayDuration){ Storyboard toolbarDelay = new Storyboard() { BeginTime = TimeSpan.FromSeconds(delayDuration) }; toolbarDelay.Completed += (s, e) => { AddStackButton(); _MainToolbar.RefreshUIElement(); }; toolbarDelay.Begin();}
During OnClick event handler, you will also need to invoke this method as well. However, in the current version of WebFishEye this will result in an error. The proposed fix is to set the event parameter Handle property to True, currently the Handle property is not available. This fix will be available in the next build of WebFishEye.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname