Read the article below if you wish to bind text to a static list on comboboxes.
Read this article if you wish to fill the ComboBox with a list fetched from a database
Say we have a text field for “Gender”, which we want to set to either “Male” or “Female”, the basics of setting up the [...]
Archives for posts tagged ‘ria’
Databinding ComboBox in Silverlight DataForms
Monday, 5 July 2010
Troubleshooting Silverlight 4.0 and WCF Deployment problems
Monday, 5 July 2010
There’s plenty to read on the internet how to manually troubleshoot deployment issues.
However, none try to automate this. Here’s a little troubleshooting script. It worked for me (up to a point). Feel free to extend this if you encounter further issues.
(Update: also have a look at WCF issues that only my hoster could address)
<%@ [...]
Silverlight equivalent of CSS list menus
Friday, 2 July 2010
Using CSS to style HTML list items as menus is considered good fashion, and I wondered if there is an equivalent in Silverlight.
Here is an inlined example. It can be refactored into a Style and stored away in the Resources section (see MSDN example)
<ListBox Height=”100″ Name=”ListBox1″ Width=”120″>
[...]
Silverlight Navigation Framework and Authentication
Tuesday, 6 April 2010
The Silverlight Navigation frameworks allows application developers to use URLs as shortcuts to specific screens within an application. (This idea of using URLs as a pointer to a specific application resource is not foreign to a web developer, but is certainly a new concept for most application developers).
However, it is the responsibility of the developer [...]
Visualizing Sub Prime Losses with JavaFX
Wednesday, 18 February 2009
Click on image above to launch via WebStart
Drawing rectangles is pretty straightforward in JavaFX. I decided to add a little bit of animation so that the pieces of the puzzle “fall” into place. This is done by applying ParallelTransition which combines ScaleTransition, RotateTransition and TranslateTransition.
JavaFX for Web Developers
Tuesday, 3 February 2009
For java developers, JavaFX is a breath of fresh air in terms of conciseness and power. A lot more could be expressed in much less lines.
However, for a web developer, the effort involved in creating some text bounded with a rectangular box on JavaFX is considerably higher compared with HTML.
I recommend starting off with a [...]
javafx and mutability
Thursday, 29 January 2009
There seems to be some misconceptions about mutability rules with JavaFX sequences (see here for example).
We can see what is going on under the hood by using the java disassembler (javap).
// seq.fx
var mylist = [1..3];
insert 4 into mylist;
compiling using javafxc seq.fx and then disassembling it with javap -c seq shows us what goes on under [...]
Binding UI representations of Data to Data in JavaFX
Wednesday, 28 January 2009
I’ve been playing with JavaFX, trying to figure out how to write applications which fetch a list from a database and represent them graphically.
For example, let’s say I’ve fetched a list of numbers from the database, and I wish to represent each number like so:
where the radius becomes bigger the bigger the number is.
There are [...]
JavaFX 1.0 considered
Wednesday, 10 December 2008
JavaFX 1.0 is finally out of the gate. There are probably many Java engineers and architects who are trying to figure out this technology and see how it could apply to their existing projects. Here is my assessment. Note this applies to JavaFX 1.0.
JavaFX 1.0 is not ready as a Flash replacement in public-facing projects
While [...]
Browsers will Rule Mobile Devices
Wednesday, 3 September 2008
Five years ago, when prototyping some apps for PDAs, I’d never consider HTML + javascript. This is because there are enough form factor issues as well as browser incompatibilities to keep one awake all night.
Things have changed.
WebKit seems to have gained ground in the mobile space, giving compatibility a much needed shot in the [...]
A concrete proposal for inlining JavaFX
Friday, 29 August 2008
Jan Erik calls me the “high IQ” type. Unfortunately, I think he means “impractical” and “living in an invory tower”.
The idea of a inlining JavaFX script is actually a smaller and incremental goal. It is practical and is achievable. It will allow people who don’t have the JavaFX SDK to experiment with the technology, within [...]
JavaFX and Disembodied Reality
Friday, 29 August 2008
Jan Erik opined insightfully about JavaFX’s prospect:
Java.net is disconnected with reality. For every guy who knows Swing/Java there are a 1000 guys who know HTML/DOM/CSS/Javascript. Silverlight is only marginally important because Microsoft controls 90 percent of the desktop marked and is the company behind C#.
JavaFX will ride the JRE in the same way AIR is [...]
JavaFX Coverflow Part 2
Tuesday, 26 August 2008
Continuing with our previous example, we now create a CustomNode Coverflows, which contain 11 covers.
A new function called positiveOrZero is introduced so that the tilt angle can be negative.
A fill attribute is introduced to the Cover class and it is bound to the Rectangle.
/**
* Coverflow.fx
**/
package coverflow;
import javafx.application.*;
import javafx.animation.*;
import javafx.input.*;
import javafx.scene.geometry.*;
import javafx.scene.*;
import javafx.scene.paint.*;
import [...]
JavaFX and Unicode source files
Monday, 25 August 2008
The JavaFX compiler supports unicode source files, just as Java compiler does. To use them you need to
make sure the source does not include the three-byte byte-order-mark
call javafxc with the -encoding parameter
javafxc -encoding UTF-8 Chinese.fx
javafx Chinese
And now for the example
import javafx.application.*;
import javafx.scene.Font;
import javafx.scene.text.Text;
import javafx.scene.paint.Color;
Frame {
title: "JavaFX Unicode Example"
width: 400 height: 300
stage: [...]
JavaFX Coverflow Part 1
Saturday, 23 August 2008
Warning: Apple Inc apparently has a patent on this. I’m merely doing this for performance comparison purposes and for self-education only.
It’s been about 2 weeks since my first JavaFX session. My initial distaste for the YAML syntax is largely gone. I have avoided using Netbeans, as vim is sufficient. The absence of closing tags in [...]
Why JavaFX should be inlineable with HTML
Friday, 22 August 2008
I was disappointed when I found out JavaFX interpreter is not shipping in the final Java runtime. Shipping the interpreter is key to inlining script with HTML, and will accelerate adoption of this shiny cross-browser platform.
There are tens of millions of web developers who have already been trained to edit text in a file and [...]
Chaining JavaFX effects
Thursday, 21 August 2008
Unfortunately, it appears that the only way to chain JavaFX effects together is by using a Group control. (There is a Effect(input1, input2) constructor, but I can’t seem to access it from JavaFX Script, while the Blend effect doesn’t chain effects, but instead applies them in parallel).
To achieve a Coverflow-like look, we apply a reflection [...]
JavaFX Questions
Tuesday, 19 August 2008
Sun has released a JavaFX preview. Having played around with it, here are my questions:
Will using the scenegraph api consume less resources than a comparable app developed using DHTML? In Meebo is what’s wrong with the web (cached), Uncov writes that Meebo consumes 39Mb RAM over-and-above that of Firefox. Running a basic JavaFX app (JRE1.6u7) consumes [...]
JavaFX API documentation
Sunday, 17 August 2008
Since JavaFX is still under active development, the JavaFX API docs could do with some serious link-love. Currently, version 0.2 of JavaFX docs ranks in Google.
JavaFX Type Casting
Sunday, 17 August 2008
I have been playing a little bit more with JavaFX. Unfortunately the language reference isn’t particularly complete, and it turns out that type casting in JavaFX is via the as keyword. (Thanks Andres Almiray for the tip!)
For example,
var myWidth = (e.node as Rectangle).width
Incidentally, the performance of the drop shadow effect leaves much to be [...]