本文介绍了MvvmCross弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个弹出窗口.即使我使用的是MvvmCross,它也将严格在Android上运行.在Windows应用商店中,您可以使用xaml执行以下操作:

I would like to have a popup window. Even though I am using MvvmCross, it will strictly run on Android. In Windows Store, you can do the following with xaml:

    <Popup VerticalOffset="300" HorizontalOffset="200" x:Name="SigPopup" >
        <Border BorderBrush="{StaticResource ApplicationForegroundThemeBrush}"
            Background="{StaticResource ApplicationPageBackgroundThemeBrush}"
            BorderThickness="1">
            <StackPanel>
                <StackPanel Orientation="Horizontal" >
                    <Button x:Name="btnAccept" Content="Accept" Click="btnAccept_Click"/>
                    <Button x:Name="btnCancel" Grid.Column="1" Content="Cancel" Click="btnCancel_Click"/>
                    <TextBlock x:Name="txtSigner" Text="Shipper" Style="{StaticResource SubheaderTextBlockStyle}" Margin="25,3,0,0" />
                </StackPanel>
                <!-- Inking area -->
                <Border BorderBrush="{StaticResource ApplicationForegroundThemeBrush}"
                    Background="{StaticResource ApplicationPageBackgroundThemeBrush}"
                    BorderThickness="2" Width="750" Height="175">
                    <Grid x:Name="inkPanel" Margin="5">
                        <!-- Inking area -->
                        <Canvas x:Name="InkCanvas" Background="White" Margin="5" />
                    </Grid>
                </Border>
            </StackPanel>
        </Border>
    </Popup>

您可以使用它弹出一个窗口来收集签名.有一个接受和取消按钮,您可以相应地进行连线.有什么办法可以使用MvvmCross做到这一点?我观看了ViewModel演示,并看到了可以在哪里绘制矩形并将数据放入其中并绑定了矩形的方法,但是并没有显示完成后如何使它们消失.我的愿景是能够弹出带有SignatureWidget的某种子ViewModel并收集签名,然后关闭弹出窗口.可以使用MvvmCross完成此操作吗?

You can use this to popup a window to collect a Signature. There is an accept and cancel button you can wire up accordingly. Is there any way to do this using MvvmCross? I have watched the ViewModel demo and saw where you could draw rectangles and put data in them and it was bound, but it didn't show how to make them go away once you were done. I had this vision of being able to popup some sort of child ViewModel with a SignatureWidget in it and collect a signature then close the popup. Can this be done using MvvmCross?

推荐答案

有一个Xamarin组件可用.这符合您的需求吗?

there is a Xamarin Component available.Is this something that fits your need?

http://components.xamarin.com/view/signature-pad

关于,本杰明

这篇关于MvvmCross弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 23:26