public void Init(Model model) {
			InitializeComponent();

			try {
				OnCompleted += () => {
					disposables.Dispose();
				};

				disposables.Add(Observable.FromEventPattern<MouseWheelEventArgs>(scroll, "PreviewMouseWheel")
					.Subscribe(evarg => {
						scroll.ScrollToVerticalOffset(-1 * evarg.EventArgs.Delta);
					})
				);

				listReceivers.ItemsSource = model.receivers;

				listReceivers.CreateBinding(ListBox.SelectedValueProperty, model, x => x.selection, (m, o) => {
					m.selection = o;
				});

				var createReceiverCommand = new DelegateCommand(
					() => Success(new Result.Create(model)),
					() => true
				);
				createReceiverButton.Command = createReceiverCommand;

				var deleteReceiverCommand = new DelegateCommand(
					() => Success(new Result.Delete(model)),
					() => model.selection != null
				);
				deleteReceiverButton.Command = deleteReceiverCommand;

				var modifyReceiverCommand = new DelegateCommand(
					() => Success(new Result.Modify(model)),
					() => model.selection != null
				);
				modifyReceiverButton.Command = modifyReceiverCommand;

				disposables.Add(
					model
						.GetPropertyChangedEvents(m => m.selection)
						.Subscribe(v => {
							modifyReceiverCommand.RaiseCanExecuteChanged();
							deleteReceiverCommand.RaiseCanExecuteChanged();
						})
				);
			} catch(Exception err) {
				dbg.Error(err);
			}
		}
		private void Init(Model model) {
			OnCompleted += () => {
				disposables.Dispose();
			};
			this.DataContext = model;

			var userManagementEventArgs = activityContext.container.Resolve<IUserManagementEventArgs>();

			var createUserCommand = new DelegateCommand(
				() => Success(new Result.CreateUser(model)),
				() => true
			);
			var deleteUserCommand = new DelegateCommand(
				() => Success(new Result.DeleteUser(model)),
				() => model.selection != null
			);
			var modifyUserCommand = new DelegateCommand(
				() => Success(new Result.ModifyUser(model)),
				() => model.selection != null
			);
			disposables.Add(
				model
					.GetPropertyChangedEvents(m => m.selection)
					.Subscribe(v => {
						modifyUserCommand.RaiseCanExecuteChanged();
						deleteUserCommand.RaiseCanExecuteChanged();
					})
			);
			var downloadPoliciesCommand = new DelegateCommand(
				() => {
					var dlg = new SaveFileDialog();
					dlg.FileName = userManagementEventArgs.Manufacturer + "-" + userManagementEventArgs.DeviceModel + "-policies.txt";
					dlg.Filter = "Text files (*.txt) |*.txt|All files (*.*)|*.*";
					if (dlg.ShowDialog() == true) {
						Success(new Result.DownloadPolicy(model, dlg.FileName));
					}
				},
				() => true
			);
			var uploadPoliciesCommand = new DelegateCommand(
				() => {
					var dlg = new OpenFileDialog();
					if (dlg.ShowDialog() == true) {
						Success(new Result.UploadPolicy(model, dlg.FileName));
					}
				},
				() => true
			);
			InitializeComponent();

			Localization();

			usersList.ItemsSource = model.users;
			usersList.CreateBinding(
				ListBox.SelectedValueProperty, model,
				m => m.selection,
				(m, v) => m.selection = v
			);
			createUserButton.Command = createUserCommand;
			modifyUserButton.Command = modifyUserCommand;
			deleteUserButton.Command = deleteUserCommand;
			uploadPoliciesButton.Command = uploadPoliciesCommand;
			downloadPoliciesButton.Command = downloadPoliciesCommand;
		}