|
<popuplayout:SfPopupLayout x:Name="popup"
IsOpen="{Binding DisplayPopup}">
<!--PopupLayout: Layout of Popup-->
<popuplayout:SfPopupLayout.PopupView>
<popuplayout:PopupView …>
<!--Header-->
<popuplayout:PopupView.HeaderTemplate>
…
</popuplayout:PopupView.HeaderTemplate>
<!--Content-->
<popuplayout:PopupView.ContentTemplate>
…
</popuplayout:PopupView.ContentTemplate>
</popuplayout:PopupView>
</popuplayout:SfPopupLayout.PopupView>
<popuplayout:SfPopupLayout.Content>
<StackLayout>
<Button Text="Click to open popup" VerticalOptions="Center" HorizontalOptions="Center" Command="{Binding ShowPopupCommand}" CommandParameter="{x:Reference popup}"/>
</StackLayout>
</popuplayout:SfPopupLayout.Content>
</popuplayout:SfPopupLayout> |
|
<popuplayout:SfPopupLayout x:Name="popup"
IsOpen="{Binding DisplayPopup}"> <!--PopupLayout: Layout of Popup-->
<popuplayout:SfPopupLayout.PopupView> <popuplayout:PopupView AcceptButtonText="Save" AcceptCommand="{Binding PopupAcceptCommand}" AnimationMode="SlideOnBottom" IsFullScreen="True"> <!--Header--> <popuplayout:PopupView.HeaderTemplate> <DataTemplate> <StackLayout Padding="5"> <Label FontSize="Medium" Text="TestPopup"/> </StackLayout> </DataTemplate> </popuplayout:PopupView.HeaderTemplate> <!--Content-->
<popuplayout:PopupView.ContentTemplate> <DataTemplate > <StackLayout CompressedLayout.IsHeadless="True" Padding="5"> <Label Text="Here stands some describing text"/> <Entry Margin="0,5,0,5" Unfocused="Entry_Unfocused" Placeholder="enter some text" Text="{Binding PopupEntryPurpose, Mode=OneWayToSource}"/> <Grid ColumnDefinitions="*,*"> <Label Text="Picker" VerticalTextAlignment="Center"/> <Picker Grid.Column="1" FontSize="Small" ItemsSource="{Binding StrategyPicker}" SelectedIndex="{Binding StrategyPickerSelectedIndex}"/> </Grid> <Grid ColumnDefinitions="*,50"> <Label Text="Switch Something"/> <Switch Grid.Column="1" IsToggled="{Binding SampleAccounts}"/> </Grid> </StackLayout> </DataTemplate> </popuplayout:PopupView.ContentTemplate> </popuplayout:PopupView>
</popuplayout:SfPopupLayout.PopupView> <popuplayout:SfPopupLayout.Content>
<StackLayout> <Button Text="Click to open popup" VerticalOptions="Center" HorizontalOptions="Center" Command="{Binding ShowPopupCommand}" CommandParameter="{x:Reference popup}"/> </StackLayout> </popuplayout:SfPopupLayout.Content> </popuplayout:SfPopupLayout> …
public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); } void Entry_Unfocused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
{ popup.PopupView.Refresh(); } } |