Click here to Skip to main content
15,890,438 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How to measure cold startup time Pin
krishnan.s22-Jul-09 1:24
krishnan.s22-Jul-09 1:24 
GeneralRe: How to measure cold startup time Pin
Pete O'Hanlon22-Jul-09 1:40
mvePete O'Hanlon22-Jul-09 1:40 
AnswerRe: How to measure cold startup time Pin
#realJSOP22-Jul-09 2:42
mve#realJSOP22-Jul-09 2:42 
QuestionCreating a list... Php and Silverlight just point me in the right direction please? Pin
Joe881021-Jul-09 11:26
Joe881021-Jul-09 11:26 
AnswerRe: Creating a list... Php and Silverlight just point me in the right direction please? Pin
Michael Sync23-Jul-09 6:18
Michael Sync23-Jul-09 6:18 
QuestionI just heard that HTML5, which can realize most functions of Silverlight, true? Pin
Seraph_summer21-Jul-09 9:24
Seraph_summer21-Jul-09 9:24 
QuestionDataBinding composite controls Pin
Adriaan Davel21-Jul-09 6:57
Adriaan Davel21-Jul-09 6:57 
AnswerRe: DataBinding composite controls Pin
Michael Sync23-Jul-09 6:36
Michael Sync23-Jul-09 6:36 
Are your detailed control and listing control in same XAML file?

If yes then you can do that way.

View

<UserControl .....
xmlns:viewmodel="......"
>
<UserControl.DataContext>
<viewmodel:YourViewModel>
</UserControl.DataContext>

<DataGrid
ItemSouce="{Binding YourList}"
SelectedItem="{Binding ActiveYourEntity}"
AutoGeneratedColumns="True"
/>

<StackPanel x:Name="Details">
<StackPanel Orentitation="Horizontal">
<TextBlock Text="Field : " Margin="5" />
<Textbox Text="{Binding ActiveYourEntity.Field}" Margin="5" />
</StackPanel>
</StackPanel>
</UserControl>

ViewModel

class YourViewModel : INotifyPropertyChanged{

private ObserverableCollection<YourEntity> yourlist = new ObserverableCollection<YourEntity>();
public ObserverableCollection<YourEntity> YourList {
get{ return yourlist; }
set {
yourlist = value;
SendPropertyChanged("YourList");
}
}


private YourEntity activeYourEntity = new YourEntity();
public YourEntity ActiveYourEntity {
get{ return activeYourEntity; }
set {
activeYourEntity = value;
SendPropertyChanged("ActiveYourEntity");
}
}

//Do something for implementing INotifyPropertyChanged.
}

Entity

class YourEntity : INotifyPropertyChanged {
private string field = string.Empty;
public string Filed {
get{ return field ; }
set {
field = value;
SendPropertyChanged("Filed");
}
}

//Do something for implementing INotifyPropertyChanged.
}

Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

Microsoft MVP (Silverlight), WPF/Silverlight Insiders

GeneralRe: DataBinding composite controls Pin
Adriaan Davel23-Jul-09 19:27
Adriaan Davel23-Jul-09 19:27 
GeneralRe: DataBinding composite controls Pin
Michael Sync23-Jul-09 20:05
Michael Sync23-Jul-09 20:05 
GeneralRe: DataBinding composite controls Pin
Adriaan Davel23-Jul-09 21:21
Adriaan Davel23-Jul-09 21:21 
GeneralRe: DataBinding composite controls Pin
Jeremy Likness26-Jul-09 3:08
professionalJeremy Likness26-Jul-09 3:08 
GeneralRe: DataBinding composite controls Pin
Adriaan Davel27-Jul-09 1:43
Adriaan Davel27-Jul-09 1:43 
QuestionGlobal Styles [modified] Pin
#realJSOP21-Jul-09 4:57
mve#realJSOP21-Jul-09 4:57 
AnswerRe: Global Styles Pin
Pete O'Hanlon21-Jul-09 9:59
mvePete O'Hanlon21-Jul-09 9:59 
GeneralRe: Global Styles Pin
#realJSOP21-Jul-09 10:18
mve#realJSOP21-Jul-09 10:18 
GeneralRe: Global Styles Pin
Pete O'Hanlon21-Jul-09 10:24
mvePete O'Hanlon21-Jul-09 10:24 
GeneralRe: Global Styles Pin
#realJSOP21-Jul-09 10:52
mve#realJSOP21-Jul-09 10:52 
GeneralRe: Global Styles Pin
Pete O'Hanlon21-Jul-09 11:31
mvePete O'Hanlon21-Jul-09 11:31 
GeneralRe: Global Styles Pin
#realJSOP21-Jul-09 23:31
mve#realJSOP21-Jul-09 23:31 
GeneralRe: Global Styles Pin
Pete O'Hanlon22-Jul-09 0:22
mvePete O'Hanlon22-Jul-09 0:22 
GeneralRe: Global Styles Pin
#realJSOP22-Jul-09 2:21
mve#realJSOP22-Jul-09 2:21 
GeneralRe: Global Styles Pin
Pete O'Hanlon22-Jul-09 2:23
mvePete O'Hanlon22-Jul-09 2:23 
GeneralRe: Global Styles Pin
#realJSOP22-Jul-09 2:41
mve#realJSOP22-Jul-09 2:41 
GeneralRe: Global Styles Pin
Pete O'Hanlon22-Jul-09 3:43
mvePete O'Hanlon22-Jul-09 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.