xix
■ Contents
■Chapter 20: Creating Data and Presentation Extensions ����������������������������������� 655
Introduction ������������������������������������������������������������������������������������������������������������������ 655
Creating a Business Type Extension ����������������������������������������������������������������������������� 656
Associating Custom Controls with Business Types ���������������������������������������������������������������������������� 657
Enforcing Validation ���������������������������������������������������������������������������������������������������������������������������� 657
Associating Validation Logic with a Business Type ����������������������������������������������������������������������������� 659
Defining Property Sheet Attributes �����������������������������������������������������������������������������������������������������659
Applying Validation Logic �������������������������������������������������������������������������������������������������������������������� 660
Creating Custom Property Editor Windows �����������������������������������������������������������������������������������������665
Using Your Business Type ������������������������������������������������������������������������������������������������������������������� 674
Creating a Custom Shell Extension ������������������������������������������������������������������������������ 675
Preparing Your Project ������������������������������������������������������������������������������������������������������������������������ 675
Defining the Look of Your Shell ����������������������������������������������������������������������������������������������������������� 676
Binding Data to Your Shell ������������������������������������������������������������������������������������������������������������������ 680
Displaying Your Application’s Logo ����������������������������������������������������������������������������������������������������� 681
Adding Code That Supports Our Custom Shell������������������������������������������������������������������������������������681
Managing Screens ������������������������������������������������������������������������������������������������������������������������������700
Executing Commands ������������������������������������������������������������������������������������������������������������������������� 701
Performing Navigation ������������������������������������������������������������������������������������������������������������������������ 702
Persisting User Settings ��������������������������������������������������������������������������������������������������������������������� 702
Setting the Name and Description ������������������������������������������������������������������������������������������������������ 704
Using Your Custom Shell ��������������������������������������������������������������������������������������������������������������������� 705
Creating a Custom Theme Extension ���������������������������������������������������������������������������� 706
Applying a Different Font �������������������������������������������������������������������������������������������������������������������� 706
Setting Different Colors ���������������������������������������������������������������������������������������������������������������������� 707
Creating a Screen Template Extension ������������������������������������������������������������������������� 708
Setting Template Properties ��������������������������������������������������������������������������������������������������������������� 709
Defining the Data-Source Type ����������������������������������������������������������������������������������������������������������� 712
Generating Screen Controls ����������������������������������������������������������������������������������������������������������������712
Generating Screen Code ��������������������������������������������������������������������������������������������������������������������� 716
Creating More Complex Screen Templates ����������������������������������������������������������������������������������������� 719