A question a lot of developers ask when starting to develop in Silverlight is how do we set a transparent background in the silverlight application? This can be useful if you intend to provide a seamless integration with your website and run the Silverlight application object over html content that you want displayed. This can easily be done by setting background and IsWindowless properties on the silverlight object, like so:
Some notes in this example: The TargetName property sets the name of the target window or frame that the Web page should open in, or the name of the object within the Silverlight application to navigate to. Possible values are: _blank, _media, or _search: Loads the linked document into a new blank window. _parent, _self, _top, or “”: Loads the page into the window in which the link was clicked (the active window). The NavigateUri is the link to navigate to. (more…)
The perf tools for WPF 4.0 are now available for download, and you can use them for profiling both 3.5 and 4.0 applications. The tools are included in the Windows SDK 7.1 for Windows 7 and .NET Framework 4.
Here are three useful resources for those who are prototyping iPhone apps. To give your demos a realistic look, you can download these iPhone UI elements, available in three different formats: Adobe Illustrator Vector Elements (.ai) – Mercury Intermedia Blog Download iPhone UI Vector Elements Now (2.6MB) Adobe Photoshop (.psd)- teehan-lax Blog Download The iPhone GUI PSD Here (9MB) OmniGraffle – Graffletopia http://graffletopia.com/stencils/413 You can also get them in XAML format through Mike Swanson’s Adobe Illustrator to XAML Export plugin.
Last night I loaded a massive ASP.NET 2.0 project I did some years ago in VB.NET. It used a SQL 2000 database for data storage, so I had to attach the mdf file to get it to work. So I opened SQL Server Management Studio, opened a connection to the server instance, and went for the Attach database option. When I selected the file, the following error came up: “Store.mdf is Compressed But Does not Reside in a Read-only Database or Filegroup. The File Must be Decompressed.” So here’s a quick tip for anyone who faces a similar issue. It (more…)
It’s here, and it’s finally official. Microsoft recently announced two Windows Phone devices called Kin I and Kin II, the outcome of the highly rumored Microsoft Project Pink. They both feature Windows Phone OS, but differ in hardware specs. Kin II it’s the biggest, featuring 8Gb memory, 8Mp camera that records 720p video, while KIN I has a smaller form factor and features a 5Mp camera with full VGA Video. It’s been said that battery life will last an entire weekend. But this is still subject of testing, you know how marketing works, right? The new OS is very much (more…)
A cool feature in Visual Studio 2010 is Pin To Source. This command is available in the Visual Studio code editor context menu and allows you to create a kind of little “Post-It!” on your code showing variable values and expressions that you want to watch during a debugging session. Its very handy: Just right click on the variable you wish to watch (or create your own expression) and select Pin To Source. And Voilá! A tip shows up with the current inspected value. When you aren’t debugging it all becomes grayed out, just like the Watch window. I’m having (more…)
I was recently confronted with a scenario in witch a xaml element needed to be dynamically replaced and nested in a container control. There’s nothing unusual about this except for the fact that when this happens the element being replaced might have attached dependency properties set on it. Needless to say that in this scenario such operation might have significant impact. Imagine if your element is inside a Canvas panel and has some of its attached properties set, like Canvas.Top or Canvas.Left. My first approach was to go through reflection on the parent and get all DependencyProperties, then invoke GetValue() (more…)
In the [link2post id="175"]previous article[/link2post] we took a step further on input validation over WPF controls by means of an attached property. The attached property’s owner would then have the required programming to add validation logic to the control’s target dependency property binding. Keeping optimization in mind we can go, once again, a step further on this and reduce the code required by implementing our own Binding object, with it’s own validation mechanism, that could be configured by the developer in design time. An example of this methodology would be going from this: