Formatting text in RichTextBlock in FlipView

I have flipView in sample itemDetailPage and I have text in string which has html tags (bold, italics). I want this string shows in richTextBlock in flipView but I don´t know how. I was searching for converters between HTML and XAML and there aren´t working with WinRT. I was looking into source codes and searching for answers and I can convert my html string to xaml string. It looks like <

在FlipView中格式化RichTextBlock中的文本

我在itemDetailPage示例中使用了flipView,并且我在具有html标记的字符串中显示文本(粗体,斜体)。 我想这个字符串显示在flipView中的richTextBlock中,但我不知道如何。 我正在寻找HTML和XAML之间的转换器,并没有与WinRT合作。 我正在查看源代码并寻找答案,我可以将我的html字符串转换为xaml字符串。 看起来像 <FlowDocument xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio

Showing Html in WinRT with RichTextBlock or other component

I want to show html in string with some component. Now I am using RichTextBlock and I tried few extensions for converting html to xaml or rtf but I didn´t found any working with WinRT. I know I can use WebView but it isn´t so pretty. I just want to do little change to ItemDetailPage (where is used RichTextBlock) to show users elementary html (bold, italics, links, images, ...). Is there some

用RichTextBlock或其他组件在WinRT中显示Html

我想用一些组件在字符串中显示html。 现在我正在使用RichTextBlock,并且尝试了将html转换为xaml或rtf的一些扩展,但是我没有发现任何与WinRT一起工作。 我知道我可以使用WebView,但它并不漂亮。 我只想对ItemDetailPage (其中使用RichTextBlock)向用户显示基本html(粗体,斜体,链接,图像...)做一点改动。 有没有一些组件或某种方式如何做到这一点(而不是webview)? 还是有工作转换器? 你有2种方法 构建或获

How to show basic HTML Windows8 Metro style TextBlock?

I have an html page that only contains <p> , <strong> , <br /> and <a> tags. I want to show this content in a XAML TextBlock in Windows 8. Is there any way to show that content in a TextBlock without losing the structure (eg paragraphs)? I don't want to use WebView because WebView can not be transparent. I am developing a open source Windows 8 Metro RSS Reader app

如何显示基本的HTML Windows8 Metro风格的TextBlock?

我有一个只包含<p> , <strong> , <br />和<a>标签的html页面。 我想在Windows 8中的XAML TextBlock中显示此内容。有没有什么方法可以显示TextBlock中的内容而不会丢失结构(例如段落)? 我不想使用WebView因为WebView不能透明。 我正在开发一个开源的Windows 8 Metro RSS Reader应用程序,并使用HtmlUtilities.ConvertToText 你可以在这里看到源代码实现http://metrorssreader.codeplex.com/So

jQuery delete cookie doesn't delete when redirecting

