![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Dependency property not initialized in OnPropertyChanged? I have made my own class that derives from ModelVisual3D called 'PlayfieldView'. To this class I added a dependency property called 'SlotModel' of type GeometryModel3D. In XAML, I supply a property value like this: <gp:PlayfieldView.SlotModel> <GeometryModel3D Geometry="{DynamicResource TorusGeometry}" Material="{DynamicResource ERRasterChecker}" /> </gp:PlayfieldView.SlotModel> In my class, I have overridden OnPropertyChanged and I do get notified whenever the property is set by the XAML deserializer. The problem is that when the property is set, the Geometry and Material properies of the GeometryModel3D instance supplied by the deserializer are both null. I know the dynamic resources 'TorusGeometry' and 'ERRasterChecker' both exist and I know they load just fine. If I create a Model3DGroup in XAML and drop in a GeometryModel3D using those resource names the object appears as expected. Why are both geometry and material null when my dependency property is set (OnPropertyChanged)? I would like to create an array of GeometryModel3D instances based on the one applied to my dynamic property and add them as the content of my specialized class at runtime. I have the code written, but since the geometry and material are both null, nothing appears in the scene. Thanks, Jared |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Exception: The ConnectionString property has not been initialized | .NET General | |||