Advanced UI Design Using WPF Webcast 2009 Pt2
Advanced UI Design Using WPF Webcast 2009 Pt2
in AutoCAD Part 2
Fenton Webb
Senior Developer Specialist
About the Presenter
Fenton Webb
Developer Technical Services
Americas
Autodesk, Inc
Fenton has been a member of the Autodesk DevTech team since 2000. Originally a member of
our EMEA team, he has recently relocated to California to work for DevTech
Americas. Fenton is an expert in all the AutoCAD APIs, AutoCAD OEM, RealDWG and Revit.
He particularly enjoys travelling to evangelise the APIs he support at our annual Developer
Days conferences.
Before joining Autodesk, Fenton worked for an ADN partner developing ObjectARX
applications in the Civil and Structural Engineering domain.
Webcast Objective
OneWay Scenarios
Modal access to data
Working with pure CLR properties, like Boolean, String
TwoWay Scenarios
Modeless access to data
CLR Properties require work
Implement INotifyPropertyChanged interfaces
WPF – Databinding, Databinding, Databinding
Harnessing
OneWay Scenario
Only Modal access to data
Pure CLR properties Demo
CLR properties are raw Modal Binding to Native CLR
No Event mechanism
Demonstrating
Binding to CLR class
OneWay - UI Updates Data
WPF Databinding - Demos
To a CLR property using INotifyPropertyChanged
TwoWay Scenario
Modeless access to data
Pure CLR properties Demo
CLR properties are still raw Modeless Binding to Native CLR
INotifyPropertyChanged
Subscribe to PropertyChanged
Demonstrating
Fire notifications in get/set
Binding to CLR class
Implements INotifyPropertyChanged
WPF Databinding - Demos
To a DependencyProperty
TwoWay Scenario
Replace CLR properties
DependencyProperty Demo
Modeless access to data Modeless Binding to
Everything is automatic DependencyProperty
Have to implement get/set
Demonstrating
Binding to DependencyObject class
WPF Databinding - Demos
To an AutoCAD CLR Database property
OneWay Scenario
Only Modal access to data
Still CLR properties Demo
No Event mechanism Modal Binding to AutoCAD
AutoCAD Database Property CLR Property
Must be opened for Write!
Demonstrating
Binding to AutoCAD Database Property
Must be opened for write
OneWay - UI Updates Data
WPF Databinding - Demos
To an AutoCAD CLR Extended Database property
TwoWay Scenario
Modeless access to data
Still CLR properties
No Event mechanism
AutoCAD Database Property
Must be opened for Write!
Not easy!
WPF Databinding Data Layer
Modeless AutoCAD TwoWay!
Encapsulates
UI to drawing data transfer
Drawing to UI data transfer
CollectionChanged PropertyChanged
TwoWay Scenario
Modeless access to data
Still CLR properties Demo
No Event mechanism Modeless Binding to AutoCAD
AutoCAD Database Property CLR Property
Must be opened for Write!
Demonstrating
Binding to AutoCAD Database Property
Must be opened for write
OneWay - UI Updates Data
WPF Databinding - Demos
To an AutoCAD CLR Database property using UIBindings
Any-Way Scenario!!
Modal or Modeless!!
So EASY! Demo
First version Binding to AutoCAD CLR Property
using UIBindings
Demonstrating
Binding to AutoCAD Database Property
So much easier!
WPF Databinding - Demos
Using a Custom Ribbon Control
TwoWay Scenario
Modeless
Using INotifyPropertyChanged Demo
Just as an example Binding to AutoCAD CLR Property
You can use UIBindings also using INotifyPropertyChanged
Contextual
Demonstrating
Binding to AutoCAD Database Property
So much easier!
WPF
Further reading...