private void textControl_Loaded(object sender, RoutedEventArgs e)
{
textControl.Focus();
textControl.Selection.Text = "Hello World. Today's date: ";
TXTextControl.DocumentServer.Fields.DateField date = new TXTextControl.DocumentServer.Fields.DateField();
// we only want to display the date
date.Format = "d";
date.ApplicationField.ShowActivated = true;
date.ApplicationField.DoubledInputPosition = true;
// set the current date to the field's content
date.Date = DateTime.Now;
textControl.ApplicationFields.Add(date.ApplicationField);
TXTextControl.DocumentServer.Fields.FormCheckBox ck = new TXTextControl.DocumentServer.Fields.FormCheckBox();
ck.Text = "true";
ck.ApplicationField.ShowActivated = true;
ck.ApplicationField.DoubledInputPosition = true;
textControl.ApplicationFields.Add(ck.ApplicationField);
CheckBoxContentControl ck1 = new CheckBoxContentControl();
ck1.Checked = true;
ck1.ApplicationField.ShowActivated = true;
ck1.ApplicationField.DoubledInputPosition = true;
textControl.ApplicationFields.Add(ck1.ApplicationField);
textControl.FontSize = 24;
}
这是在源码基础上添加了一个CheckBoxContentControl ck1 = new CheckBoxContentControl(); |