Search Results

Search found 2 results on 1 pages for 'kmontgom'.

Page 1/1 | 1 

  • Selecting a UserControl from XAML

    - by kmontgom
    I'm working on a problem right now where I need to embed a UserControl inside another UserControl. But, I need to determine at runtime which embedded UserControl to instantiate. This implies to me that some form of data binding and/or template selection mechanism has to be invoked, but I'm not sure how to proceed with the pure XAML approach. If I was to do this with code, I would define some sort of container control in the parent UserControl, and then in the code-behind, implement some logic which would instantiate the appropriate child UserControl and then insert it as Content into the specified container in the parent UserControl. Can this be done using only XAML, or is some sort of code-behind required?

    Read the article

  • Inconsistent behavior working with "Flex on Rails" example.

    - by kmontgom
    I'm experimenting with Flex and Rails right now (Rails is cool). I'm following the examples in the book "Flex on Rails", and I'm getting some puzzling and inconsistent behavior. Heres the Flex MXML: <mx:HTTPService id="index" url="http://localhost:3000/people.xml" resultFormat="e4x" /> <mx:DataGrid dataProvider="{index.lastResult.person}" width="100%" height="100%"> <mx:columns> <mx:DataGridColumn headerText="First Name" dataField="first-name"/> <mx:DataGridColumn headerText="Last Name" dataField="last-name"/> </mx:columns> </mx:DataGrid> <mx:Script> <![CDATA[ import mx.controls.Alert; private function main():void { Alert.show( "In main()" ); } ]]> </mx:Script> When I run the app from my IDE (Amythyst beta, also cool), the DataGrid appears, but is not populated. The Alert.show() also triggers. When I go out to a web browser and manually enter the url (http://localhost:3000/people.xml), the Mongrel console shows the request coming through and the browser shows the web response. No exceptions or other error messages occur. Whats the difference? Do I need to alter some OS setting? I'm using Win7 on an x64 machine.

    Read the article

1