开发者

How to launch DatePickerPage from ApplicationBarIconButton?

I've tried to launch DatePickerPage after ApplicationBarIconButton is tapped.

I had hope that it would be easy as follows:

    DatePickerPage dpp = new DatePickerPage();

    dpp.Show();

    ((ApplicationBarIconButton)ApplicationBar.Buttons[0]).Text = dpp.Value.ToString();

...but it wouldn开发者_如何学Go't.

Could you give me some suggestions, please?


I don't think the DatePickerPage is really intended to be used directly. The key control here is the DatePicker, which itself handles showing the picker page. For detailed information about using the DatePicker control, check out this article on WindowsPhoneGeek.com.

Given that the label of appbar icon buttons is not visible by default, it seems a bit strange to update the label in this way. What are you trying to achieve?


Maku, I'm letting users activate a datepicker from the ApplicationBar by placing it in the page and setting Height/Width to zero and then focusing the DatePicker when the ApplicationBarIcon is pressed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