HTML in Silverlight - silverlight-4.0

I am making a silverlight interface for a discussion board. The boards web interface allows the usual HTML tags like i,a,img,b,u. So now I need to be able to display that in Silverlight.
This: http://www.vectorlight.net/silverlight/controls/rich_textblock.aspx seemed like exactly what I need except that it hardly displays anything right. Every HTML(i've made sure it's valid with HTMLAgility) string I give it either makes the whole SL app go white, or the block displays all the text on top of each other. Occasionally(with a few VERY simply strings), it will display right.
This needs to work OOB and in, and I cannot use the WebBrowser control as I would need hundreds of instances at a time and it gets slow(tried it OOB).
Thanks.

Have you tried this one?
http://www.sharpgis.net/post/2010/09/15/Displaying-HTML-in-Silverlight.aspx
Maybe it can serve your needs better.

Some others
http://www.isosoft.org/taoffi/post/Html-Content-Viewer-for-Silverlight.aspx
http://blog.gfader.com/2010/05/silverlight-showing-html-content-inside.html
http://www.divelements.co.uk/silverlight/tools.aspx
Component one and Telerik both have silverlight html controls at a cost.
http://www.telerik.com/products/silverlight/htmlplaceholder.aspx
http://www.componentone.com/SuperProducts/HtmlHostSilverlight/

Related

Xamarin - How to view rendered Xaml

Our team is working on an effort to improve the accessibility of our mobile application developed with Xamarin. One area we're having trouble tackling is Focus Path (i.e. tab order). Research examples suggest that the focus path should naturally be top down if the layout is created correctly. However, the examples are often simple and not real-world with respect to complex layouts and navigation (or whatever Marketing dreams up). We have several re-usable 'controls' and templates the get injected as part of the layout like main navigation, search, etc. The focus path, or tab order, is all over the place.
Tools that offer live preview/xaml edit only work against the opened xaml file which in many of our cases is just part of the overall xaml that makes up the screen.
Looking for a way to view 'rendered xaml' that makes a up a given screen in a xamarin mobile app. We need to see the final xaml that includes all of the dynamic controls, templates, etc. that get mashed together. This may help us understand what's happening to our focus path.
EDIT: we've found that forcing/setting tabindex does not help.
Is there such a tool or process?
I was using https://www.livexaml.com/ for such a purpose.

Svg-edit usage reference where i can find it?

I found this tool(https://code.google.com/p/svg-edit/) very useful, but there is any reference for this project allow to integrate properly in your applicatione instead of simply add it to an iframe?
For example i want to retrieve the svg code for save it in a variables or something like this
It's possible but might be a little tricky to strip out the required resources and load them in your own application while making sure that there aren't any conflicts. This is actually something I plan on doing for one of my own projects.
Do you need to do this though? You can talk to the iframe from your application pretty easily. For example, to get the SVG content you would use this (assuming you only have 1 iframe on the page) ->
var svgedit = window.frames[0];
svgedit.svgCanvas.svgCanvasToString();

Create and use global view in C# WP8 XAML

I was trying to digg something on this topic before, but have no luck. What I'm trying to achieve is pretty simple, but seems to be hard to achieve :-)
I have a WP8 app (C# XAML) and I need to implement global messages (something like toasts) which could be displayed across whole application no matter of current navigation processes. Such toast message(s) should be displayed even while user is navigating between pages. To use the built in toasts is not a way (in case some other solution exists) since I'm possibly in need to have more than one message displayed at the same time (each one is independent of another) and should disappear after specified period of time.
So, my question is. Is there any way how to implement and use some kind of global view instance which sits above all pages and can be called from any page?
All I found until now is the possible ability to use PhoneApplicationFrame, but I would like rather avoid that if possible. I'm still unsure if this is even the way it can be done, but I suppose so. Do you have any alternatives or assurance this is possible and only way to achieve this goal?
Thank you all for your time and answers.
You can have UerControl for the Functionality you are looking for. It is Control that has its own Seprate Xaml and cs file. You can call it from any page into your Project. UserControl provides the base class for defining a new control that encapsulates related existing controls and provides its own logic. You have a XAML file and C# class file for a user control. The class file extends the UserControl class and adds additional behaviours and properties. The XAML file encapsulates the composing controls, the styles, the templates, animations and whatever necessary to form the UI. Since it is a just composition, it is really easy to create. for more Reference you can go here Why and how to create a User Control in Windows Phone
I have ended up rolling my own custom navigation using a single master page. As such any global controls are instantiated once at startup. Navigations are called from my viewmodels and result in usercontrols being removed and added to the visual tree as necessary (using transition animations to give the impression of page navigation) This works but im not sure whether it is best practice and would appreciate some opinions and comments on this. Certainly it solves the problem of global views described.

Button being used as a link

Im maintaining a site I didnt build thats for car insurance. In the banner of every page is an input that takes you to a page with a form to fill out. I cant understand why an input is used instead of a link, is there ever a valid and semantic reason for doing this?
Occasionally, people have done this because they want a link that "looks like a button". However, it is bad design.
It was never a good idea, but in the old days there was at least some justification for it: it gave a button feel and functionality to the link. However, with modern web design there is no need to do this: the same functionality can be created simply by styling a normal link appropriately.
On the other hand, this is probably more of a style issue than a real problem. It may not be worth changing it if you are maintaining an existing site.
using button or input type="button" is the original way to set up an Ajax request. that said, since it's taking the user to another page, sounds like they do not know what they are doing and/or wanted the styles that #dan1111 mentioned

Titanium HTML Scrape

I could not be any more brand-spanking new to Titanium, so even finding the right search terms is a chore, but I need to prototype a means of loading external content into a mobile app. Lots of random poking around has yielded the url configuration property of the createWebView() method, but there's a twist (didn't you know there would be?). Now I need to extract only a particular DOM node (the div with an id value of content) and display only that content.
As best I can tell, it looks like the Kitchen Sink app's "XHR to Filesystem" demo looks like the right way to go, but I don't want to spin my wheels. Can anyone confirm whether I'm on the right track?
As a side question that I (admittedly) haven't researched much yet is whether I can load jQuery into my Titanium app and use it to extract the #content DOM from everything else.
I'd appreciate any thoughts.
you are on the right track with using the httpClient, you can also load up jQuery, but i think that it might be overkill if you are just trying to pull some content from XML
http://wiki.appcelerator.org/display/guides/Working+with+Remote+Data