IUserListService Interface
Provides a list of identities to fill the Editing Permissions form.
Namespace: DevExpress.XtraRichEdit.Services
Assembly:
DevExpress.RichEdit.v24.2.Core.dll
NuGet Package:
DevExpress.RichEdit.Core
Declaration
[ComVisible(true)]
public interface IUserListService
<ComVisible(True)>
Public Interface IUserListService
The service can be used to fill the Editing Permissions Dialog at runtime. See the Range Permissions document for more information.
The code sample illustrates how to implement the IUserListService
interface in your application.
User name and group membership are represented by the MyUser object instance. When the MyUserList service is instantiated, it obtains a list of user names and stores the list in a local variable. The IUserListService.GetUsers method provides a list of user names upon request.
class MyUserListService : DevExpress.XtraRichEdit.Services.IUserListService
{
List<string> users = new List<string>();
public MyUserListService( List<MyUser> myUsers) {
foreach (MyUser user in myUsers) { users.Add(user.UserName);}
}
public IList<string> GetUsers()
{
return users;
}
}
public class MyUser
{
public MyUser(string s)
{
UserName = s;
Group = String.Empty;
}
public MyUser(string s1, string s2)
{
UserName = s1;
Group = s2;
}
public string UserName { get; set; }
public string Group { get; set; }
}
Friend Class MyUserListService
Implements DevExpress.XtraRichEdit.Services.IUserListService
Private users As New List(Of String)()
Public Sub New(ByVal myUsers As List(Of MyUser))
For Each user As MyUser In myUsers
users.Add(user.UserName)
Next user
End Sub
Public Function GetUsers() As IList(Of String) Implements DevExpress.XtraRichEdit.Services.IUserListService.GetUsers
Return users
End Function
End Class
Public Class MyUser
Public Sub New(ByVal s As String)
UserName = s
Group = String.Empty
End Sub
Public Sub New(ByVal s1 As String, ByVal s2 As String)
UserName = s1
Group = s2
End Sub
Public Property UserName() As String
Public Property Group() As String
End Class
See Also