【问题标题】:Windows Phone 8.1 Datepicker show on clickWindows Phone 8.1 Datepicker 显示点击
【发布时间】:2015-08-20 07:12:11
【问题描述】:

我已经被困了几个小时,已经找到了如何通过单击菜单项来激活 datepickerDialog。 我想将按钮的单击事件链接到 Datepickerpage 的激活。

这可能吗?我有什么选择?

提前致谢!

【问题讨论】:

    标签: c# datepicker windows-phone-8.1 menuitem


    【解决方案1】:

    如果您使用标准 DatePicker,那么一种方法可能是(也完全在 XAML 中)使用另一个 DatePickerFlyout 并绑定其 Date em>:

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <DatePicker Date="{Binding ElementName=myDatePickerFlyout,Path=Date, Mode=TwoWay}"/>
    </Grid>
    <Page.BottomAppBar>
        <CommandBar>
            <CommandBar.PrimaryCommands>
                <AppBarButton Icon="Setting">
                    <AppBarButton.Flyout>
                        <DatePickerFlyout x:Name="myDatePickerFlyout" />
                    </AppBarButton.Flyout>
                </AppBarButton>
            </CommandBar.PrimaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
    

    【讨论】:

    • 我已经确定我记得你了。昨天你的一篇关于注册后台任务的帖子对我有很大帮助!衷心感谢 Romasz!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多