void LoadPadContentIfRequired() { if (placeholder != null && placeholder.IsVisible) { placeholder = null; optionPanel = descriptor.OptionPanel; if (optionPanel != null) { // some panels initialize themselves on the first LoadOptions call, // so we need to load the options before attaching event handlers optionPanel.LoadOptions(); ICanBeDirty dirty = optionPanel as ICanBeDirty; if (dirty != null) { dirty.IsDirtyChanged += options.OnIsDirtyChanged; } this.SetContent(optionPanel.Control); } } }
void LoadPadContentIfRequired() { if (placeholder != null && placeholder.IsVisible) { placeholder = null; optionPanel = descriptor.OptionPanel; if (optionPanel != null) { // some panels initialize themselves on the first LoadOptions call, // so we need to load the options before attaching event handlers optionPanel.LoadOptions(); ICanBeDirty dirty = optionPanel as ICanBeDirty; if (dirty != null) dirty.IsDirtyChanged += options.OnIsDirtyChanged; this.SetContent(optionPanel.Control); } } }