English 中文(简体)
采用临时超支的最佳方式
原标题:Best way to implement temporary overlays in MVVM

I m writing an app that connects to network resources.

当该信连接起来时,我想夸大一条与通常的骨质进步图和一个取消的纽子的超声。 我为超支设计了<代码>ConnectProgressViewModel和匹配ConnectProgressView

My question is what is the cleanest way to show/hide the overlay from the parent ViewModel?

A) Expose a constant ConnectProgressViewModel from my parent ViewModel, and have the ConnectProgressView bind its visibility to the ConnectProgressViewModel.IsConnecting property.

B) Expose a generic Overlay property from the parent ViewModel, and set it to a ConnectProgressViewModel when the user wants to connect. The parent View binds a ContentControl to this Overlay property and data templating takes care of the rest.

C>?

第一项措施似乎将功能化得越多,附录不必注意显示和隐藏超支,而是不断披露<条码>。 当它只是偶尔显示时,所有时间都感到错。

第二项标准似乎与<代码>更适合的甚小限。 电话: 传真:<0> 只有在需要时才会创造,但是,它给父母带来了更多的功能,而且一般的超期财产也感到bit。

卡车

http://www.un.org。

我应该澄清,这一看法不仅仅是显示忙.的地位。 它允许取消/尝试和选择不同的网络资源等。 我省略了这种简便细节,这或许是一个错误,因为人们将注意力集中在繁忙的指标上。

最佳回答

我总是使用银灯工具箱上的<条码>。 它没有取消纽芬兰语,但你也许可以这样说。 <代码>BusyIndicator 有一个<编码>IsBusy,我对一个<代码>IsBusy的不动产,载于我的视角Model。 如果你把控制权带上ton子,你可以取消对你的看法。

<><>Edit>/strong>

我刚刚看到,这是世界森林论坛而不是银灯。 I m 无法确定WPF工具箱是否有一台用户标识

www.un.org/Depts/DGACM/index_spanish.htm Edit再次重申。

它喜欢。 注:我没有这方面的经验。

问题回答

我要谈一下你在A中提出的建议,并说,在你实际上具有这种灵活性作为要求之前,你就不执行像B这样的一般性内容,就像能够表达不同的观点一样。

保持简单!





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签