Update 493108-WPF InvalidCastException when displaying a checked MenuItem.md
parent
72ff6fcab1
commit
ea843db49e
|
@ -1,6 +1,6 @@
|
|||
## WPF InvalidCastException when displaying a checked MenuItem
|
||||
# WPF InvalidCastException when displaying a checked MenuItem
|
||||
|
||||
### Symptoms
|
||||
## Symptoms
|
||||
WPF throws an InvalidCastException when an application displays a MenuItem,
|
||||
provided the following conditions are all met:
|
||||
|
||||
|
@ -21,7 +21,7 @@ and the callstack begins with
|
|||
at System.Windows.Shapes.Shape.GetNaturalSize()
|
||||
at System.Windows.Shapes.Shape.MeasureOverride()
|
||||
|
||||
### Cause
|
||||
## Cause
|
||||
The exception is due to a resource key conflict between the ribbon library and the theme
|
||||
file for server machines (PresentationFramework.AeroLite.dll). Both declare resources
|
||||
using the same key. The theme file includes a DynamicResource reference intended to find
|
||||
|
@ -29,5 +29,5 @@ the Geometry describing the MenuItem's checkmark, but in the circumstances descr
|
|||
the reference resolves to the ribbon library's resource. This effectively sets the value
|
||||
of Path.Data to an object of type Style. The next measure pass then encounters the exception.
|
||||
|
||||
### Resolution
|
||||
## Resolution
|
||||
This issue is fixed for all supported OS platforms prior to Windows 10 Fall Creators Update. The fix for Windows 10 Fall Creators Update is expected in a future servicing update.
|
||||
|
|
Loading…
Reference in New Issue