ApplicationBar WP7(ApplicationBar WP7)
我想知道为什么当我加载我的Windows手机项目时,应用程序栏出现在我的第一个屏幕上,这只是一个加载背景..
如何让它出现在加载的最后。
这是我使用的代码。
public MainPage() { InitializeComponent(); AnimationContext = LayoutRoot; // for page transitions _tappedListBox = null; // used for setting the activated ListBox on panorama for animation to map page // If the constructor has been called, this is not a page that was already in memory: _newPageInstance = true; // Setup the background thread worker properties: _worker = new BackgroundWorker(); // Create a background thread worker for downloading/installing park maps _worker.WorkerReportsProgress = true; _worker.WorkerSupportsCancellation = true; _worker.DoWork += new DoWorkEventHandler(worker_DoWork); _worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged); _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); // Set the data context of the listbox control to the sample data this.DataContext = App.ViewModel; this.Loaded += new RoutedEventHandler(MainPage_Loaded); }
我在这里设置了可见性。
private void MainPage_Loaded(object sender, RoutedEventArgs e) { if (!App.ViewModel.IsDataLoaded) App.ViewModel.LoadData(); ; // load panorama data (if need to) if (!App.ViewModel.IsDataLoaded == false) { this.ApplicationBar.IsVisible = true; } }
I am wondering why when I load my windows phone project, the application bar is appearing on my first screen wich is just a loading background..
How can I make it appear at the really end of the loading.
This is the code I use.
public MainPage() { InitializeComponent(); AnimationContext = LayoutRoot; // for page transitions _tappedListBox = null; // used for setting the activated ListBox on panorama for animation to map page // If the constructor has been called, this is not a page that was already in memory: _newPageInstance = true; // Setup the background thread worker properties: _worker = new BackgroundWorker(); // Create a background thread worker for downloading/installing park maps _worker.WorkerReportsProgress = true; _worker.WorkerSupportsCancellation = true; _worker.DoWork += new DoWorkEventHandler(worker_DoWork); _worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged); _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); // Set the data context of the listbox control to the sample data this.DataContext = App.ViewModel; this.Loaded += new RoutedEventHandler(MainPage_Loaded); }
And i set the visibility here .
private void MainPage_Loaded(object sender, RoutedEventArgs e) { if (!App.ViewModel.IsDataLoaded) App.ViewModel.LoadData(); ; // load panorama data (if need to) if (!App.ViewModel.IsDataLoaded == false) { this.ApplicationBar.IsVisible = true; } }
原文:https://stackoverflow.com/questions/9686322
满意答案
这里似乎有一些黑魔法。 或者至少我还没有想出所有的咒语来使这种事情可靠地发生。
我想我有类似的问题。 不知道这是否会帮助你,但这是我如何解决它。
在VS2010报表设计器中,使用查看 - >报表数据显示报表数据窗格。
点击新建按钮并选择数据集...获取数据集属性对话框。
为您的数据集命名,如果您之前完成了此操作,则可能知道在绑定ReportDataSource时,此处的数据集名称需要与代码中提供的名称相匹配。
我刚刚尝试的新部分是单击“数据源”下拉列表旁边的“新建...”按钮。 生成的向导将引导您选择程序集和CLR类(使用复选框选择您的类)。
当向导完成时,我的新数据集出现了。
有一点需要注意:我第一次尝试重现这一点时,向导完成了而不添加我的数据集。 我回到我的类定义并使用[DataContract]和[DataMember]属性对其进行了修饰,然后重新运行该向导,它似乎效果很好。
也许有更深层次知识的人可以评论这些属性为什么使这项工作成为可能,或者为什么如果没有它们,向导会失败。
Your data source object must include a native data type as a property on the class, otherwise it doesn't let you add it. Funny, eh!
相关问答
更多如何将一列添加到rdlc的数据集并让它出现在报告中?(How do I add a column to an rdlc's dataset and have it appear for use in the report?)
RDLC - 在VS2010中添加数据源(RDLC - Adding a Data Source in VS2010)
rdlc打印问题(print problem with rdlc)
使用.NET Class作为SSRS RDLC的数据源(Using .NET Class as the DataSource with SSRS RDLC)
让.rdlc与数据集和报告查看器一起工作(getting .rdlc to work with dataset and report viewer)
隐藏除.rdlc vs2010中最后一行之外的组中的重复项(hide duplicates in a group except last row in .rdlc vs2010)
在VS2010中设计数据模型并生成ORM代码,应用程序(Designing a data model in VS2010 and generating ORM code, application)
MVC4 Source和VS2010(MVC4 Source and VS2010)
在VB.Net中手动在Reportviewer中加载.rdlc报告(Loading .rdlc report in Reportviewer manually in VB.Net)
相关文章
更多WP7 Mango可用性之我见
《Windows Phone 7.5专题讲座之WP7入门系列》共10课时/更新完毕[压缩包]
wordpress wp_mail
微信 Windows Phone版原型设计 - [WP开发]
微信公众平台接口开发WP博客插件 Ⅰ [来源:我爱水煮鱼]
新闻:小娜来了 微软语音助手正式入华
Nutch2.1 + MySQL + Solr4.5
微网站
Ios8新特性-应用程序扩展
《Windows Phone 7应用开发指南》扫描版[PDF]
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!