{*************************************************}
{ TeeChart Pro XAML (XAML) Canvas and Exporting   }
{ Windows Presentation Foundation Graphics / 3D   }
{ Copyright (c) 2004-2020 by Steema Software      }
{ All Rights Reserved                             }
{*************************************************}
unit TeeXAMLCanvasEditor;
{$I TeeDefs.inc}

interface

uses {$IFNDEF LINUX}
     Windows,
     {$ENDIF}
     Classes,

     Graphics, Forms, Controls, StdCtrls,

     {$IFDEF D6}
     Types,
     {$ENDIF}

     TeeXAMLCanvas;

type
  TXAMLOptions=class(TForm)
    CB3D: TCheckBox;
    procedure FormShow(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  private
    { Private declarations }
    XAML : TXAMLExportFormat;
  public
    { Public declarations }
  end;

implementation

{$IFNDEF LCL}
{$R *.DFM}
{$ELSE}
{$R *.lfm}
{$ENDIF}

procedure TXAMLOptions.FormShow(Sender: TObject);
begin
  if not Assigned(XAML) then
  begin
    XAML:=TXAMLExportFormat(Tag);

    if Assigned(XAML) then
       CB3D.Checked:=XAML.Is3D;
  end
  else
    CB3D.Enabled:=False;
end;

procedure TXAMLOptions.FormCloseQuery(Sender: TObject;
  var CanClose: Boolean);
begin
  if Assigned(XAML) then
     XAML.Is3D:=CB3D.Checked;

  CanClose:=True;
end;

initialization
  RegisterClass(TXAMLOptions);
finalization
  UnRegisterClass(TXAMLOptions);
end.

