├── .editorconfig
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── a-regression.md
│ ├── b-bug-report.md
│ ├── c-feature-request.md
│ ├── d-enhancement-proposal.md
│ └── e-question.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Directory.Build.props
├── Directory.Build.targets
├── FUNDING.yml
├── LICENSE.md
├── README.md
├── RELEASE_NOTES.md
├── Samples
├── Directory.Build.props
├── Directory.Build.targets
├── MaterialMvvmSample.Android
│ ├── Assets
│ │ ├── AboutAssets.txt
│ │ └── Fonts
│ │ │ ├── Roboto-Bold.ttf
│ │ │ ├── Roboto-Medium.ttf
│ │ │ └── Roboto-Regular.ttf
│ ├── Core
│ │ └── PlatformContainer.cs
│ ├── LottieLogo1.json
│ ├── MainActivity.cs
│ ├── MaterialMvvmSample.Android.csproj
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── AboutResources.txt
│ │ ├── drawable-hdpi
│ │ ├── icon_more.png
│ │ └── icon_plus.png
│ │ ├── drawable-xhdpi
│ │ ├── icon_more.png
│ │ └── icon_plus.png
│ │ ├── drawable-xxhdpi
│ │ ├── icon_more.png
│ │ └── icon_plus.png
│ │ ├── drawable-xxxhdpi
│ │ ├── icon_more.png
│ │ └── icon_plus.png
│ │ ├── drawable
│ │ ├── ic_overflow.png
│ │ └── ic_overflow.xml
│ │ ├── layout
│ │ ├── Tabbar.axml
│ │ └── Toolbar.axml
│ │ ├── mipmap-anydpi-v26
│ │ ├── icon.xml
│ │ └── icon_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── Icon.png
│ │ ├── MaterialTextFieldView.xaml
│ │ ├── MaterialTextFieldView.xaml.cs
│ │ └── launcher_foreground.png
│ │ ├── mipmap-mdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xhdpi
│ │ ├── Icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxhdpi
│ │ ├── Icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── Icon.png
│ │ └── launcher_foreground.png
│ │ └── values
│ │ ├── colors.xml
│ │ └── styles.xml
├── MaterialMvvmSample.Core
│ ├── AppContainer.cs
│ └── MaterialMvvmSample.Core.csproj
├── MaterialMvvmSample.Uwp
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── Core
│ │ └── PlatformContainer.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── MaterialMvvmSample.Uwp.csproj
│ ├── Package.appxmanifest
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
├── MaterialMvvmSample.iOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon1024.png
│ │ │ ├── Icon120.png
│ │ │ ├── Icon152.png
│ │ │ ├── Icon167.png
│ │ │ ├── Icon180.png
│ │ │ ├── Icon20.png
│ │ │ ├── Icon29.png
│ │ │ ├── Icon40.png
│ │ │ ├── Icon58.png
│ │ │ ├── Icon60.png
│ │ │ ├── Icon76.png
│ │ │ ├── Icon80.png
│ │ │ └── Icon87.png
│ │ └── icon_more.imageset
│ │ │ ├── Contents.json
│ │ │ ├── icon_more.png
│ │ │ ├── icon_more@2x.png
│ │ │ └── icon_more@3x.png
│ ├── Core
│ │ └── PlatformContainer.cs
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── LottieLogo1.json
│ ├── Main.cs
│ ├── MaterialMvvmSample.iOS.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Renderers
│ │ └── MViewCellRenderer.cs
│ └── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── Fonts
│ │ ├── Roboto-Bold.ttf
│ │ ├── Roboto-Medium.ttf
│ │ └── Roboto-Regular.ttf
│ │ ├── LaunchScreen.storyboard
│ │ ├── ic_overflow.png
│ │ ├── ic_overflow@2x.png
│ │ ├── ic_overflow@3x.png
│ │ ├── xf_checkbox_selected.png
│ │ ├── xf_checkbox_selected@2x.png
│ │ └── xf_checkbox_selected@3x.png
└── MaterialMvvmSample
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Controls
│ └── CustomNavigationPage.cs
│ ├── Images
│ └── slideshow-black-18dp.svg
│ ├── MaterialMvvmSample.csproj
│ ├── Utilities
│ ├── Dialogs
│ │ ├── BaseDialogService.cs
│ │ ├── IJobDialogService.cs
│ │ └── JobDialogService.cs
│ ├── INavigationService.cs
│ ├── NavigationService.cs
│ └── ViewFactory.cs
│ ├── ViewModels
│ ├── BaseViewModel.cs
│ ├── CheckboxesViewModel.cs
│ ├── ChipFontSizeViewModel.cs
│ ├── ICleanUp.cs
│ ├── LandingViewModel.cs
│ ├── MainViewModel.cs
│ ├── MaterialButtonViewModel.cs
│ ├── MaterialCardViewModel.cs
│ ├── MaterialCircularViewModel.cs
│ ├── MaterialDialogsViewModel.cs
│ ├── MaterialMenuButtonViewModel.cs
│ ├── MaterialPickerViewModel.cs
│ ├── MaterialTextFieldViewModel.cs
│ ├── PropertyChangeAware.cs
│ └── SecondViewModel.cs
│ └── Views
│ ├── BaseView.cs
│ ├── CheckboxesView.xaml
│ ├── CheckboxesView.xaml.cs
│ ├── ChipFontSizeView.xaml
│ ├── ChipFontSizeView.xaml.cs
│ ├── LandingView.xaml
│ ├── LandingView.xaml.cs
│ ├── MainView.xaml
│ ├── MainView.xaml.cs
│ ├── MaterialButtonView.xaml
│ ├── MaterialButtonView.xaml.cs
│ ├── MaterialCardView.xaml
│ ├── MaterialCardView.xaml.cs
│ ├── MaterialCircularView.xaml
│ ├── MaterialCircularView.xaml.cs
│ ├── MaterialDialogsView.xaml
│ ├── MaterialDialogsView.xaml.cs
│ ├── MaterialMenuButtonView.xaml
│ ├── MaterialMenuButtonView.xaml.cs
│ ├── MaterialPicker.xaml
│ ├── MaterialPicker.xaml.cs
│ ├── MaterialTextFieldView.xaml
│ ├── MaterialTextFieldView.xaml.cs
│ ├── SecondView.xaml
│ ├── SecondView.xaml.cs
│ └── ViewNames.cs
├── XF.Material.sln
├── XF.Material
├── FormsResources
│ ├── MaterialColorConfiguration.cs
│ ├── MaterialColors.xaml
│ ├── MaterialColors.xaml.cs
│ ├── MaterialConfiguration.cs
│ ├── MaterialConstants.cs
│ ├── MaterialSizes.xaml
│ ├── MaterialSizes.xaml.cs
│ └── Typography
│ │ ├── MaterialFontConfiguration.cs
│ │ ├── MaterialTypeScale.cs
│ │ ├── MaterialTypography.xaml
│ │ └── MaterialTypography.xaml.cs
├── Info.plist
├── Material.cs
├── Models
│ ├── MaterialMenuItem.cs
│ └── MaterialMenuResult.cs
├── Platforms
│ ├── Android
│ │ ├── ImageSourceExtensions.cs
│ │ ├── Material.cs
│ │ ├── MaterialHelper.cs
│ │ ├── Renderers
│ │ │ ├── Internals
│ │ │ │ ├── MaterialBoxViewRenderer.cs
│ │ │ │ ├── MaterialDatePickerRenderer.cs
│ │ │ │ ├── MaterialElementRenderer.cs
│ │ │ │ └── MaterialEntryRenderer.cs
│ │ │ ├── MaterialButtonRenderer.cs
│ │ │ ├── MaterialCardRenderer.cs
│ │ │ ├── MaterialCircularLoadingViewRenderer.cs
│ │ │ ├── MaterialDrawableHelper.cs
│ │ │ ├── MaterialIconRenderer.cs
│ │ │ ├── MaterialLabelRenderer.cs
│ │ │ ├── MaterialMenuRenderer.cs
│ │ │ └── MaterialNavigationPageRenderer.cs
│ │ └── Utilities
│ │ │ └── MaterialUtility.cs
│ ├── Ios
│ │ ├── Delegates
│ │ │ └── MaterialRippleGestureRecognizerDelegate.cs
│ │ ├── GestureRecognizers
│ │ │ └── MaterialRippleGestureRecognizer.cs
│ │ ├── ImageSourceExtensions.cs
│ │ ├── Material.cs
│ │ ├── MaterialHelper.cs
│ │ ├── Renderers
│ │ │ ├── Internals
│ │ │ │ ├── MaterialBoxViewRenderer.cs
│ │ │ │ ├── MaterialElementRenderer.cs
│ │ │ │ └── MaterialEntryRenderer.cs
│ │ │ ├── MaterialButtonRenderer.cs
│ │ │ ├── MaterialCardRenderer.cs
│ │ │ ├── MaterialCircularLoadingViewRenderer.cs
│ │ │ ├── MaterialDatePickerRenderer.cs
│ │ │ ├── MaterialIconRenderer.cs
│ │ │ ├── MaterialLabelRenderer.cs
│ │ │ ├── MaterialMenuRenderer.cs
│ │ │ └── MaterialNavigationPageRenderer.cs
│ │ └── Utility
│ │ │ └── MaterialUtility.cs
│ └── Uap
│ │ ├── ImageSourceExtensions.cs
│ │ ├── Material.cs
│ │ └── Renderers
│ │ └── DropShadowViewRenderer.cs
├── Resources
│ ├── AboutResources.txt
│ ├── animator
│ │ └── material_button_state_list_anim.xml
│ ├── drawable-v21
│ │ ├── drawable_ripple.xml
│ │ ├── drawable_ripple_image.xml
│ │ ├── drawable_ripple_outlined.xml
│ │ ├── drawable_ripple_outlined_with_icon.xml
│ │ ├── drawable_ripple_text.xml
│ │ └── drawable_ripple_with_icon.xml
│ ├── drawable
│ │ ├── drawable_selector.xml
│ │ ├── drawable_shape.xml
│ │ ├── drawable_shape_text.xml
│ │ ├── drawable_shape_with_icon.xml
│ │ ├── xf_arrow_dropdown.xml
│ │ ├── xf_arrow_right.xml
│ │ ├── xf_check.xml
│ │ ├── xf_checkbox_selected.xml
│ │ ├── xf_checkbox_unselected.xml
│ │ ├── xf_clear.xml
│ │ ├── xf_error.xml
│ │ ├── xf_radio_button_selected.xml
│ │ └── xf_radio_button_unselected.xml
│ ├── loading_animation.json
│ ├── raw
│ │ └── loading_animation.json
│ ├── values
│ │ ├── Strings.xml
│ │ └── dimens.xml
│ ├── xf_arrow_dropdown.png
│ ├── xf_arrow_dropdown@2x.png
│ ├── xf_arrow_dropdown@3x.png
│ ├── xf_arrow_right.png
│ ├── xf_arrow_right@2x.png
│ ├── xf_arrow_right@3x.png
│ ├── xf_checkbox_selected.png
│ ├── xf_checkbox_selected@2x.png
│ ├── xf_checkbox_selected@3x.png
│ ├── xf_checkbox_unselected.png
│ ├── xf_checkbox_unselected@2x.png
│ ├── xf_checkbox_unselected@3x.png
│ ├── xf_clear.png
│ ├── xf_clear@2x.png
│ ├── xf_clear@3x.png
│ ├── xf_error.png
│ ├── xf_error@2x.png
│ ├── xf_error@3x.png
│ ├── xf_radio_button_selected.png
│ ├── xf_radio_button_selected@2x.png
│ ├── xf_radio_button_selected@3x.png
│ ├── xf_radio_button_unselected.png
│ ├── xf_radio_button_unselected@2x.png
│ └── xf_radio_button_unselected@3x.png
├── UI
│ ├── CardView.xaml
│ ├── CardView.xaml.cs
│ ├── Dialogs
│ │ ├── BaseMaterialModalPage.cs
│ │ ├── Configurations
│ │ │ ├── BaseMaterialDialogConfiguration.cs
│ │ │ ├── BaseMaterialListDialogConfiguration.cs
│ │ │ ├── BaseMaterialModalDialogConfiguration.cs
│ │ │ ├── MaterialAlertDialogConfiguration.cs
│ │ │ ├── MaterialConfirmationDialogConfiguration.cs
│ │ │ ├── MaterialInputDialogConfiguration.cs
│ │ │ ├── MaterialLoadingDialogConfiguration.cs
│ │ │ ├── MaterialMenuConfiguration.cs
│ │ │ ├── MaterialSimpleDialogConfiguration.cs
│ │ │ └── MaterialSnackbarConfiguration.cs
│ │ ├── IMaterialAwaitableDialog.cs
│ │ ├── IMaterialDialog.cs
│ │ ├── IMaterialModalPage.cs
│ │ ├── Internals
│ │ │ └── ActionModel.cs
│ │ ├── MaterialAlertDialog.xaml
│ │ ├── MaterialAlertDialog.xaml.cs
│ │ ├── MaterialConfirmationDialog.xaml
│ │ ├── MaterialConfirmationDialog.xaml.cs
│ │ ├── MaterialDialog.cs
│ │ ├── MaterialDialogFragment.xaml
│ │ ├── MaterialDialogFragment.xaml.cs
│ │ ├── MaterialDialogs.cs
│ │ ├── MaterialInputDialog.xaml
│ │ ├── MaterialInputDialog.xaml.cs
│ │ ├── MaterialLoadingDialog.xaml
│ │ ├── MaterialLoadingDialog.xaml.cs
│ │ ├── MaterialMenuDialog.xaml
│ │ ├── MaterialMenuDialog.xaml.cs
│ │ ├── MaterialSimpleDialog.xaml
│ │ ├── MaterialSimpleDialog.xaml.cs
│ │ ├── MaterialSnackbar.xaml
│ │ └── MaterialSnackbar.xaml.cs
│ ├── DropShadowView.cs
│ ├── IMaterialButtonControl.cs
│ ├── IMaterialTintableControl.cs
│ ├── Internals
│ │ ├── BaseMaterialInputView.xaml
│ │ ├── BaseMaterialInputView.xaml.cs
│ │ ├── BaseMaterialSelectionControl.xaml
│ │ ├── BaseMaterialSelectionControl.xaml.cs
│ │ ├── BaseMaterialSelectionControlGroup.cs
│ │ ├── IMaterialElementConfiguration.cs
│ │ ├── MaterialBoxView.cs
│ │ ├── MaterialDatePicker.cs
│ │ ├── MaterialEntry.cs
│ │ ├── MaterialInputDialogTextField.xaml
│ │ ├── MaterialInputDialogTextField.xaml.cs
│ │ ├── MaterialSelectionControlModel.cs
│ │ ├── MaterialSelectionControlType.cs
│ │ ├── MenuDialogLabel.cs
│ │ └── NullableDateChangedEventArgs.cs
│ ├── MaterialButton.cs
│ ├── MaterialButtonType.cs
│ ├── MaterialCard.cs
│ ├── MaterialCheckbox.cs
│ ├── MaterialCheckboxGroup.xaml
│ ├── MaterialCheckboxGroup.xaml.cs
│ ├── MaterialChip.xaml
│ ├── MaterialChip.xaml.cs
│ ├── MaterialCircularLoadingView.cs
│ ├── MaterialDateField.xaml
│ ├── MaterialDateField.xaml.cs
│ ├── MaterialDatePicker.cs
│ ├── MaterialElevation.cs
│ ├── MaterialHorizontalThickness.cs
│ ├── MaterialIcon.cs
│ ├── MaterialIconButton.xaml
│ ├── MaterialIconButton.xaml.cs
│ ├── MaterialLabel.cs
│ ├── MaterialMenuButton.cs
│ ├── MaterialNavigationPage.cs
│ ├── MaterialRadioButton.cs
│ ├── MaterialRadioButtonGroup.xaml
│ ├── MaterialRadioButtonGroup.xaml.cs
│ ├── MaterialSlider.xaml
│ ├── MaterialSlider.xaml.cs
│ ├── MaterialSwitch.xaml
│ ├── MaterialSwitch.xaml.cs
│ ├── MaterialTextField.xaml
│ ├── MaterialTextField.xaml.cs
│ ├── MaterialTextFieldInputType.cs
│ ├── MaterialTimePicker.cs
│ ├── MenuSelectedEventArgs.cs
│ ├── SelectedChangedEventArgs.cs
│ ├── SelectedIndexChangedEventArgs.cs
│ └── SelectedIndicesChangedEventArgs.cs
├── Utilities
│ ├── IMaterialUtility.cs
│ └── PropertyChangeAware.cs
├── XF.Material.csproj
└── readme.txt
├── appveyor.yml
├── azure-pipelines.yml
├── build.cake
├── build.ps1
├── build.sh
├── global.json
├── icon.png
└── images
├── alert2.png
├── alertconfig.png
├── button_android.jpg
├── button_contained.jpg
├── button_elevated.jpg
├── button_ios.jpg
├── button_outlined.jpg
├── button_text.jpg
├── buttons_bounds.jpg
├── card_android.jpg
├── card_example_android.png
├── card_example_ios.jpg
├── card_ios.jpg
├── checkboxes_android.jpg
├── checkboxes_ios.jpg
├── chip_android.jpg
├── chip_ios.jpg
├── color.jpg
├── confirmationdialog_multi_android.jpg
├── confirmationdialog_multi_ios.jpg
├── confirmdialog_single_android.jpg
├── confirmdialog_single_ios.jpg
├── confirmdialogconfig.jpg
├── custom_content_android.png
├── custom_content_android_styled.png
├── dialog_android.jpg
├── dialog_ios.jpg
├── inputdialog_android.png
├── inputdialog_ios.jpg
├── inputdialogconfig.png
├── loading_android.jpg
├── loading_ios.jpg
├── loadingconfig.png
├── menu_android.png
├── menu_ios.jpg
├── radiobuttons_android.jpg
├── radiobuttons_ios.jpg
├── simpledialog_android.jpg
├── simpledialog_ios.jpg
├── simpledialogconfig.jpg
├── snackbar_android.jpg
├── snackbar_ios.jpg
├── snackbarconfig.png
├── textfield_android.jpg
├── textfield_ios.jpg
├── typescale.jpg
├── xf.material_logo.png
└── xf.material_logo_small.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | # This file is understood by git 1.7.2+.
2 |
3 | # Windows specific files should always be crlf on checkout
4 | *.bat text eol=crlf
5 | *.cmd text eol=crlf
6 | *.ps1 text eol=crlf
7 |
8 | # Check out the following as ln always for osx/linux/cygwin
9 | *.sh text eol=lf
10 |
11 | # Opt in the following types to always normalize line endings
12 | # on checkin and always use native endings on checkout.
13 | *.config text
14 | *.cs text diff=csharp
15 | *.csproj text
16 | *.md text
17 | *.msbuild text
18 | *.nuspec text
19 | *.pp text
20 | *.ps1 text
21 | *.sln text
22 | *.tt text
23 | *.txt text
24 | *.xaml text
25 | *.xml text
26 |
27 | # Binary files
28 | *.bmp binary
29 | *.jpeg binary
30 | *.jpg binary
31 | *.nupkg binary
32 | *.png binary
33 | *.sdf binary
34 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/a-regression.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: 🔙 Regression
4 | about: Report unexpected behavior that worked previously
5 | ---
6 |
7 | ## 🔙 Regression
8 |
9 |
10 |
11 | ### Old (and correct) behavior
12 |
13 | ### Current behavior
14 |
15 | ### Reproduction steps
16 |
17 | ### Configuration
18 |
19 | **Version:** 1.x
20 |
21 | **Platform:**
22 | - [ ] :iphone: iOS
23 | - [ ] :robot: Android
24 | - [ ] :checkered_flag: WPF
25 | - [ ] :earth_americas: UWP
26 | - [ ] :apple: MacOS
27 | - [ ] :tv: tvOS
28 | - [ ] :monkey: Xamarin.Forms
29 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/b-bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: 🐛 Bug Report
4 | about: Create a report to help us fix bugs and make improvements
5 | ---
6 |
7 | ## 🐛 Bug Report
8 |
9 |
10 |
11 | ### Expected behavior
12 |
13 | ### Reproduction steps
14 |
15 | ### Configuration
16 |
17 | **Version:** 1.x
18 |
19 | **Platform:**
20 | - [ ] :iphone: iOS
21 | - [ ] :robot: Android
22 | - [ ] :checkered_flag: WPF
23 | - [ ] :earth_americas: UWP
24 | - [ ] :apple: MacOS
25 | - [ ] :tv: tvOS
26 | - [ ] :monkey: Xamarin.Forms
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/c-feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: 🚀 Feature Request
4 | about: Want to see something new included in the Framework? Submit it!
5 | ---
6 |
7 | ## 🚀 Feature Requests
8 |
9 |
10 |
11 | ### Contextualize the feature
12 |
13 |
14 | ### Describe the feature
15 |
16 |
17 | ### Platforms affected (mark all that apply)
18 | - [ ] :iphone: iOS
19 | - [ ] :robot: Android
20 | - [ ] :checkered_flag: WPF
21 | - [ ] :earth_americas: UWP
22 | - [ ] :apple: MacOS
23 | - [ ] :tv: tvOS
24 | - [ ] :monkey: Xamarin.Forms
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/d-enhancement-proposal.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: 🏗 Enhancement Proposal
4 | about: Proposals for code cleanup, refactor and improvements in general
5 | ---
6 |
7 | ## 🏗 Enhancement Proposal
8 |
9 |
10 |
11 | ### Pitch
12 |
13 |
14 |
15 | ### Platforms affected (mark all that apply)
16 | - [ ] :iphone: iOS
17 | - [ ] :robot: Android
18 | - [ ] :checkered_flag: WPF
19 | - [ ] :earth_americas: UWP
20 | - [ ] :apple: MacOS
21 | - [ ] :tv: tvOS
22 | - [ ] :monkey: Xamarin.Forms
23 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/e-question.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | name: 💬 Questions and Help
4 | about: If you have questions, please use this for support
5 | ---
6 |
7 | ## 💬 Questions and Help
8 |
9 | For questions or help we recommend checking:
10 |
11 | - The [Xamarin tag in Stack Overflow](https://stackoverflow.com/questions/tagged/xamarin)
12 | - The [General slack channel in the Xamarin Slack](https://xamarinchat.herokuapp.com/)
13 | - Ask your question in the [Xamarin Forums](https://forums.xamarin.com/)
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### :sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)
2 |
3 |
4 | ### :arrow_heading_down: What is the current behavior?
5 |
6 |
7 | ### :new: What is the new behavior (if this is a feature change)?
8 |
9 |
10 | ### :boom: Does this PR introduce a breaking change?
11 |
12 |
13 | ### :bug: Recommendations for testing
14 |
15 |
16 | ### :memo: Links to relevant issues/docs
17 |
18 |
19 | ### :thinking: Checklist before submitting
20 |
21 | - [ ] All projects build
22 | - [ ] Follows style guide lines
23 | - [ ] Relevant documentation was updated
24 | - [ ] Rebased onto current develop
25 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | ## Finding an issue to work on
4 |
5 | If you'd like to work on something that isn't in a current issue, especially if it would be a big change, please open a new issue for discussion!
6 |
7 | ## Setting up a development environment
8 |
9 | First, you'll need git to fork and clone the repo. [GitHub has help pages about setting
10 | up git](https://help.github.com/articles/set-up-git/), and once you've done
11 | that, you should be able to clone the repo and change into the repo's directory
12 | from your terminal:
13 |
14 | ```
15 | git clone https://github.com/{YourFork}/XamarinMediaManager.git
16 | ```
17 |
18 | If you are using SourceTree or another kind of visual git application, enter the url to your fork in the add new repository field.
19 |
20 | After you are done pull the develop branch, and open `MediaManager.sln` in Visual Studio to get started.
21 |
--------------------------------------------------------------------------------
/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: Baseflow
2 | custom: https://baseflow.com/contact
3 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/LICENSE.md
--------------------------------------------------------------------------------
/Samples/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | Copyright (c) Martijn van Dijk
4 | Martijn van Dijk
5 | Martijn van Dijk
6 | $(AssemblyName) ($(TargetFramework))
7 | en
8 | 1.0.0
9 |
10 | 10.0
11 | $(NoWarn);1591;1701;1702;1705;VSX1000;NU1603
12 |
13 | AnyCPU
14 | full
15 |
16 | $(MSBuildProjectName.Contains('XF.Material'))
17 | $(MSBuildProjectName.Contains('.Forms'))
18 |
19 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Assets/Fonts/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Assets/Fonts/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Assets/Fonts/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Assets/Fonts/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Assets/Fonts/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Assets/Fonts/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Core/PlatformContainer.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using MaterialMvvmSample.Core;
3 |
4 | namespace MaterialMvvmSample.Droid.Core
5 | {
6 | public class PlatformContainer : AppContainer
7 | {
8 | protected override void RegisterServices(ContainerBuilder containerBuilder)
9 | {
10 | base.RegisterServices(containerBuilder);
11 |
12 | //Register platform-specific services
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.OS;
3 | using MaterialMvvmSample.Droid.Core;
4 | using XF.Material.Droid;
5 |
6 | namespace MaterialMvvmSample.Droid
7 | {
8 | [Activity(Label = "MaterialMvvmSample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = Android.Content.PM.ConfigChanges.Orientation | Android.Content.PM.ConfigChanges.ScreenSize, WindowSoftInputMode = Android.Views.SoftInput.AdjustResize)]
9 | public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity
10 | {
11 | protected override void OnCreate(Bundle savedInstanceState)
12 | {
13 | TabLayoutResource = Resource.Layout.Tabbar;
14 | ToolbarResource = Resource.Layout.Toolbar;
15 |
16 | base.OnCreate(savedInstanceState);
17 | Rg.Plugins.Popup.Popup.Init(this);
18 | Xamarin.Forms.Forms.Init(this, savedInstanceState);
19 | Material.Init(this, savedInstanceState);
20 |
21 | var appContainer = new PlatformContainer();
22 | appContainer.Setup();
23 |
24 | var app = CommonServiceLocator.ServiceLocator.Current.GetInstance();
25 |
26 | LoadApplication(app);
27 | }
28 |
29 | public override void OnBackPressed()
30 | {
31 | Material.HandleBackButton(base.OnBackPressed);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using Android.App;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MaterialMvvmSample.Android")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MaterialMvvmSample.Android")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 | [assembly: ComVisible(false)]
17 |
18 | // Version information for an assembly consists of the following four values:
19 | //
20 | // Major Version
21 | // Minor Version
22 | // Build Number
23 | // Revision
24 | //
25 | // You can specify all the values or you can default the Build and Revision Numbers
26 | // by using the '*' as shown below:
27 | // [assembly: AssemblyVersion("1.0.*")]
28 | [assembly: AssemblyVersion("1.0.0.0")]
29 | [assembly: AssemblyFileVersion("1.0.0.0")]
30 |
31 | // Add some common permissions, these can be removed if not needed
32 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
33 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
34 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-hdpi/icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-hdpi/icon_more.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-hdpi/icon_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-hdpi/icon_plus.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-xhdpi/icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-xhdpi/icon_more.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-xhdpi/icon_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-xhdpi/icon_plus.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-xxhdpi/icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-xxhdpi/icon_more.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-xxhdpi/icon_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-xxhdpi/icon_plus.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-xxxhdpi/icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-xxxhdpi/icon_more.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable-xxxhdpi/icon_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable-xxxhdpi/icon_plus.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable/ic_overflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/drawable/ic_overflow.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/drawable/ic_overflow.xml:
--------------------------------------------------------------------------------
1 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-hdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-hdpi/Icon.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-hdpi/MaterialTextFieldView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
12 |
13 |
15 |
16 |
19 |
20 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-hdpi/MaterialTextFieldView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using MaterialMvvmSample.ViewModels;
4 | using Xamarin.Forms;
5 |
6 | namespace MaterialMvvmSample.Views
7 | {
8 | public partial class MaterialTextFieldView : ContentPage
9 | {
10 | public MaterialTextFieldView()
11 | {
12 | InitializeComponent();
13 | BindingContext = new MaterialDialogsViewModel();
14 |
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-xhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-xhdpi/Icon.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxhdpi/Icon.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxxhdpi/Icon.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
27 |
28 |
31 |
32 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Core/MaterialMvvmSample.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 | pdbonly
9 | true
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.Uwp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Core/PlatformContainer.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using MaterialMvvmSample.Core;
3 |
4 | namespace MaterialMvvmSample.Uwp.Core
5 | {
6 | public class PlatformContainer : AppContainer
7 | {
8 | protected override void RegisterServices(ContainerBuilder containerBuilder)
9 | {
10 | base.RegisterServices(containerBuilder);
11 |
12 | //Register platform-specific services
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.Uwp.Core;
2 | using Xamarin.Forms.Platform.UWP;
3 |
4 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
5 |
6 | namespace MaterialMvvmSample.Uwp
7 | {
8 | ///
9 | /// An empty page that can be used on its own or navigated to within a Frame.
10 | ///
11 | public sealed partial class MainPage : WindowsPage
12 | {
13 | public MainPage()
14 | {
15 | InitializeComponent();
16 |
17 | Rg.Plugins.Popup.Popup.Init();
18 | XF.Material.Uwp.Material.Init();
19 |
20 | var appContainer = new PlatformContainer();
21 | appContainer.Setup();
22 |
23 | var app = CommonServiceLocator.ServiceLocator.Current.GetInstance();
24 | LoadApplication(app);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | MaterialMvvmSample.Uwp
18 | martijn
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("MaterialMvvmSample.Uwp")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("MaterialMvvmSample.Uwp")]
12 | [assembly: AssemblyCopyright("Copyright © 2020")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Version information for an assembly consists of the following four values:
17 | //
18 | // Major Version
19 | // Minor Version
20 | // Build Number
21 | // Revision
22 | //
23 | // You can specify all the values or you can default the Build and Revision Numbers
24 | // by using the '*' as shown below:
25 | // [assembly: AssemblyVersion("1.0.*")]
26 | [assembly: AssemblyVersion("1.0.0.0")]
27 | [assembly: AssemblyFileVersion("1.0.0.0")]
28 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.Uwp/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using MaterialMvvmSample.iOS.Core;
3 | using UIKit;
4 |
5 | namespace MaterialMvvmSample.iOS
6 | {
7 | [Register("AppDelegate")]
8 | public partial class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
9 | {
10 | public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
11 | {
12 | Rg.Plugins.Popup.Popup.Init();
13 | Xamarin.Forms.Forms.Init();
14 | XF.Material.iOS.Material.Init();
15 |
16 | var appContainer = new PlatformContainer();
17 | appContainer.Setup();
18 |
19 | LoadApplication(CommonServiceLocator.ServiceLocator.Current.GetInstance());
20 |
21 | return base.FinishedLaunching(uiApplication, launchOptions);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/icon_more.imageset/icon_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/icon_more.imageset/icon_more.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/icon_more.imageset/icon_more@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/icon_more.imageset/icon_more@2x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Assets.xcassets/icon_more.imageset/icon_more@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Assets.xcassets/icon_more.imageset/icon_more@3x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Core/PlatformContainer.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using MaterialMvvmSample.Core;
3 |
4 | namespace MaterialMvvmSample.iOS.Core
5 | {
6 | public class PlatformContainer : AppContainer
7 | {
8 | protected override void RegisterServices(ContainerBuilder containerBuilder)
9 | {
10 | base.RegisterServices(containerBuilder);
11 |
12 | //Register platform-specific services
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 8.0
25 | CFBundleDisplayName
26 | MaterialMvvmSample
27 | CFBundleVersion
28 | 1.0
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | CFBundleName
32 | MaterialMvvmSample
33 | XSAppIconAssets
34 | Assets.xcassets/AppIcon.appiconset
35 | UIStatusBarStyle
36 | UIStatusBarStyleLightContent
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | UIAppFonts
40 |
41 | Fonts/Roboto-Bold.ttf
42 | Fonts/Roboto-Regular.ttf
43 | Fonts/Roboto-Medium.ttf
44 |
45 | CFBundleIdentifier
46 | ch.erni.test
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace MaterialMvvmSample.iOS
4 | {
5 | public class Application
6 | {
7 | // This is the main entry point of the application.
8 | private static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, "AppDelegate");
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("MaterialMvvmSample.iOS")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("MaterialMvvmSample.iOS")]
12 | [assembly: AssemblyCopyright("Copyright © 2019")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Renderers/MViewCellRenderer.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.iOS.Renderers;
2 | using UIKit;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Platform.iOS;
5 |
6 | [assembly: ExportRenderer(typeof(ViewCell), typeof(MViewCellRenderer))]
7 | namespace MaterialMvvmSample.iOS.Renderers
8 | {
9 | public class MViewCellRenderer : ViewCellRenderer
10 | {
11 | public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
12 | {
13 | var cell = base.GetCell(item, reusableCell, tv);
14 | cell.SelectionStyle = UITableViewCellSelectionStyle.None;
15 |
16 | return cell;
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Fonts/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Fonts/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Fonts/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Fonts/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/Fonts/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/Fonts/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/ic_overflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/ic_overflow.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/ic_overflow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/ic_overflow@2x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/ic_overflow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/ic_overflow@3x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/xf_checkbox_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/xf_checkbox_selected.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/xf_checkbox_selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/xf_checkbox_selected@2x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample.iOS/Resources/xf_checkbox_selected@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Baseflow/XF-Material-Library/fef56fb66de1ff7fc198745f200883f6ac489c20/Samples/MaterialMvvmSample.iOS/Resources/xf_checkbox_selected@3x.png
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.Utilities;
2 | using MaterialMvvmSample.Views;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
7 | namespace MaterialMvvmSample
8 | {
9 | public partial class App : Application
10 | {
11 | public App(INavigationService navigationService)
12 | {
13 | XF.Material.Forms.Material.Init(this);
14 | InitializeComponent();
15 | XF.Material.Forms.Material.Use("Material.Style");
16 |
17 | navigationService.SetRootView(ViewNames.LandingView);
18 | }
19 |
20 | protected override void OnStart()
21 | {
22 | // Handle when your app starts
23 | }
24 |
25 | protected override void OnSleep()
26 | {
27 | // Handle when your app sleeps
28 | }
29 |
30 | protected override void OnResume()
31 | {
32 | // Handle when your app resumes
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Images/slideshow-black-18dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/MaterialMvvmSample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 | pdbonly
9 | true
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Utilities/Dialogs/BaseDialogService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using XF.Material.Forms.UI.Dialogs;
3 |
4 | namespace MaterialMvvmSample.Utilities.Dialogs
5 | {
6 | public abstract class BaseDialogService
7 | {
8 | public static IMaterialDialog DialogFacade => MaterialDialog.Instance;
9 |
10 | protected static Task Alert(string message)
11 | {
12 | return DialogFacade.AlertAsync(message);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Utilities/Dialogs/IJobDialogService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace MaterialMvvmSample.Utilities.Dialogs
4 | {
5 | public interface IJobDialogService
6 | {
7 | Task AddNewJob();
8 |
9 | Task EditJob(string jobTitle);
10 |
11 | Task DeleteJob(string jobTitle);
12 |
13 | Task AlertExistingJob(string jobTitle);
14 |
15 | Task JobDeleted();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Utilities/INavigationService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace MaterialMvvmSample.Utilities
4 | {
5 | public interface INavigationService
6 | {
7 | void SetRootView(string rootViewName, object parameter = null);
8 |
9 | Task PushAsync(string viewName, object parameter = null);
10 |
11 | Task PopAsync();
12 |
13 | Task PushModalAsync(string viewName, object parameter = null);
14 |
15 | Task PopModalAsync();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Utilities/NavigationService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using MaterialMvvmSample.Controls;
3 | using Xamarin.Forms;
4 |
5 | namespace MaterialMvvmSample.Utilities
6 | {
7 | public class NavigationService : INavigationService
8 | {
9 | private CustomNavigationPage _currentNavigationPage;
10 |
11 | public async Task PopAsync()
12 | {
13 | await _currentNavigationPage?.PopViewAsync();
14 | }
15 |
16 | public async Task PushAsync(string viewName, object parameter = null)
17 | {
18 | await _currentNavigationPage?.PushViewAsync(viewName, parameter);
19 | }
20 |
21 | public async Task PushModalAsync(string viewName, object parameter = null)
22 | {
23 | await _currentNavigationPage?.PushModalAsync(viewName, parameter);
24 | }
25 |
26 | public async Task PopModalAsync()
27 | {
28 | await _currentNavigationPage?.PopModalAsync();
29 | }
30 |
31 | public void SetRootView(string rootViewName, object parameter = null)
32 | {
33 | _currentNavigationPage = new CustomNavigationPage(rootViewName, parameter);
34 | Application.Current.MainPage = _currentNavigationPage;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Utilities/ViewFactory.cs:
--------------------------------------------------------------------------------
1 | using CommonServiceLocator;
2 | using Xamarin.Forms;
3 |
4 | namespace MaterialMvvmSample.Utilities
5 | {
6 | internal static class ViewFactory
7 | {
8 | internal static Page GetView(string viewName)
9 | {
10 | return ServiceLocator.Current.GetInstance(viewName);
11 | }
12 |
13 | internal static TView GetView() where TView : ContentPage
14 | {
15 | return ServiceLocator.Current.GetInstance();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | using CommonServiceLocator;
2 | using MaterialMvvmSample.Utilities;
3 |
4 | namespace MaterialMvvmSample.ViewModels
5 | {
6 | public abstract class BaseViewModel : PropertyChangeAware, ICleanUp
7 | {
8 | protected INavigationService Navigation { get; }
9 |
10 | protected IServiceLocator ServiceLocator { get; }
11 |
12 | protected BaseViewModel()
13 | {
14 | ServiceLocator = CommonServiceLocator.ServiceLocator.Current;
15 | Navigation = ServiceLocator.GetInstance();
16 | }
17 |
18 | ///
19 | /// When overriden, allow to add additional logic to this view model when the view where it was attached was pushed using .
20 | ///
21 | /// The navigation parameter to pass after the view was pushed.
22 | public virtual void OnViewPushed(object navigationParameter = null) { }
23 |
24 | ///
25 | /// When overriden, allow to add additional logic to this view model when the view where it was attached was popped using .
26 | ///
27 | public virtual void OnViewPopped()
28 | {
29 | CleanUp();
30 | }
31 |
32 | public virtual void CleanUp() { }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/CheckboxesViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class CheckboxesViewModel : BaseViewModel
4 | {
5 | public CheckboxesViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/ChipFontSizeViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class ChipFontSizeViewModel : BaseViewModel
4 | {
5 | public ChipFontSizeViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/ICleanUp.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public interface ICleanUp
4 | {
5 | void CleanUp();
6 | }
7 | }
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/LandingViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 | using MaterialMvvmSample.Views;
3 | using Xamarin.Forms;
4 |
5 | namespace MaterialMvvmSample.ViewModels
6 | {
7 | public class LandingViewModel : BaseViewModel
8 | {
9 | public ICommand GoToMaterialDialogsCommand => GoToCommand(ViewNames.MaterialDialogsView);
10 |
11 | public ICommand GoToChipFontSizeViewCommand => GoToCommand(ViewNames.ChipFontSizeView);
12 |
13 | public ICommand GoToCheckboxesSampleCommand => GoToCommand(ViewNames.CheckboxesView);
14 |
15 | public ICommand GoToMaterialCircularViewCommand => GoToCommand(ViewNames.MaterialCircularView);
16 |
17 | public ICommand GoToMaterialTextFieldSampleCommand => GoToCommand(ViewNames.MaterialTextFieldView);
18 |
19 | public ICommand GoToMaterialMenuButtonViewCommand => GoToCommand(ViewNames.MaterialMenuButtonView);
20 |
21 | public ICommand GoToMaterialCardViewCommand => GoToCommand(ViewNames.MaterialCardView);
22 |
23 | public ICommand GoToMaterialButtonViewCommand => GoToCommand(ViewNames.MaterialButtonView);
24 |
25 | public ICommand GoToMaterialPickerViewCommand => GoToCommand(ViewNames.MaterialPicker);
26 |
27 | private ICommand GoToCommand(string name) => new Command(() => Navigation.PushAsync(name));
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialButtonViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class MaterialButtonViewModel
4 | {
5 | public MaterialButtonViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialCardViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class MaterialCardViewModel
4 | {
5 | public MaterialCardViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialCircularViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class MaterialCircularViewModel : BaseViewModel
4 | {
5 | public MaterialCircularViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialDialogsViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class MaterialDialogsViewModel : BaseViewModel
4 | {
5 | public MaterialDialogsViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialMenuButtonViewModel.cs:
--------------------------------------------------------------------------------
1 | using XF.Material.Forms.Models;
2 |
3 | namespace MaterialMvvmSample.ViewModels
4 | {
5 | public class MaterialMenuButtonViewModel : BaseViewModel
6 | {
7 | public MaterialMenuItem[] Actions => new MaterialMenuItem[]
8 | {
9 | new MaterialMenuItem
10 | {
11 | Text = "Edit"
12 | },
13 | new MaterialMenuItem
14 | {
15 | Text = "Delete"
16 | }
17 | };
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialPickerViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class MaterialPickerViewModel
4 | {
5 | public MaterialPickerViewModel()
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/MaterialTextFieldViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows.Input;
3 | using Xamarin.Forms;
4 | using XF.Material.Forms.UI.Dialogs;
5 |
6 | namespace MaterialMvvmSample.ViewModels
7 | {
8 | public class MaterialTextFieldViewModel : BaseViewModel
9 | {
10 | public IList Choices => new List
11 | {
12 | "Ayala Corporation",
13 | "San Miguel Corporation",
14 | "YNGEN Holdings Inc.",
15 | "ERNI Development Center Philippines, Inc., Bern, Switzerland"
16 | };
17 |
18 | public ICommand OpenCustomChoiceCommand { get; }
19 |
20 | public MaterialTextFieldViewModel()
21 | {
22 | OpenCustomChoiceCommand = new Command(async () =>
23 | {
24 | await MaterialDialog.Instance.AlertAsync("Command tapped. Do what you want ! You can open a custom popup, ask some data, and update the textfield text with this data");
25 | });
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/ViewModels/SecondViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.ViewModels
2 | {
3 | public class SecondViewModel : BaseViewModel
4 | {
5 | private string _jobTitle;
6 | public string JobTitle
7 | {
8 | get => _jobTitle;
9 | set => Set(ref _jobTitle, value);
10 | }
11 |
12 | public override void OnViewPushed(object navigationParameter = null)
13 | {
14 | var selectedJob = (TestModel)navigationParameter;
15 | JobTitle = selectedJob?.Title;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/BaseView.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.PlatformConfiguration;
4 | using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
5 |
6 | namespace MaterialMvvmSample.Views
7 | {
8 | public abstract class BaseView : ContentPage where TViewModel : BaseViewModel
9 | {
10 | protected TViewModel ViewModel { get; }
11 |
12 | protected BaseView()
13 | {
14 | ViewModel = CommonServiceLocator.ServiceLocator.Current.GetInstance();
15 | BindingContext = ViewModel;
16 | On().SetUseSafeArea(true);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/CheckboxesView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/CheckboxesView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 |
4 | namespace MaterialMvvmSample.Views
5 | {
6 | public partial class CheckboxesView : ContentPage
7 | {
8 | public CheckboxesView()
9 | {
10 | InitializeComponent();
11 | BindingContext = new CheckboxesViewModel();
12 |
13 | }
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/ChipFontSizeView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
30 |
31 |
33 |
34 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/ChipFontSizeView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using MaterialMvvmSample.ViewModels;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | namespace MaterialMvvmSample.Views
7 | {
8 | [XamlCompilation(XamlCompilationOptions.Compile)]
9 | public partial class ChipFontSizeView : ContentPage
10 | {
11 | public ChipFontSizeView()
12 | {
13 | InitializeComponent();
14 | BindingContext = new ChipFontSizeViewModel();
15 | }
16 |
17 | public void IncreaseChipFontSize_Clicked(object sender, EventArgs e)
18 | {
19 | TheChip.FontSize = TheChip.FontSize + 1;
20 | }
21 |
22 | public void DecreaseChipFontSize_Clicked(object sender, EventArgs e)
23 | {
24 | TheChip.FontSize = TheChip.FontSize - 1;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/LandingView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | namespace MaterialMvvmSample.Views
6 | {
7 | [XamlCompilation(XamlCompilationOptions.Compile)]
8 | public partial class LandingView : ContentPage
9 | {
10 | public LandingView()
11 | {
12 | InitializeComponent();
13 | BindingContext = new LandingViewModel();
14 |
15 | }
16 | }
17 |
18 |
19 | //public abstract class BaseLandingView : BaseView { }
20 | }
21 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MainView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MainView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms.Xaml;
3 |
4 | namespace MaterialMvvmSample.Views
5 | {
6 | [XamlCompilation(XamlCompilationOptions.Compile)]
7 | public partial class MainView : BaseMainView
8 | {
9 | public MainView()
10 | {
11 | InitializeComponent();
12 | }
13 | }
14 |
15 | public abstract class BaseMainView : BaseView { }
16 | }
17 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialButtonView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using MaterialMvvmSample.ViewModels;
3 | using Xamarin.Forms;
4 | using XF.Material.Forms.UI;
5 | using XF.Material.Forms.UI.Dialogs;
6 |
7 | namespace MaterialMvvmSample.Views
8 | {
9 | public partial class MaterialButtonView : ContentPage
10 | {
11 | public MaterialButtonView()
12 | {
13 | InitializeComponent();
14 | BindingContext = new MaterialButtonViewModel();
15 | }
16 |
17 | private void Btn_Clicked(object sender, EventArgs e)
18 | {
19 | ((MaterialButton)sender).Text = "Clicked 1 Time";
20 | }
21 |
22 | private async void MaterialButton_Clicked(object sender, EventArgs e)
23 | {
24 | var jobs = new string[]
25 | {
26 | "Mobile Developer (Xamarin)",
27 | "Mobile Developer (Native)",
28 | "Web Developer (.NET)",
29 | "Web Developer (Laravel)",
30 | "Quality Assurance Engineer",
31 | "Business Analyst",
32 | "Recruitment Officer",
33 | "Project Manager",
34 | "Scrum Master"
35 | };
36 | await MaterialDialog.Instance.AlertAsync(message: "This is an alert dialog",
37 | title: "Alert Dialog",
38 | acknowledgementText: "Got It");
39 | //Show confirmation dialog for choosing one.
40 | var result = await MaterialDialog.Instance.SelectChoicesAsync(title: "Select a job",
41 | selectedIndices: new int[] { 1, 6 },
42 | choices: jobs);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialCardView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialCardView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 |
4 | namespace MaterialMvvmSample.Views
5 | {
6 | public partial class MaterialCardView : ContentPage
7 | {
8 | public MaterialCardView()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MaterialCardViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialCircularView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
11 |
12 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialCircularView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using MaterialMvvmSample.ViewModels;
3 | using Xamarin.Forms;
4 | using XF.Material.Forms.UI.Dialogs;
5 |
6 | namespace MaterialMvvmSample.Views
7 | {
8 | public partial class MaterialCircularView : ContentPage
9 | {
10 | public MaterialCircularView()
11 | {
12 | InitializeComponent();
13 | BindingContext = new MaterialCircularViewModel();
14 | RunLoadingDialog();
15 | }
16 |
17 | public async Task RunLoadingDialog()
18 | {
19 | var loadingDialog = await MaterialDialog.Instance.LoadingDialogAsync(message: "Something is running", lottieAnimation: "LottieLogo1.json");
20 | await Task.Delay(5000); // Represents a task that is running.
21 | await loadingDialog.DismissAsync();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialDialogsView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
16 |
17 |
19 |
20 |
22 |
23 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialMenuButtonView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialMenuButtonView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 |
4 | namespace MaterialMvvmSample.Views
5 | {
6 | public partial class MaterialMenuButtonView : ContentPage
7 | {
8 | public MaterialMenuButtonView()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MaterialMenuButtonViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialPicker.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
10 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialPicker.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 |
4 | namespace MaterialMvvmSample.Views
5 | {
6 | public partial class MaterialPicker : ContentPage
7 | {
8 | public MaterialPicker()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MaterialPickerViewModel();
12 |
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/MaterialTextFieldView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 |
4 | namespace MaterialMvvmSample.Views
5 | {
6 | public partial class MaterialTextFieldView : ContentPage
7 | {
8 | public MaterialTextFieldView()
9 | {
10 | InitializeComponent();
11 | BindingContext = new MaterialTextFieldViewModel();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/SecondView.xaml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/SecondView.xaml.cs:
--------------------------------------------------------------------------------
1 | using MaterialMvvmSample.ViewModels;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | namespace MaterialMvvmSample.Views
6 | {
7 | [XamlCompilation(XamlCompilationOptions.Compile)]
8 | public partial class SecondView : ContentPage
9 | {
10 | public SecondView()
11 | {
12 | InitializeComponent();
13 | BindingContext = new SecondViewModel();
14 |
15 | }
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/Samples/MaterialMvvmSample/Views/ViewNames.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialMvvmSample.Views
2 | {
3 | public static class ViewNames
4 | {
5 | public const string MainView = nameof(Views.MainView);
6 |
7 | public const string ChipFontSizeView = nameof(Views.ChipFontSizeView);
8 |
9 | public const string SecondView = nameof(Views.SecondView);
10 |
11 | public const string LandingView = nameof(Views.LandingView);
12 |
13 | public const string MaterialDialogsView = nameof(Views.MaterialDialogsView);
14 |
15 | public const string CheckboxesView = nameof(Views.CheckboxesView);
16 |
17 | public const string MaterialTextFieldView = nameof(Views.MaterialTextFieldView);
18 |
19 | public const string MaterialCircularView = nameof(Views.MaterialCircularView);
20 |
21 | public const string MaterialMenuButtonView = nameof(Views.MaterialMenuButtonView);
22 |
23 | public const string MaterialCardView = nameof(Views.MaterialCardView);
24 |
25 | public const string MaterialButtonView = nameof(Views.MaterialButtonView);
26 |
27 | public const string MaterialPicker = nameof(Views.MaterialPicker);
28 |
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/XF.Material/FormsResources/MaterialColors.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | #1E000000
7 |
8 |
--------------------------------------------------------------------------------
/XF.Material/FormsResources/MaterialColors.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Xamarin.Forms.Xaml;
3 |
4 | namespace XF.Material.Forms.Resources
5 | {
6 | [XamlCompilation(XamlCompilationOptions.Compile)]
7 | public partial class MaterialColors : ResourceDictionary
8 | {
9 | internal MaterialColors(MaterialColorConfiguration materialColor)
10 | {
11 | InitializeComponent();
12 | SetColors(materialColor);
13 | }
14 |
15 | private void SetColors(MaterialColorConfiguration materialColor)
16 | {
17 | TryAddColorResource(MaterialConstants.Color.PRIMARY, materialColor.Primary);
18 | TryAddColorResource(MaterialConstants.Color.PRIMARY_VARIANT, materialColor.PrimaryVariant);
19 | TryAddColorResource(MaterialConstants.Color.ON_PRIMARY, materialColor.OnPrimary);
20 | TryAddColorResource(MaterialConstants.Color.SECONDARY, materialColor.Secondary);
21 | TryAddColorResource(MaterialConstants.Color.SECONDARY_VARIANT, materialColor.SecondaryVariant);
22 | TryAddColorResource(MaterialConstants.Color.ON_SECONDARY, materialColor.OnSecondary);
23 | TryAddColorResource(MaterialConstants.Color.BACKGROUND, materialColor.Background);
24 | TryAddColorResource(MaterialConstants.Color.ON_BACKGROUND, materialColor.OnBackground);
25 | TryAddColorResource(MaterialConstants.Color.SURFACE, materialColor.Surface);
26 | TryAddColorResource(MaterialConstants.Color.ON_SURFACE, materialColor.OnSurface);
27 | TryAddColorResource(MaterialConstants.Color.ERROR, materialColor.Error);
28 | TryAddColorResource(MaterialConstants.Color.ON_ERROR, materialColor.OnError);
29 | }
30 |
31 | private void TryAddColorResource(string key, Color color)
32 | {
33 | if (key == null || color.IsDefault)
34 | {
35 | return;
36 | }
37 |
38 | Add(key, color);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/XF.Material/FormsResources/MaterialConfiguration.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using XF.Material.Forms.Resources.Typography;
3 |
4 | namespace XF.Material.Forms.Resources
5 | {
6 | ///
7 | ///
8 | /// Class that provides Material theme configuration that will be applied in the current App.
9 | ///
10 | public class MaterialConfiguration : BindableObject
11 | {
12 | ///
13 | /// Backing field for the bindable property .
14 | ///
15 | public static readonly BindableProperty FontConfigurationProperty = BindableProperty.Create(nameof(FontConfiguration), typeof(MaterialFontConfiguration), typeof(MaterialFontConfiguration));
16 |
17 | ///
18 | /// Backing field for the bindable property .
19 | ///
20 | public static readonly BindableProperty ColorConfigurationProperty = BindableProperty.Create(nameof(ColorConfiguration), typeof(MaterialColorConfiguration), typeof(MaterialColorConfiguration));
21 |
22 | ///
23 | /// Gets or sets the font configuration of the theme.
24 | ///
25 | public MaterialFontConfiguration FontConfiguration
26 | {
27 | get => (MaterialFontConfiguration)GetValue(FontConfigurationProperty);
28 | set => SetValue(FontConfigurationProperty, value);
29 | }
30 |
31 | ///
32 | /// Gets or sets the color configuration of the theme.
33 | ///
34 | public MaterialColorConfiguration ColorConfiguration
35 | {
36 | get => (MaterialColorConfiguration)GetValue(ColorConfigurationProperty);
37 | set => SetValue(ColorConfigurationProperty, value);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/XF.Material/FormsResources/MaterialSizes.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 27
7 | 48
8 | 1
9 | 4
10 | 40
11 | 8,0,8,16
12 |
14 | 560
15 | 280
16 |
17 |
19 | 344
20 | -1
21 |
22 |
24 | Center
25 | FillAndExpand
26 |
27 | 1.4
28 |
29 |
--------------------------------------------------------------------------------
/XF.Material/FormsResources/MaterialSizes.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Xamarin.Forms.Xaml;
3 |
4 | namespace XF.Material.Forms.Resources
5 | {
6 | [XamlCompilation(XamlCompilationOptions.Compile)]
7 | public partial class MaterialSizes : ResourceDictionary
8 | {
9 | public MaterialSizes()
10 | {
11 | InitializeComponent();
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/XF.Material/FormsResources/Typography/MaterialTypeScale.cs:
--------------------------------------------------------------------------------
1 | namespace XF.Material.Forms.Resources.Typography
2 | {
3 | ///
4 | /// Enumeration for the type scale used in
5 | ///
6 | public enum MaterialTypeScale
7 | {
8 | ///
9 | /// No type scale
10 | ///
11 | None,
12 |
13 | ///
14 | /// Heading 1 type scale.
15 | ///
16 | H1,
17 |
18 | ///
19 | /// Heading 2 type scale.
20 | ///
21 | H2,
22 |
23 | ///
24 | /// Heading 3 type scale.
25 | ///
26 | H3,
27 |
28 | ///
29 | /// Heading 4 type scale.
30 | ///
31 | H4,
32 |
33 | ///
34 | /// Heading 5 type scale.
35 | ///
36 | H5,
37 |
38 | ///
39 | /// Heading 6 type scale.
40 | ///
41 | H6,
42 |
43 | ///
44 | /// Subtitle 1 type scale.
45 | ///
46 | Subtitle1,
47 |
48 | ///
49 | /// Subtitle 2 type scale.
50 | ///
51 | Subtitle2,
52 |
53 | ///
54 | /// Body 1 type scale.
55 | ///
56 | Body1,
57 |
58 | ///
59 | /// Body 2 type scale.
60 | ///
61 | Body2,
62 |
63 | ///
64 | /// Button type scale.
65 | ///
66 | Button,
67 |
68 | ///
69 | /// Caption type scale.
70 | ///
71 | Caption,
72 |
73 | ///
74 | /// Overline type scale.
75 | ///
76 | Overline
77 | }
78 | }
--------------------------------------------------------------------------------
/XF.Material/FormsResources/Typography/MaterialTypography.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Xamarin.Forms.Xaml;
3 |
4 | namespace XF.Material.Forms.Resources.Typography
5 | {
6 | [XamlCompilation(XamlCompilationOptions.Compile)]
7 | public partial class MaterialTypography : ResourceDictionary
8 | {
9 | internal MaterialTypography(MaterialFontConfiguration fontFamily)
10 | {
11 | InitializeComponent();
12 |
13 | if (fontFamily == null)
14 | {
15 | return;
16 | }
17 |
18 | TryAddStringResource(MaterialConstants.FontFamily.H1, fontFamily.H1);
19 | TryAddStringResource(MaterialConstants.FontFamily.H2, fontFamily.H2);
20 | TryAddStringResource(MaterialConstants.FontFamily.H3, fontFamily.H3);
21 | TryAddStringResource(MaterialConstants.FontFamily.H4, fontFamily.H4);
22 | TryAddStringResource(MaterialConstants.FontFamily.H5, fontFamily.H5);
23 | TryAddStringResource(MaterialConstants.FontFamily.H6, fontFamily.H6);
24 | TryAddStringResource(MaterialConstants.FontFamily.SUBTITLE1, fontFamily.Subtitle1);
25 | TryAddStringResource(MaterialConstants.FontFamily.SUBTITLE2, fontFamily.Subtitle2);
26 | TryAddStringResource(MaterialConstants.FontFamily.BODY1, fontFamily.Body1);
27 | TryAddStringResource(MaterialConstants.FontFamily.BODY2, fontFamily.Body2);
28 | TryAddStringResource(MaterialConstants.FontFamily.BUTTON, fontFamily.Button);
29 | TryAddStringResource(MaterialConstants.FontFamily.CAPTION, fontFamily.Caption);
30 | TryAddStringResource(MaterialConstants.FontFamily.OVERLINE, fontFamily.Overline);
31 | }
32 |
33 | private void TryAddStringResource(string key, string value)
34 | {
35 | Add(key, value);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/XF.Material/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 6.0
25 | CFBundleDisplayName
26 | XF.Material
27 | CFBundleVersion
28 | 1.0
29 | CFBundleName
30 | XF.Material
31 |
32 |
33 |
--------------------------------------------------------------------------------
/XF.Material/Models/MaterialMenuItem.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace XF.Material.Forms.Models
4 | {
5 | public class MaterialMenuItem
6 | {
7 | public string Text { get; set; }
8 |
9 | public ImageSource Image { get; set; }
10 |
11 | internal int Index { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/XF.Material/Models/MaterialMenuResult.cs:
--------------------------------------------------------------------------------
1 | namespace XF.Material.Forms.Models
2 | {
3 | ///
4 | /// Contains data of a selection.
5 | ///
6 | public class MaterialMenuResult
7 | {
8 | ///
9 | /// Gets the index of the selected menu item.
10 | ///
11 | public int Index { get; }
12 |
13 | ///
14 | /// Gets the parameter passed during the selection.
15 | ///
16 | public object Parameter { get; }
17 |
18 | internal MaterialMenuResult(int index, object parameter)
19 | {
20 | Index = index;
21 | Parameter = parameter;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/XF.Material/Platforms/Android/ImageSourceExtensions.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Xamarin.Forms.Platform.Android;
3 |
4 | namespace XF.Material.Droid
5 | {
6 | public static class ImageSourceExtensions
7 | {
8 | public static IImageSourceHandler GetImageSourceHandler(this ImageSource source)
9 | {
10 | return source switch
11 | {
12 | FileImageSource _ => new FileImageSourceHandler(),
13 | StreamImageSource _ => new StreamImagesourceHandler(),
14 | FontImageSource _ => new FontImageSourceHandler(),
15 | _ => new ImageLoaderSourceHandler(),
16 | };
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/XF.Material/Platforms/Android/Renderers/Internals/MaterialBoxViewRenderer.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Android.Views;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Platform.Android;
5 | using XF.Material.Droid.Renderers.Internals;
6 | using XF.Material.Forms.UI.Internals;
7 | using static Android.Views.View;
8 |
9 | [assembly: ExportRenderer(typeof(MaterialBoxView), typeof(MaterialBoxViewRenderer))]
10 | namespace XF.Material.Droid.Renderers.Internals
11 | {
12 | public class MaterialBoxViewRenderer : BoxRenderer, IOnTouchListener
13 | {
14 | private MaterialBoxView _boxView;
15 |
16 | public MaterialBoxViewRenderer(Context context) : base(context) { }
17 |
18 | public bool OnTouch(Android.Views.View v, MotionEvent e)
19 | {
20 | var percentageX = e.GetX() / v.Width;
21 | var percentageY = e.GetY() / v.Height;
22 | var elementX = percentageX * Element.Width;
23 | var elementY = percentageY * Element.Height;
24 |
25 | _boxView.OnTapped(elementX, elementY);
26 |
27 | return true;
28 | }
29 |
30 | protected override void OnElementChanged(ElementChangedEventArgs e)
31 | {
32 | base.OnElementChanged(e);
33 |
34 | if (e?.NewElement == null)
35 | {
36 | return;
37 | }
38 |
39 | _boxView = Element as MaterialBoxView;
40 | ViewGroup.SetOnTouchListener(null);
41 | ViewGroup.SetOnTouchListener(this);
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/XF.Material/Platforms/Android/Renderers/Internals/MaterialDatePickerRenderer.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using Android.Content;
3 | using Android.Graphics.Drawables;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Platform.Android;
6 | using XF.Material.Droid.Renderers.Internals;
7 | using XF.Material.Forms.UI.Internals;
8 |
9 | [assembly: ExportRenderer(typeof(MaterialDatePicker), typeof(MaterialDatePickerRenderer))]
10 | namespace XF.Material.Droid.Renderers.Internals
11 | {
12 | internal class MaterialDatePickerRenderer : DatePickerRenderer
13 | {
14 | private MaterialDatePicker _materialDatePicker;
15 |
16 | public MaterialDatePickerRenderer(Context context) : base(context) { }
17 |
18 | protected override void OnElementChanged(ElementChangedEventArgs e)
19 | {
20 | base.OnElementChanged(e);
21 |
22 | if (e?.NewElement != null)
23 | {
24 | _materialDatePicker = Element as MaterialDatePicker;
25 | SetControl();
26 | }
27 | }
28 |
29 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
30 | {
31 | base.OnElementPropertyChanged(sender, e);
32 | }
33 |
34 | private void SetControl()
35 | {
36 | if (Control == null)
37 | {
38 | return;
39 | }
40 |
41 | Control.Background = new ColorDrawable(Color.Transparent.ToAndroid());
42 | Control.SetPadding(0, 0, 0, 0);
43 | Control.SetIncludeFontPadding(false);
44 | Control.SetMinimumHeight((int)MaterialHelper.ConvertDpToPx(20));
45 |
46 | var layoutParams = new MarginLayoutParams(Control.LayoutParameters);
47 | layoutParams.SetMargins(0, 0, 0, 0);
48 | Control.LayoutParameters = layoutParams;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/XF.Material/Platforms/Android/Renderers/Internals/MaterialElementRenderer.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Platform.Android;
4 | using XF.Material.Droid.Renderers.Internals;
5 | using XF.Material.Forms.UI;
6 | using XF.Material.Forms.UI.Internals;
7 |
8 | [assembly: ExportRenderer(typeof(MaterialTextField), typeof(MaterialElementRenderer))]
9 | [assembly: ExportRenderer(typeof(MaterialSlider), typeof(MaterialElementRenderer))]
10 | namespace XF.Material.Droid.Renderers.Internals
11 | {
12 | internal class MaterialElementRenderer : ViewRenderer
13 | {
14 | public MaterialElementRenderer(Context context) : base(context) { }
15 |
16 | protected override void OnElementChanged(ElementChangedEventArgs e)
17 | {
18 | base.OnElementChanged(e);
19 |
20 | if (e?.OldElement != null)
21 | {
22 | (Element as IMaterialElementConfiguration)?.ElementChanged(false);
23 | }
24 |
25 | if (e?.NewElement != null)
26 | {
27 | (Element as IMaterialElementConfiguration)?.ElementChanged(true);
28 | }
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/XF.Material/Platforms/Android/Renderers/MaterialCircularLoadingViewRenderer.cs:
--------------------------------------------------------------------------------
1 | using Android.Graphics;
2 | using Com.Airbnb.Lottie;
3 | using Lottie.Forms;
4 | using Lottie.Forms.Platforms.Android;
5 | using Xamarin.Forms;
6 | using Xamarin.Forms.Platform.Android;
7 | using XF.Material.Droid.Renderers;
8 | using XF.Material.Forms.UI;
9 | using static Android.Widget.ImageView;
10 |
11 | [assembly: ExportRenderer(typeof(MaterialCircularLoadingView), typeof(MaterialCircularLoadingViewRenderer))]
12 | namespace XF.Material.Droid.Renderers
13 | {
14 | public class MaterialCircularLoadingViewRenderer : AnimationViewRenderer
15 | {
16 | protected override void OnElementChanged(ElementChangedEventArgs e)
17 | {
18 | base.OnElementChanged(e);
19 |
20 | if (e?.NewElement == null)
21 | {
22 | return;
23 | }
24 |
25 | var materialElement = Element as MaterialCircularLoadingView;
26 | Control.SetAnimation(Resource.Raw.loading_animation);
27 | Control.SetScaleType(scaleType: ScaleType.CenterCrop);
28 | if (materialElement != null)
29 | {
30 | Control.AddValueCallback(new Com.Airbnb.Lottie.Model.KeyPath("**"), LottieProperty.ColorFilter,
31 | new Com.Airbnb.Lottie.Value.LottieValueCallback(
32 | new PorterDuffColorFilter(materialElement.TintColor.ToAndroid(), PorterDuff.Mode.SrcAtop)));
33 | }
34 |
35 | Control.PlayAnimation();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XF.Material/Platforms/Android/Renderers/MaterialLabelRenderer.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using Android.Content;
3 | using Android.Widget;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Platform.Android;
6 | using XF.Material.Droid.Renderers;
7 | using XF.Material.Forms.UI;
8 |
9 | [assembly: ExportRenderer(typeof(MaterialLabel), typeof(MaterialLabelRenderer))]
10 |
11 | namespace XF.Material.Droid.Renderers
12 | {
13 | public class MaterialLabelRenderer : LabelRenderer
14 | {
15 | private new MaterialLabel Element => base.Element as MaterialLabel;
16 |
17 | public MaterialLabelRenderer(Context context) : base(context) { }
18 |
19 | protected override void OnElementChanged(ElementChangedEventArgs