Sample Code Revit Batch Processor 1.1.14 documentation
Based on:
Bases: INotifyDataErrorInfo
A base class for error validation in WPF view models.
Returns the errors for the specified property. Implementation of INotifyDataErrorInfo.GetErrors.
Returns True if there are any errors in the view model. Implementation of INotifyDataErrorInfo.HasErrors.
Adds a handler to the ErrorsChanged event.
Removes a handler from the ErrorsChanged event.
Raises the ErrorsChanged event for the specified property.
propertyName (str) – The name of the property that has changed.
Clears the errors for the specified property.
property_name (str) – The name of the property to clear the errors for.
Clears all errors.
Adds an error to the specified property.
property_name (str) – The name of the property to add the error to.
error_message (str) – The error message.
IsChecked property should be bound similar to this sample code: <GridViewColumn.HeaderContainerStyle>
- <Style TargetType=”GridViewColumnHeader”>
- <Setter Property=”ContextMenu”>
- <Setter.Value>
- <ContextMenu>
- <ItemsControl ItemsSource=”{Binding UniqueFamilyNames}”>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <CheckBox
Content=”{Binding Value}” IsChecked=”{Binding IsChecked, Mode=TwoWay}” <<<— here Command=”{Binding CheckCommand}”/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ContextMenu>
</Setter.Value>
</Setter>
</Style> </GridViewColumn.HeaderContainerStyle>
Bases: ViewModelBase
A filter item for a view model view.
Is used in column context menu filters to filter the view based on the value of the item.
value – the value of the item
refresh_view_method – the method to call to refresh the view
Gets the value of the item displayed in the context menu.
Gets the is checked value of the item.
Based on:
Bases: ViewModelBase
A base class for WPF view models.
Based on:
Bases: INotifyPropertyChanged
A base class for WPF view models.
Raises property changed event for handlers
propertyName (str): the name of the property which has changed
Adds a handler to the property changed event.
Removes a handler from the property changed event.