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
Hi, I have attached a sample project to demonstrate an issue I experienced with the drop down menu. Please run the application and try the following:
1. Click Button 1 to show a single item drop down menu.
2. Click Update 1 to dynamically add a second menu item to the drop down menu.
3. Click Button 1 and select the new (second) menu item. Important you actually select it.
4. Click on Update 2 to dynamically remove the second menu item.
5. Click on Button 1 and move the cursor over the remaining (first) menu item.
You will receive an exception. I believe the original selection of the deleted menu item is not being cleared when it is deleted and this is causing the subsequent attempt to interact with the menu to generate an exception. Thanks, Jonathan
<Window x:Class="WpfApplication26.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ItemsControl x:Name="MyToolBar" Grid.Row="0" /> </Grid> </Window>
using System;
using System.Collections.Generic; using System.Windows; using Intersoft.Client.Framework; using Intersoft.Client.UI.Aqua.UXRibbon; namespace WpfApplication26 { public partial class MainWindow { public MainWindow() { InitializeComponent(); MyToolBar.Items.Add(_dropDownButton1 = new UXRibbonDropDownButton { Content = "Button 1" }); _dropDownButton1.DropDownOpened += DropDownButton1_OnDropDownOpened; MyToolBar.Items.Add(_updateButton1 = new UXRibbonButton { Content = "Update 1" }); _updateButton1.Click += _updateButton1_OnClick; MyToolBar.Items.Add(_updateButton2 = new UXRibbonButton { Content = "Update 2" }); _updateButton2.Click += _updateButton2_OnClick; for (var i = 0; i < 1; i++) { _myItems.Add(String.Format("Item {0}", i + 1)); } } private readonly UXRibbonDropDownButton _dropDownButton1; private readonly UXRibbonButton _updateButton1; private readonly UXRibbonButton _updateButton2; private readonly List<String> _myItems = new List<String>(); private void DropDownButton1_OnDropDownOpened(Object sender, ISRoutedEventArgs eventArgs) { // REQUIRED TO SUPPRESS EXCEPTION //if (_dropDownButton1.Items.Count > 0) ((UXRibbonMenuItem)_dropDownButton1.Items[0]).IsSelected = true; _dropDownButton1.SelectedIndex = -1; // REQUIRED TO SUPPRESS EXCEPTION _dropDownButton1.Items.Clear(); foreach (var myItem in _myItems) { _dropDownButton1.Items.Add(new UXRibbonMenuItem { Header = myItem }); } } private void _updateButton1_OnClick(Object sender, RoutedEventArgs eventArgs) { _myItems.Remove("New Item"); _myItems.Insert(0, "New Item"); } private void _updateButton2_OnClick(Object sender, RoutedEventArgs eventArgs) { _myItems.Remove("Item 1"); } } }
I’m afraid that you forgot to enclose the sample project as attachment.Please try re-attach it so that we can assist you further.
Hi, there was no physical attachment, the sample project is included within the message as inserted code. Thanks, Jonathan
I have tested the sample project which is included within the message (as inserted code), however I was unable to reproduce the reported problem. I never receive an exception after run the step #5.
I enclosed the video that shows step-by-step of the test. please kindly let me know if there are any steps that I missed during my attempt to reproduce the issue.
Hi, in step three you have to click the second (last) menu item labled "Item 1", not the first one. Thanks, Jonathan
Yes, I forgot to click the second (last) menu item labeled “Item 1”. Thank you for correcting this.
Another video shows the second attempt to reproduce the problematic behavior. Unfortunately, I’m still unable to replicate the exception after move the cursor over the remaining (first) menu item for about six second.
Hi, not sure if it makes any difference, but I'm using a Windows 7 64 bit laptop with a 120 dpi monitor. I also noticed that both lines between the "REQUIRED TO SUPPRESS EXCEPTION" comments are commented out in my copy. However I don't think this makes any difference. I have attached a copy of the stack trace from my exception. Thanks, Jonathan
Finally I was able to reproduce the reported problem. It was the lines between the “REQUIRED TO SUPPRESS EXCEPTION” comments are not commented out in my copy.
The development team has confirmed this as bug. This problem is filed under work item #1099. I will keep you informed with any news I heard from the team regarding work item #1099.
Edited - December 22, 2011 01:30 AMReason: update latest status of work item #1099
I have good news regarding work item #1099.
This morning, the development team informed me that they have rectified the reported problem. They gave me a nightly-build hotfix to retest the problem with the sample project.
After apply the nightly-build hotfix, the evaluation showed a good result. The reported problem is no longer persisting.
The nightly-build will be officially released on our regular schedule.
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