Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Braulio Dez

@Braulio Dez
About
Posts
483
Topics
201
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Modify a XML file in Silverlight 2 ?
    B Braulio Dez

    Ouch ! Mmmm... Or it's a hugue project, or there's something wrong going there. My solution is composed of 12 projects and more than 100 classes, maybe not a big project but at least medium sized. Have you checked what does take that hugue size? Are you embedding images or any expensive resource? Pure code shouldn't take that much. If you want to analyze how longs takes each part of the XAP, you can rename the file top ZIP and then unpack it and check sizes of DLL's, resource, and folders. Cheers Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF question csharp linq xml tutorial

  • Modify a XML file in Silverlight 2 ?
    B Braulio Dez

    In my case (dbschemaeditor.com) I'm using LINQ To XML, and I have developed a desktop like app and the release mode of the XAP is just about 3OO kbytes (in your case the DLL's that you will be added will be compressed by the SL and added to the XAP), I could shorten it by chopping it into several XAP, and load features on demand, and use caching on the isolated storage. What's the size of your XAP? Have you checked on Release mode? Cheers Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF question csharp linq xml tutorial

  • Modify a XML file in Silverlight 2 ?
    B Braulio Dez

    Mmm... Haven't used XMLWriter on SL, but in theory you can generate a file using XML Writer on SL, mmm... I guess what you want is just modify the file without rewriting it isn't it? More about XMLWriter and SL https://silverlight.net/forums/t/6655.aspx[^] If you just want to modify a single setting, you try to open it as a text file and then just check with a regex where the nodes are (a bit crappy stuff but should work). Another curiosity, how much extra weight did ad the LINQ to your XAP?

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF question csharp linq xml tutorial

  • silverlight made website slow very much
    B Braulio Dez

    Mmm.... take a look to this link http://msdn.microsoft.com/en-us/magazine/dd483293.aspx[^] I think it could help you on speeding up image loading, or make somes tricks. HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF csharp asp-net com adobe performance

  • Modify a XML file in Silverlight 2 ?
    B Braulio Dez

    Can you use XMLWriter on Silverlight, I guess yes, check this link http://msdn.microsoft.com/en-us/library/cc189001(VS.95).aspx[^] Just a curiosity, why you don't want to use LINQ To XML? works pretty well and it's pretty easy to use. Cheers Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF question csharp linq xml tutorial

  • How to download file from a physical location in Silverlight? urgent.........
    B Braulio Dez

    I don't have alink with the whole solution, but the pieces and what I implemented on my project. Let's go step by step: About the solution: It's a workaround, SL cannot do that, what we do then is to workaround it using ASP .net / Javascript (in ASP .net it's possible to return a file to client as an attachment). In my case: --> I have an XML file on my client side (that represents the database diagram), it could be whatever that can be serializable. --> I have an WCF service that accepts as input parameter that XML file, I send a call from SL to the service (if you have question on this give me a shout and will try to find some tutorial about how to call services from SL). --> This service that I'm calling inherits the context from the ASP .net application, that is, we have the ASP .net session available, to enable this you only have to add to the header of your service class: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class RenderService --> In my case I stored the XML file in a session variable in the server (so for that user we get the file in his session / memory). --> Once the Silverlight receives the callback from the service call (the service has been called successfully), I call from SL a javascript method:

        public void ShowDiagramImageRenderPopup()
        {
            System.Windows.Browser.HtmlPage.Window.CreateInstance("showReportDiagramPopup");
        }
    

    --> This javascript methods opens a popup that points to a URL (if I want it to download a file I just have to open a page in the same navigator, the only thing is that the custom HTTP Handler must return an "attacment").

    // Show the report render popup, I'm calling an ASPX that has inside a refernce to an image generated by
    // a custom HTTP hanlder (the commented solution, was the one related to download an attachmen)
    function showReportDiagramPopup() {        
        //http: //www.javascripter.net/faq/openinga.htm
        window.open("DiagramRenderPopup.aspx", "DatabaseDiagram", "scrollbars=yes, width=800,height=600", false);        
    
        // NOT IN USE, rather using popup
        // Finally we are not going to use a popup, we just open the generated image as an attachment
        //window.location = "DiagramImageHandler.ashx"
    
    }
    

    --> Ok, now let's go for the CUstom HTTP Hanlder "DiagramImageHandler.ashx", the main code s

    WPF wpf xml tutorial question

  • How to download file from a physical location in Silverlight? urgent.........
    B Braulio Dez

    Another option (not elegant but works) could be to perform a ping pong using services: - Send your file to the server again using a WCF service, store it in session. - Call a javascript method from SL that will make a request to a custom HTTP hanlder. - That custom HTTP hanlder would return the file that was in session as an attachment (first time the nasty bar from IE would appear... you are going to download something...). In my application I needed to export a DB Diagram to JPEG and to perform an export as well to an HTML report, I used that approach (ping pong :)), I could set an attribute (attachment) and IE would ask me to save the JPEG as a file. If you want to take a look at how it behaves: http://www.dbschemaeditor.com HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF wpf xml tutorial question

  • Getting session ID with SL2 !
    B Braulio Dez

    You can inherit the session context in your WCF Services. Just use:

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class MyService

    But remember you will be responsible as well to keep alive that session (maybe service ping every X minutes). HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF

  • LINQ to XML in SL2 ?
    B Braulio Dez

    Used in my project and works pretty well.

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF

  • How to deploy Silverlight application on IIS server?
    B Braulio Dez

    Trouble shooting links: http://www.tipsdotnet.com/TechBlog.aspx?PageIndex=0&BLID=11[^] http://www.cynotwhynot.com/blog/post/Calling-a-WCF-Service-from-Silverlight-20-Part-Two.aspx[^] http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2[^]

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF

  • How to deploy Silverlight application on IIS server?
    B Braulio Dez

    I assume you are not pointing to localhost and you are using WCF services. Probably you will have to create a host factory (that happened to me on the shared hosting where I have my app: public class MyServiceHostFactory : MyServiceHostFactory { protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { // Specify the exact URL of your web service Uri webServiceAddress = new Uri("http://www.mysite.com/myservice.svc"); ServiceHost webServiceHost = new ServiceHost(serviceType, webServiceAddress); return webServiceHost; } How to use it, in the svc header: <%@ ServiceHost Language="C#" Service="MyService" CodeBehind="MyService.svc.cs" Factory="MyServiceHostFactory"%> In a separated post I send you trouble shooting links. HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF

  • how to run silverlight programm
    B Braulio Dez

    Hehe, Silverlight is a buzzword... first you have to understand what is Silverlight, a quick and dirty definitions (please Ms guys don't read this)... it's like flash but with .net, that is a plugin for IE / FireFox... You can download Silverlight plugin from the silverlight official site. To Develop, you will need Visual Studio 2008 + .net fx 3.5 SP1 + SL tools for VS 2008 (you can just go to the silverlight.net getStarted option).

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF

  • Popup window in silverlight
    B Braulio Dez

    The popups that you can create are on the same page (like AJAX Modal Dialogs). You can open a popup calling from Silverlight a javascript function, but they will be an HTML popup (altough you can initialize inside another XAP application). HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF wpf xml help

  • Paint Brush in Silverlight
    B Braulio Dez

    Building a PaintBrush in Silverlight is not that hard (the painting part). Where you would get troubles is in export the image to jpeg or printing, you have to duplicate your drawing code in the server side using GDI+ (well that's if you use an starndard hosting, some people has made some cheats using WPF on the server side). HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF question

  • Exporting Grid to PDF
    B Braulio Dez

    Mark is 100 % correct, just grab your data send it to the server using a WCF service, in for instance XML format (just an string), and use any of the well know tools, isharptext I think it's free, then you have tall pdf, ... HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF css help question

  • Downloading file from server
    B Braulio Dez

    You can do it using a trick. Instead of calling the web service, from Silverlight call javascript method that will make an open to a given URL, this URL will point to a custom HTTP handler, then you return your file (implementing a custom HTTP handler it's easy can send you some info or link), you only has to say that the file is an attachment. In my case I just render e jpeg, js: function showReportDiagramPopup() { //http: //www.javascripter.net/faq/openinga.htm window.open("DiagramRenderPopup.aspx", "DatabaseDiagram", "scrollbars=yes, width=800,height=600", false); // NOT IN USE, rather using popup // Finally we are not going to use a popup, we just open the generated image as an attachment //window.location = "DiagramImageHandler.ashx" } In Silverlight: public void ShowDiagramImageRenderPopup() { System.Windows.Browser.HtmlPage.Window.CreateInstance("showReportDiagramPopup"); } HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF wpf sysadmin data-structures question

  • How to pass Sql Query as a parameter in Silverlight
    B Braulio Dez

    Well an string would work but... that could be quite dangerous, it's quite easy to make injection attacks with that technique. I would limit that free querying to the final user. HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF database tutorial

  • Role-Based Authorization(urgent)
    B Braulio Dez

    You can integrate ASP .net Authentication in your Silverlight application (on the calls to your secure services). How to work with that http://web-snippets.blogspot.com/2008/08/authentication-in-silverlight-using.html[^] You can dig more into that directions and will find how the roles are implemtented in that securit framework. HTH Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF security

  • Sending Email
    B Braulio Dez

    About e-mail you have to go WCF and then in the server side use that service. Even if you could send an email to an SMTP server from silverlight you would have to set your credentials in your client code... this means... an spammer would be quite happy to dessasembly your code get the credentials and use them to rely on your SMTP and send tones of nonsense emails. On the other hand, you create modal popups (I used them on my app), the result that you get is similar to the AJAX ASP .net modal popup. Thanks Braulio

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF com question

  • Global.asax in Silverlight?
    B Braulio Dez

    Jejejeje, it's normal to have that confusion when you start developing in Silverlight. The most similar thing that you can fin in SL is the app object, there you will have global events and method (when the app starts which page to show, when an unhandled exception is thrown...). If you want to add config data you can make your own XML and add it as a resource, another option is to read settings using a WCF services (in order to store them on the server side).

    /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

    WPF question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups