简体   繁体   English

(C#)网格弹出出现在按钮上

[英](C#) Popup of grid appear on buttons tap

I have this xaml code on one of the windows in my app: 我的应用程序中的一个窗口上有以下xaml代码:

<phone:PanoramaItem x:Name="panoramaItemSend" Header="{Binding LocalizedResources.send, Source={StaticResource LocalizedStrings}}" >
            <StackPanel Margin="12,0,0,0">
                <TextBlock Text="{Binding LocalizedResources.recipientEmail, Source={StaticResource LocalizedStrings}}"  />
                <TextBox InputScope="EmailUserName" Text="{Binding SendModel.Email, Mode=TwoWay}" Margin="-12,0,0,0" TabIndex="100" GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" MaxLength="256" Height="105" TextWrapping="Wrap">
                    <i:Interaction.Behaviors>
                        <prismInteractivity:UpdateTextBindingOnPropertyChanged/>
                    </i:Interaction.Behaviors>
                </TextBox>

                <TextBlock Text="{Binding LocalizedResources.amount, Source={StaticResource LocalizedStrings}}" />
                <TextBox x:Name="txtSendAmount" InputScope="Number" Text="{Binding SendModel.Amount, Mode=TwoWay}" Margin="-12,0,0,0" GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" TabIndex="101" MaxLength="20" TextChanged="TextBox_TextChanged" >
                    <i:Interaction.Behaviors>
                        <prismInteractivity:UpdateTextBindingOnPropertyChanged/>
                    </i:Interaction.Behaviors>
                </TextBox>
                <TextBlock Text="{Binding SendModel.AmountFiatStr}" Margin="0,-15,0,5" Foreground="Gainsboro"/>


                <TextBlock Text="{Binding LocalizedResources.label, Source={StaticResource LocalizedStrings}}" />
                <TextBox  Text="{Binding SendModel.Label, Mode=TwoWay}" Margin="-12,0,0,0" TabIndex="102" GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" MaxLength="256">
                    <i:Interaction.Behaviors>
                        <prismInteractivity:UpdateTextBindingOnPropertyChanged/>
                    </i:Interaction.Behaviors>
                </TextBox>

                <TextBlock Text="{Binding LocalizedResources.message, Source={StaticResource LocalizedStrings}}" />
                <TextBox  Text="{Binding SendModel.Message, Mode=TwoWay}" Margin="-12,0,0,0" TabIndex="103" GotFocus="TextBox_GotFocus" LostFocus="TextBox_LostFocus" MaxLength="256">
                    <i:Interaction.Behaviors>
                        <prismInteractivity:UpdateTextBindingOnPropertyChanged/>
                    </i:Interaction.Behaviors>
                </TextBox>
                <Button x:Name="btnSend" Content="{Binding LocalizedResources.send, Source={StaticResource LocalizedStrings}}" Style="{StaticResource OrangeButton}" Tap="btnSend_Tap" TabIndex="104"/>
            </StackPanel>

I want to create a popup when I trigger btnSend's Tap handler - btnSendTap My popup should have this grid full of accounts that I already know how to add programatically: 我想在触发btnSend的Tap处理程序时创建一个弹出窗口-btnSendTap我的弹出窗口应具有此网格,其中已包含我已经知道如何以编程方式添加的帐户:

<Grid Margin="15,0,0,21">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <StackPanel x:Name="AccountsInfo" Grid.Row="0">
                    </StackPanel>
                    <StackPanel Grid.Row="1">
                        <local:RateChart x:Name="rateChart" Height="324" Margin="-12,25,0,0" Width="417" />
                    </StackPanel>
                </Grid>

Have a look at the PopUp control. 看一下PopUp控件。

Hope that is what you are looking for. 希望这就是您想要的。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C# WPF 弹出窗口没有出现 - C# WPF popup doesn't appear 按钮仅在自定义弹出窗口C#的第二次单击上起作用 - Buttons work only on the second click on custom popup c# 为什么单选按钮没有出现在Windows 8的弹出窗口中? - Why do radio buttons not appear in Windows 8 on a popup? C#使用按钮上下移动数据网格视图 - c# move a data grid view up or down using buttons 使用WPF的C#-创建在运行时可调整大小的按钮网格 - C# with WPF - Creating a grid of buttons resizable at runtime c#如何在一个网格单元中创建多个单选按钮? - c# How to create several radio buttons in one grid cell? 发布我的网站后,C#Modal Popup在某些设备中没有出现,尽管它在本地显示 - C# Modal Popup does not appear in some devices after publishing my website although it appears locally 使用会话ASP.net C#从当前弹出窗口重新绑定上一个弹出窗口中的网格视图 - Rebind grid view in previous popup window from the current popup window using session ASP.net c# 如何在属性网格C#的弹出菜单中显示枚举项的描述 - how to display Description of enum item in popup menu in property grid C# Bootstrap Popup窗口在Grid View Row Command事件中未显示来自服务器端的数据,C# - Bootstrap Popup window not showing data from server side on Grid View Row Command event, c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM