14.02 Auxiliary classes. WHAT'S IN THE BOX (Xamarin) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki

All auxiliary files are located in the following projects.

  • CommonCustomControlLibrary
  • CommonUserControlLibrary
  • CommonServicesPrismModule

In addition, MainFlyoutPage.xaml.cs, MainFlyoutPage.xaml and MainFlyoutPageViewModel.cs were added to the PrismDemoApp-project. App.xaml and App.xaml.cs files were rewritten of the project

  • PrismDemoApp

[Classes]-folder of the CommonCustomControlLibrary-project contains the following files

  • BindingContextFeedback.cs
    • this class is used to send notification from ViewModel to View (in terms of MVVM)

[Helpers]-folder of the CommonCustomControlLibrary-project contains the following files

  • AddEformModeEnumToVisibilityConverter (implements IValueConverter)
    • converts EformModeEnum into bool. If the value is equal to EformModeEnum.AddMode then XAML container is visible.
  • DelEformModeEnumToVisibilityConverter.cs (implements IValueConverter)
    • converts EformModeEnum into bool. If the value is equal to EformModeEnum.DeleteMode then XAML container is visible.
  • UpdEformModeEnumToVisibilityConverter.cs (implements IValueConverter)
    • converts EformModeEnum into bool. If the value is equal to EformModeEnum.UpdateMode then XAML container is visible.
  • StringNullOrEmptyToBoolConverter.cs (implements IValueConverter)
    • converts string into bool. If the value is null or empty then converter returns true.
  • NullableBackConverter.cs (implements IValueConverter)
    • converts input into value type or null.
  • InverseBooleanConverter.cs (implements IValueConverter)
    • converts bool into "not" bool.
  • ConvertHelper.cs
    • converts C# object value into C# Built-in value types
  • GridFlex.cs
    • defines HorizontalFlex Attached Property. HorizontalFlex adds Flex behavior to XAML Grid.
  • MaxScrollViewHeight.cs
    • XAML attachment class which implements MaxHeight category for the ScrollView. (Requires InternalContentChanged.cs XAML attachment.)
  • InternalContentChanged.cs
    • XAML attachment class which fires "InternalContent"-property changed event. (It is used by MaxScrollViewHeight.cs.)

[Themes]-folder of the CommonCustomControlLibrary-project contains the following files

  • BasicResourceDictionary.xaml
    • defines a short list of icons that are used by the generated Xamarin Custom User components
    • defines a short list of named SolidColorBrushes that are used by the generated Xamarin User components
    • Generated App.xaml-file of the PrismDemoApp-project contains the same definitions.

[Resources/Fonts]-folder of the CommonCustomControlLibrary-project contains the following files

  • MaterialIcons-Regular.ttf
    • you should add this file manually. This is free "material icons"-file. Please fine it in the internet and add it to the project.

[Properties]-folder of the CommonCustomControlLibrary-project contains the following files

  • AssemblyInfo.cs
    • declares "MaterialIcons-Regular.ttf" as "CustomIconFontAlias"

[Classes]-folder of the CommonUserControlLibrary-project contains the following files

  • ColumnSelectorItemDef.cs
    • defines class which is used by ColumnSelectorDlgUserControl, ColumnSelectorUserControl and Sform Usert Control for given View (View is a class with a subset of properties for the given Entity and all its masters in term of Entity Framework)
  • WebServiceFilterDef.cs
  • WebServiceFilterMenu.cs
  • WebServiceFilterOperator.cs
  • WebServiceFilterRslt.cs
    • defines classes which is used by WebServiceFilterItemUserControl, WebServiceFilterUserControl and Sform Usert Control for given View (View is a class with a subset of properties for the given Entity and all its masters in term of Entity Framework)
  • ValueChangedCmdParam.cs
    • this class is used by Views to sent notifications to viewModels (in terms of MVVM)

[UserControls]-folder of the CommonUserControlLibrary-project contains the following files

  • ColumnSelectorUserControl.xaml
    • defines xamarin custom user control. With ColumnSelectorUserControl end user can select subset of columns to be shown in the and Sform Usert Control for given View (View is a class with a subset of properties for the given Entity and all its masters in term of Entity Framework)
  • ColumnSelectorDlgUserControl.xaml
    • defines dialog wrapper for the ColumnSelectorUserControl.xaml
  • MessageUserControl.xaml
    • defines xamarin custom user control. MessageUserControl is used to show messages to the end user in the app.
  • MessageDlgUserControl.xaml
    • defines dialog wrapper for the MessageUserControl.xaml
  • TablePaginationUserControl.xaml
    • defines xamarin custom user control. With TablePaginationUserControl, an end user can request table data page by page from the server.
  • WebServiceFilterItemUserControl.xaml
    • defines xamarin custom user control. WebServiceFilterItemUserControl is used by WebServiceFilterUserControl.xaml. With WebServiceFilterUserControl, an end user can define complex data filter in Sform Usert Control for given View (View is a class with a subset of properties for the given Entity and all its masters in term of Entity Framework).
  • WebServiceFilterUserControl.xaml
    • defines xamarin custom user control. With WebServiceFilterUserControl, an end user can define complex data filter in Sform Usert Control for given View (View is a class with a subset of properties for the given Entity and all its masters in term of Entity Framework).
  • ProxyUserControl.xaml
    • These two custom xamarin controls are used when parent and child custom controls are defined in different Prism modules. In addition, two custom Prism Region adapters have been defined in PrismDemoApp-project:
      • ProxyUserControlRegionAdapter.cs

