Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ChooseProviderView.xaml.cs
1using CommunityToolkit.Mvvm.Input;
2
4{
5 public partial class ChooseProviderView
6 {
7 public static ChooseProviderView Create()
8 {
9 return Create<ChooseProviderView>();
10 }
11
12 private readonly ChooseProviderViewModel viewModel;
13
15 {
16 this.InitializeComponent();
17 this.ContentViewModel = ViewModel;
18 this.viewModel = ViewModel;
19 }
20/*
21 [RelayCommand]
22 public void SelectButton(object Control)
23 {
24 if (Control is not ButtonType Button)
25 return;
26
27 foreach (object Item in this.PurposesContainer)
28 {
29 if ((Item is VisualElement Element) &&
30 (Element.BindingContext is ButtonInfo ButtonInfo))
31 {
32 if (Button == ButtonInfo.Button)
33 {
34 VisualStateManager.GoToState(Element, VisualStateManager.CommonStates.Selected);
35 this.viewModel.SelectedButton = ButtonInfo;
36
37 if (ButtonInfo.Button == ButtonType.Change)
38 {
39 // unselect it after the QR scan is open
40 this.Dispatcher.DispatchDelayed(TimeSpan.FromMilliseconds(200), () =>
41 {
42 VisualStateManager.GoToState(Element, VisualStateManager.CommonStates.Normal);
43 this.viewModel.SelectedButton = null;
44 });
45 }
46 }
47 else
48 VisualStateManager.GoToState(Element, VisualStateManager.CommonStates.Normal);
49 }
50 }
51 }
52 */
53 }
54}