コード例 #1
0
        /// <summary>
        /// Cleans up SelectedCheckButton property
        /// </summary>
        /// <param name="index">The index of the object that was removed.</param>
        /// <param name="value">The object that was removed.</param>
        protected override void OnRemoveComplete(int index, object value)
        {
            base.OnRemoveComplete(index, value);

            ToolbarCheckButton oldBtn = (ToolbarCheckButton)value;
            ToolbarCheckGroup  group  = ParentCheckGroup;

            if (!Reloading && (group != null) && oldBtn.Selected)
            {
                // The selected button was removed
                group.ResolveSelectedItems();
            }

            oldBtn.SetParentCheckGroup(null);
            oldBtn.SetParentToolbar(null);
        }
コード例 #2
0
 /// <summary>
 /// Sets properties of the ToolbarCheckButton before being added.
 /// </summary>
 /// <param name="item">The ToolbarCheckButton to be set.</param>
 private void SetItemProperties(ToolbarCheckButton item)
 {
     item.SetParentToolbar(ParentToolbar);
     item.SetParentCheckGroup(ParentCheckGroup);
 }
コード例 #3
0
 /// <summary>
 /// Sets properties of the ToolbarCheckButton before being added.
 /// </summary>
 /// <param name="item">The ToolbarCheckButton to be set.</param>
 private void SetItemProperties(ToolbarCheckButton item)
 {
     item.SetParentToolbar(ParentToolbar);
     item.SetParentCheckGroup(ParentCheckGroup);
 }