[ViewModels]-folder of the CommonUserControlLibrary-project contains the following files

  • ColumnSelectorItemDefViewModel.cs
    • defines a class that has the same list of properties as ColumnSelectorItemDef.cs. ColumnSelectorItemDefViewModel implements INotifyPropertyChanged interface.
  • WebServiceFilterDefViewModel.cs
    • defines a class that has the same list of properties as WebServiceFilterDef.cs. WebServiceFilterDefViewModel implements INotifyPropertyChanged interface.
  • WebServiceFilterMenuViewModel.cs
    • defines a class that has the same list of properties as WebServiceFilterMenu.cs. WebServiceFilterMenuViewModel implements INotifyPropertyChanged interface.
  • WebServiceFilterOperatorViewModel.cs
    • defines a class that has the same list of properties as WebServiceFilterOperator.cs. WebServiceFilterOperatorViewModel implements INotifyPropertyChanged interface.
  • WebServiceFilterRsltViewModel.cs
    • defines a class that has the same list of properties as WebServiceFilterRslt.cs. WebServiceFilterRsltViewModel implements INotifyPropertyChanged interface.

[Enums]-folder of the CommonInterfacesClassLibrary-project contains the following files

  • EformModeEnum.cs
    • defines Enum which is used by Eform Usert Control for given View (View is a class with a subset of properties for the given Entity and all its masters in term of Entity Framework). Eform Usert Control can be in one of three mode
      • AddMode=1,
      • UpdateMode=2,
      • DeleteMode=3

other folders of the CommonInterfacesClassLibrary-project contain declaration of interfaces for the classes defined in following projects:

  • CommonServicesPrismModule
  • CommonCustomControlLibrary
  • CommonUserControlLibrary

[AppGlblSettingsSrvc]-folder of the CommonServicesPrismModule-project contains the following files

  • AppGlblSettingsService.cs
    • defines application settings global service.
        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            ...
            IAppGlblSettingsService s = new AppGlblSettingsService();
            containerRegistry.RegisterInstance<IAppGlblSettingsService>(s);
            ...
        }  

[AppGlblLoginSrvc]-folder of the CommonServicesPrismModule-project contains the following files

  • AppGlblLoginService.cs
    • defines the service which implements login/logoff/register/change password Http-requests to the sever side

[Models]-folder of the CommonServicesPrismModule-project contains the following files

  • BearerTokenModel.cs
  • ChangePasswordModel.cs
  • RegisterModel.cs
    • these three classes are used by AppGlblLoginService.cs to login/logout/register/change password

[UserControls]-folder of the CommonServicesPrismModule-project contains the following files

  • AccessDeniedUserControl.xaml
  • ChngpswdUserControl.xaml
  • HomeUserControl.xaml
  • LoginUserControl.xaml
  • LogoutUserControl.xaml
  • PageNotFoundUserControl.xaml
  • PageNotFoundUserControl.xaml
  • RegisterUserControl.xaml
    • these are custom user controls which implement common app functionality.

[ViewModels]-folder of the CommonServicesPrismModule-project contains ViewModels (in terms of MVVM) for the user controls which have been defined in

  • [UserControls]-folder of the CommonServicesPrismModule-project
  • [UserControls]-folder of the CommonUserControlLibrary-project

[Classes]-folder of the PrismDemoApp-project contains the following files

  • ProxyUserControlRegionAdapter.cs
    • These is custom Prism Region adapter in addition to
      • ProxyUserControl.xaml
        • Thise custom xamarin control is used when parent and child custom controls are defined in different Prism modules.

[ViewModels]-folder of the PrismDemoApp-project contains the following files

  • MainFlyoutPageViewModel.cs
    • this is the implementation of the ready-to-use Dashboard in the app

[Views]-folder of the PrismDemoApp-project contains the following files

  • MainFlyoutPage.xaml
    • this is the implementation of the ready-to-use Dashboard in the app