Jennifer,I uncovered the problem. I was using code to create a toggle button, making a button into a tool, and that was causing the conflict with the editing attribute window. I changed the behavior from the button keeping the draw surface enabled to the having the draw surface enabled while the dockable window is open. The code that caused the conflict is: #region toggle group
public static string GetToggleGroup(DependencyObject obj)
{
return (string)obj.GetValue(ToggleGroupProperty);
}
public static void SetToggleGroup(DependencyObject obj, string value)
{
obj.SetValue(ToggleGroupProperty, value);
}
// Using a DependencyProperty as the backing store for ToggleGroup. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ToggleGroupProperty =
DependencyProperty.RegisterAttached("ToggleGroup", typeof(string), typeof(Utilities), new PropertyMetadata(null, OnToggleGroupPropertyChanged));
private static void OnToggleGroupPropertyChanged(DependencyObject dp, DependencyPropertyChangedEventArgs args)
{
if (!(dp is ToggleButton))
throw new ArgumentException("Toggle Group can only be set on ToggleButton");
ToggleButton button = dp as ToggleButton;
string newID = (string)args.NewValue;
string oldID = (string)args.OldValue;
if (oldID != null && groups.ContainsKey(oldID))
{
groups[newID].Remove(button);
button.Checked -= button_Checked;
}
if (newID != null)
{
if (!groups.ContainsKey(newID))
{
groups.Add(newID, new List<ToggleButton>());
}
groups[newID].Add(button);
button.Checked += button_Checked;
}
}
private static void button_Checked(object sender, RoutedEventArgs e)
{
ToggleButton button = sender as ToggleButton;
string ID = GetToggleGroup(button);
if (ID != null && groups.ContainsKey(ID))
{
foreach (ToggleButton b in groups[ID])
{
if (b != button)
b.IsChecked = false;
}
}
}
private static Dictionary<string, List<ToggleButton>> groups = new Dictionary<string, List<ToggleButton>>();
#endregion
Thanks,Chris