示例#1
0
        protected virtual void OnToolbarItemSelected(EventArgs e)
        {
            if (ToolbarItemSelected != null)
            {
                foreach (IToolbarItemViewExtension ve in ToolbarExtensionManager.Instance.Extensions)
                {
                    IToolbarItemViewModelExtension radioButtonVM = ve.ViewModel;
                    if (radioButtonVM.Name.EndsWith("_LAYOUT") && radioButtonVM != this)
                    {
                        Type         radioButtonType = radioButtonVM.GetType();
                        PropertyInfo isCheckedProp   = radioButtonType.GetProperty("IsChecked");
                        isCheckedProp.SetValue(radioButtonVM, false, null);
                    }
                }

                ToolbarItemSelected(this, e);
            }
        }
示例#2
0
 /// <summary>
 /// Creates a new instance of the Berico.SnagL.Events.
 /// ToolBarItemEventArgs class using the provided 
 /// IToolbarItemViewModelExtension
 /// </summary>
 /// <param name="_toolbarItem">The toolbar item involved in the event</param>
 public ToolBarItemEventArgs(IToolbarItemViewModelExtension _toolbarItem, string _scope)
 {
     ToolBarItem = _toolbarItem;
     Scope = _scope;
 }
示例#3
0
 /// <summary>
 /// Creates a new instance of the Berico.SnagL.Events.
 /// ToolBarItemEventArgs class using the provided
 /// IToolbarItemViewModelExtension
 /// </summary>
 /// <param name="_toolbarItem">The toolbar item involved in the event</param>
 public ToolBarItemEventArgs(IToolbarItemViewModelExtension _toolbarItem, string _scope)
 {
     ToolBarItem = _toolbarItem;
     Scope       = _scope;
 }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ViewModel_ToolbarItemSelected(object sender, EventArgs e)
        {
            IToolbarItemViewModelExtension toolbarItem = sender as IToolbarItemViewModelExtension;

            OnToolBarItemClicked(new ToolBarItemEventArgs(toolbarItem, this.scope));
        }