A XAML control called DSNumSchemeCtrl is used to support numbering schemes in Data Standard dialogs for the Vault Client, Inventor Vault Add-in, and AutoCAD Vault Add-in.
The following lines are required in the XAML file to show the UI controls displayed in the preceding image.
... <Label Content="{Binding UIString[LBL10]}" Grid.Column="0" Grid.Row="6" /> <ComboBox Grid.Column="1" Grid.Row="6" Name="NumSchms" SelectedIndex="0" Style="{StaticResource NumSchmStyle}"></ComboBox> <Label Content="{Binding UIString[LBL31]}" Grid.Column="0" Grid.Row="8"></Label> <WPF:DSNumSchemeCtrl Grid.Column="1" Grid.Row="8" Name="NUMSCHEME" IsEnabled="{Binding ElementName=NumSchms, Path=IsEnabled}" Scheme="{Binding ElementName=NumSchms, Path=SelectedItem}" GeneratedNumberProperty="_GeneratedNumber" /> ...
The user control DSNumSchemeCtrl has two custom attributes that are mandatory.
Use this attribute to specify the name of the numbering scheme that should be displayed in the control. In the sample, this value is bound to the selected entry in the combo box above the control. By default, the combo box contains all activated file numbering schemes. See Filtering Numbering Schemes to see how you can filter the numbering schemes.
Use this attribute to define which property holds the generated number. When clicking the OK button, the number for each DSNumSchemeCtrl is generated and assigned to the specified property.
In the default sample, the value in the property _GeneratedNumber plus the file extension determines the filename that is used to create the new file. In the next section are samples for Vault Explorer and CAD that use the generated number as well as some other property values to build the filename for the new file ("Customize the Filename"). Currently one DSNumSchemeCtrl per dialog is supported.
See Numbering Schemes Samples for examples of customized numbering schemes.