🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

simple.mobile.modal

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

simple.mobile.modal

1.4.5
unpublished
NuGet
Maintainers
0
Source

// ========================================================================================================================

Nuget Modal

// ========================================================================================================================

Restrykcje: Aby nuget działał poprawnie Content w Page'u powinien być typu: AbsoluteLayout Grid

Inicjalizacja: Inicjalizujemy modal poprzez wywołanie 'Initialize()' w code behind po 'InitializeComponent();' z konstruktora Page'a

Przykładowe użycie:
	public LoginPage()
    {
        InitializeComponent();
        ModalProvider.GetInstance().Initialize(App.Current, this);
    }

Użycie: Aby poprawnie wywołać modal definiujemy serwis dla nugeta: public readonly IModalService ModalService = ModalProvider.GetInstance(); Następnie korzystając z niego wyświetlamy dialog: await ModalService.ShowDialog(filter.Title, "Wybierz przynajmniej jedną klasę produktów", "Ok"); lub Card: await ModalService.ShowCard("Tytuł", "Text");

Dialog posiada dwa typy wyświetlania zawartości.
Typ prosty 'ShowDialog' pokazuje dialog z podanym tytułem, tekstem oraz przyciskami (tak, nie), dodatkowo definiowana ikona zamykania okna oraz zamykania poprzez pacnięcie w tło
Typ złożony 'ShowDialogCustom' pokazuje dialog z podanym tytułem, kluczem do zasobów oraz przyciskami (tak, nie), dodatkowo definiowana ikona zamykania okna oraz zamykania poprzez pacnięcie w tło.
Zawartość w przypadku typu złożonego (klucz do zasobów) jest tekstowym kluczem, który odpowiada 'View' zdefiniowanego w Resources danego Page'a (najprościej w '<ContentPage.Resources>')

Przykładowe użycie:
	xaml:
		<ContentView x:Key="ModalBudgetSelection">
			<sfList:SfListView
				Orientation="Vertical"
				HorizontalOptions="FillAndExpand"
				VerticalOptions="FillAndExpand"
				ItemsSource="{ Binding Budgets }"
				SelectedItem="{ Binding BudgetSelected }"
				HeightRequest="{ Binding BudgetsHeight }"
				SelectionMode="Single"
				SelectionBackgroundColor="Transparent">
				<sfList:SfListView.ItemTemplate>
					<DataTemplate>
						<ViewCell>
							<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" HeightRequest="{ StaticResource ModalSingleField }">
								<Label Text="{ Binding Name }" HorizontalOptions="Center" VerticalOptions="Center" StyleClass="fontSmall"/>
							</Grid>
						</ViewCell>
					</DataTemplate>
				</sfList:SfListView.ItemTemplate>
			</sfList:SfListView>
		</ContentView>

	cs:
		ModalMessage<BudgetResponse> dialog = await ModalService.ShowDialogCustom<BudgetResponse>(Translations.UI_Budget, "ModalBudgetSelection", true);

Keywords

xamarin

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts