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
2022-12-13 14:12

满意答案

这里似乎有一些黑魔法。 或者至少我还没有想出所有的咒语来使这种事情可靠地发生。

我想我有类似的问题。 不知道这是否会帮助你,但这是我如何解决它。

在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?)

对于Google搜索到的用户,报表数据面板通常是隐藏的,可以在查看 - >报表数据(Ctrl + Alt + D)下的菜单中找到...它位于底部: http:// www .codeease.com /约-更新数据集-FOR-A-RDLC文件,在视觉工作室-2010.html 一旦完成,您可以右键单击报告数据集并刷新或编辑它们。 这一直对我有用(一旦我记得并找到报告数据面板!),所以我不知道为什么它不适用于OP。 Well, I resolved my problem, but I don't l...

RDLC - 在VS2010中添加数据源(RDLC - Adding a Data Source in VS2010)

这里似乎有一些黑魔法。 或者至少我还没有想出所有的咒语来使这种事情可靠地发生。 我想我有类似的问题。 不知道这是否会帮助你,但这是我如何解决它。 在VS2010报表设计器中,使用查看 - >报表数据显示报表数据窗格。 点击新建按钮并选择数据集...获取数据集属性对话框。 为您的数据集命名,如果您之前完成了此操作,则可能知道在绑定ReportDataSource时,此处的数据集名称需要与代码中提供的名称相匹配。 我刚刚尝试的新部分是单击“数据源”下拉列表旁边的“新建...”按钮。 生成的向导将引导您...

rdlc打印问题(print problem with rdlc)

您需要将数据集提供给您的报告。 就像是: viewer.LocalReport.DataSources.Add(new ReportDataSource("dataset1", dataTable)); 编辑:根据您的评论 private void Window_Loaded(object sender, RoutedEventArgs e) { var dataTable = report_insurance(fromDate, toDate); viewer_insuran...

使用.NET Class作为SSRS RDLC的数据源(Using .NET Class as the DataSource with SSRS RDLC)

这里有几个解决方案,但我更喜欢第二个解决方案。 解决方案1 (好的) 由于这似乎是MVC Web应用程序项目类型自身的一个缺陷,因此您可以将报告添加到不同的项目类型(如类库)。 如在Visual Studio 2010报表查看器 - 对象数据源发布后所述,只需为项目创建一个单独的库并在其中添加rdlc文件即可。 数据源配置向导现在应该如下所示: 解决方案2 (更好) 正如在ASP.NET MVC中无法在RDLC报表中看到或添加网站数据源一样 ,您可以在MVC项目的任何位置添加一个aspx页面,以诱...

让.rdlc与数据集和报告查看器一起工作(getting .rdlc to work with dataset and report viewer)

通过您收到的错误消息,并通过查看以下行: Dim rds As ReportDataSource = New ReportDataSource("DS1", ReportDS.Tables(0)) 我可以得出这样的结论:DataSet在RDLC中定义为“DataSet”,并将其作为“DS1”提供。 改成: Dim rds As ReportDataSource = New ReportDataSource("DataSet1", ReportDS.Tables(0)) By the error...

隐藏除.rdlc vs2010中最后一行之外的组中的重复项(hide duplicates in a group except last row in .rdlc vs2010)

不要使用HideDuplicates,而是使用文本框/行的隐藏属性。 像这样的东西可以工作: =IIf(RowNumber("Group1") = Count(Fields!OneOfYourFields.Value, "Group1"), False, True) Don't use HideDuplicates but the Hidden property of your textbox/row. Something like this could work: =IIf(RowNumber...

在VS2010中设计数据模型并生成ORM代码,应用程序(Designing a data model in VS2010 and generating ORM code, application)

凯 请考虑使用ADO .NET Framework。 它得到了VS 2010和LINQ( 快速文章 )的支持。 在设计架构之前,您必须了解一件事。 BLL(业务逻辑层)是特定于特定数据使用的逻辑层,因此不能由(无论您将使用什么)框架自动生成。 我想你有数据访问层 - 不要担心 - 如果你要使用ADO .NET和LINQ to Entities,将自动为你生成DAL。 LINQ to Entities与ADO .NET Framework是一套功能强大的工具,可以100%满足您的需求。 有关LINQ...

MVC4 Source和VS2010(MVC4 Source and VS2010)

如此处所述 ,该解决方案现在需要VS2012和Windows 8.我将相应地更新文档Wiki。 As documented here, the solution now requires VS2012 and Windows 8. I'll update the documentation Wiki accordingly.

在VB.Net中手动在Reportviewer中加载.rdlc报告(Loading .rdlc report in Reportviewer manually in VB.Net)

你应该考虑这些说明: 你有一个组合时错误说: BC30311:“ReportDataSource”类型的值无法转换为“ReportDataSource” 因此,您应该检查是否正在使用ReportDataSource正确引用并使用正确名称空间中的类。 一个常见问题是当您在Windows窗体项目中添加Microsoft.Reporting.WebForms.dll作为参考并添加了Import Microsoft.Reporting.WebForms命名空间时,您将收到此类异常。 修复之后,您应该注意报...

相关文章

更多

WP7 Mango可用性之我见

之前使用了一段时间Android手机,日常用到的功能主要有: Google Contacts同步 ...

《Windows Phone 7.5专题讲座之WP7入门系列》共10课时/更新完毕[压缩包]

中文名: Windows Phone 7.5专题讲座之WP7入门系列 资源格式: 压缩包 ...

wordpress wp_mail

$info .= "微信: <a href='http:// wx.jpg'>h ...

微信 Windows Phone版原型设计 - [WP开发]

用Metro的理念(自己暂时所理解到的程度)简单的设计了一下腾讯微信的原型设计图。然后,今天去面试实习 ...

微信公众平台接口开发WP博客插件 Ⅰ [来源:我爱水煮鱼]

测试了水煮鱼的WP博客微信插件,iPhone的返回消息发现有地方出现了点点问题,其他地方都OK。 ...

新闻:小娜来了 微软语音助手正式入华

新闻:小娜来了微软语音助手正式入华 昨晚,微软正式推送了W ...

Nutch2.1 + MySQL + Solr4.5

参考文章: 【注意版本的选择】O(∩_∩)O哈哈~ 1.http://cosmo1987.iteye. ...

微网站

微网站源于WebApp和 网站的融合创新,兼容iOS、android、WP等各大操作系统,可以 ...

Ios8新特性-应用程序扩展

一.什么是应用程序扩展? 应用程序扩展不是一个应用,它是主体应用程序(containing app)中 ...

《Windows Phone 7应用开发指南》扫描版[PDF]

中文名: Windows Phone 7应用开发指南 作者: 张越 等著 图书分类: 软件 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本