Browse Source

ChildWindow: fixed bug in the .NET 3.5 version when setting the FocusVisualStyle in the OnApplyTemplate method. .NET 3.5 doesn't support setting Setter.Value with a ContentControl so it is a limitation of the .net framework. Luckily this works in .NET 4.0. The work around was to not use a focus visual style in the .NET 3.5 version and to set it to null.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
85533d9d49
  1. 5
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/ChildWindow.cs

5
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ChildWindow/Implementation/ChildWindow.cs

@ -430,6 +430,9 @@ namespace Microsoft.Windows.Controls
_root = GetTemplateChild("Root") as Grid;
#if VS2008
FocusVisualStyle = null;
#else
Style focusStyle = _root.Resources["FocusVisualStyle"] as Style;
if (focusStyle != null)
{
@ -437,7 +440,7 @@ namespace Microsoft.Windows.Controls
focusStyle.Setters.Add(focusStyleDataContext);
FocusVisualStyle = focusStyle;
}
#endif
_root.Children.Add(_modalLayerPanel);
}

Loading…
Cancel
Save