MvvmCross Popup Window

穿精又带淫゛_ 提交于 2019-12-13 21:14:11

问题


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>

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?


回答1:


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

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

Regards, Benjamin



来源:https://stackoverflow.com/questions/28838186/mvvmcross-popup-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!