private void UpdateStateAndPalettes() { // Update state values used for the background/border handler _backBorder.SetState(GetGalleryState()); // Update enabled state _drawDocker.Enabled = Enabled; // Find the new state of the main view element PaletteState state; if (IsActive) { state = PaletteState.Tracking; } else { state = PaletteState.Normal; } _drawDocker.ElementState = state; }