I have multiple cookies with the same name, domain and path, but different values. This is not by design - I am trying to fix this, but cannot delete them. I have tried multiple code variations. Here is one: string[] cookies = Request.Cookies.AllKeys; HttpCookie cookie; string cookieName; string cookieValue; for (int i = 0; i < cookies.Count(); i++) { cookieName = Request.Cookies[i].Name

重定向时,jQuery删除cookie不会被删除

我有多个具有相同名称,域和路径的Cookie,但具有不同的值。 这不是由设计 - 我试图解决这个问题,但不能删除它们。 我尝试了多种代码变体。 这里是一个: string[] cookies = Request.Cookies.AllKeys; HttpCookie cookie; string cookieName; string cookieValue; for (int i = 0; i < cookies.Count(); i++) { cookieName = Request.Cookies[i].Name; if (cookieName == "ASP.NET_SessionId") { // Do not d

Why does Rx buffer continuously perform method when buffer contains no items?

I have a Rx Observable that acts as a buffer. Right now it performs the method in Subscribe either when it gets 10 items, or after 100 milliseconds, whichever comes first. I noticed that my method is continuously being called every 100 ms, even when there are no items in the buffer, which surprised me. It's simple enough to just make my method return immediately if it receives no items fr

为什么当缓冲区不包含项目时,Rx缓冲区会连续执行方法?

我有一个Rx Observable作为缓冲区。 现在它在订阅时执行方法,当它获取10个项目或100毫秒后,以先到者为准。 我注意到,即使缓冲区中没有项目,我的方法也会每隔100 ms连续调用一次,这让我感到惊讶。 如果我的方法从缓冲区中没有收到任何项目,它就会立即返回,但我认为这很奇怪,它只是在这样的背景中搅动。 为什么是这样? 你如何建议我最好处​​理这个问题? 我是Rx的新手,所以也许我做了一些奇怪的事情。 以下是我

Reactive Extensions bug on Windows Phone

Compiled with VS 2012 , with project type WP 8.0 the following code will fail if debugger is not attached. Somehow, if debugger not attached, compiler optimizations ruins the code inside Crash() - see comments in code. Tested on Lumia 1520 (8.1) and Lumia 630 (8.0) . Any ideas why this is occurring? public partial class MainPage : PhoneApplicationPage { public MainPage() {

Windows Phone上的无功扩展错误

编译VS 2012 ,项目类型为WP 8.0 ,如果未连接调试器,以下代码将失败。 不知何故,如果调试器没有连接,编译器优化会破坏Crash()中的代码 - 请参阅代码中的注释。 测试Lumia 1520(8.1)和Lumia 630(8.0) 。 任何想法为什么发生这种情况? public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); Button.Tap += (sender, args) => new A<B

Buffer operator with count and time conditions

I have a sequence that is extremely chatty, and I was trying to make it more efficient by processing events in batches. A Buffer operator with time and count conditions was something that seemed to match my requirements, except for one small nuance. When you use this overload, the subscription gets notified after the specified time delay, regardless whether there are any items in the buffer. T

缓冲操作员计数和时间条件

我有一个非常琐碎的序列,我试图通过批量处理事件来提高效率。 具有时间和计数条件的缓冲器操作员似乎符合我的要求,除了一个小的细微差别。 当您使用此重载时,无论缓冲区中是否有任何项目,预订都会在指定的时间延迟后收到通知。 由于大部分时间,我的订阅从缓冲区操作符中获得一个空列表,所以非常烦人。 考虑到它是一个多线程应用程序,用户在UI线程上,结果并不是批量处理项目的最佳方法。 我想知道是否有一种方法可以

Reactive Extensions: Process events in batches + add delay between every batch

I have an application which at some points raises 1000 events almost at the same time. What I would like to do is to batch the events to chunks of 50 items and start processing them every 10 seconds. There's no need to wait for a batch to complete before starting a new batch processing. For example: 10:00:00: 10000 new events received 10:00:00: StartProcessing (events.Take(50)) 10:00:10:

反应式扩展:批量处理事件+在每批之间添加延迟

我有一个应用程序,它在某些时候几乎同时提出了1000个事件。 我想要做的是将事件批量分成50个项目,并开始每10秒处理一次。 在开始新的批处理之前,不需要等待批量完成。 例如: 10:00:00: 10000 new events received 10:00:00: StartProcessing (events.Take(50)) 10:00:10: StartProcessing (events.Skip(50).Take(50)) 10:00:15: StartProcessing (events.Skip(100).Take(50)) 任何想法如何实现这一目标? 我认为React

Is it possible to Observable.Buffer on something other than time

I've been looking for examples on how to use Observable.Buffer in rx but can't find anything more substantial than boiler plate time buffered stuff. There does seem to be an overload to specify a "bufferClosingSelector" but I can't wrap my mind around it. What I'm trying to do is create a sequence that buffers by time or by an "accumulation". Consider a re

Observable.Buffer可以在时间以外的其他地方使用吗?

我一直在寻找关于如何在rx中使用Observable.Buffer的例子,但是找不到比锅炉时间缓冲的东西更实际的东西。 似乎有一个重载指定一个“bufferClosingSelector”,但我无法围绕它思考。 我想要做的是创建一个按时间或“积累”缓冲的序列。 考虑一个请求流,其中每个请求都有一定的权重,而且我不想一次处理超过x累积的权重,或者如果没有足够的累积权限,只需给我上一个时间框架中的内容即可(常规缓冲区功能) bufferClosingSel

C#, BlockingCollection: How to wait until collection has less than N items

everyone. I'm using BlockingCollection in the traditional producer-consumer scenario. To process items in the collection one by one, I have to write this code: while (...) { var item = collection.Take(cancellationTokenSource.Token); ProcessItem(item); } But how to process a batch of N items (wait until collection has less than N items)? My solution is using some temporary buffer: va

C#,BlockingCollection:如何等待收集少于N个项目

大家。 我在传统的生产者 - 消费者场景中使用BlockingCollection。 要逐个处理集合中的项目,我必须编写以下代码: while (...) { var item = collection.Take(cancellationTokenSource.Token); ProcessItem(item); } 但是如何处理一批N个物品(等到收集少于N个物品)? 我的解决方案使用一些临时缓冲区: var buffer = new List<MyType>(N); while (...) { var item = collection.Take(cancellationTokenSour