private void UpdateItemAtIndex(MyToolbar toolbar, int index) { Debug.Assert(toolbar == m_shownToolbar); int slot = toolbar.IndexToSlot(index); if (!toolbar.IsValidIndex(index) || !toolbar.IsValidSlot(slot)) { return; } SetGridItemAt(slot, toolbar[index], clear: true); if (toolbar.SelectedSlot == slot) { RefreshSelectedItem(toolbar); } }
private void UpdateItemAtIndex(MyToolbar toolbar, int index) { Debug.Assert(toolbar == m_shownToolbar); int slot = toolbar.IndexToSlot(index); if (!toolbar.IsValidIndex(index) || !toolbar.IsValidSlot(slot)) return; SetGridItemAt(slot, toolbar[index]); if (toolbar.SelectedSlot == slot) RefreshSelectedItem(toolbar); }