wpf-devexpress-dot-xpf-dot-richedit-dot-richeditcontrol-dot-removeservice-x28-system-dot-type-x29.md
Removes the service of specified type from the service container.
Namespace : DevExpress.Xpf.RichEdit
Assembly : DevExpress.Xpf.RichEdit.v25.2.dll
NuGet Package : DevExpress.Wpf.RichEdit
public void RemoveService(
Type serviceType
)
Public Sub RemoveService(
serviceType As Type
)
| Name | Type | Description |
|---|---|---|
| serviceType | Type |
The type of service to remove.
|
The RichEdit Control implements IServiceProvider and IServiceContainer interfaces. In addition to providing services, it also provides a mechanism for adding and removing services. To obtain a service, call the RichEditControl.GetService method.
The following code snippets (auto-collected from DevExpress Examples) contain references to the RemoveService(Type) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-richedit-use-docvariable-fields/CS/MainWindow.xaml.cs#L41
private void richEditControl1_MailMergeStarted(object sender, MailMergeStartedEventArgs e) {
richEditControl1.RemoveService(typeof(IProgressIndicationService));
richEditControl1.AddService(typeof(IProgressIndicationService),
dxrichedit-for-wpf-how-to-implement-progress-indicator/CS/MainWindow.xaml.cs#L40
private void richEditControl1_MailMergeFinished(object sender, MailMergeFinishedEventArgs e) {
richEditControl1.RemoveService(typeof(IProgressIndicationService));
}
wpf-richedit-use-docvariable-fields/VB/MainWindow.xaml.vb#L42
Private Sub richEditControl1_MailMergeStarted(ByVal sender As Object, ByVal e As MailMergeStartedEventArgs)
Me.richEditControl1.RemoveService(GetType(IProgressIndicationService))
Me.richEditControl1.AddService(GetType(IProgressIndicationService), New MyProgressIndicatorService(Me.richEditControl1, Me.progressBarControl1))
dxrichedit-for-wpf-how-to-implement-progress-indicator/VB/MainWindow.xaml.vb#L41
Private Sub richEditControl1_MailMergeFinished(ByVal sender As Object, ByVal e As MailMergeFinishedEventArgs)
Me.richEditControl1.RemoveService(GetType(IProgressIndicationService))
End Sub
See Also