Click here to Skip to main content
15,894,460 members
Home / Discussions / WPF
   

WPF

 
Question[SOLVED] Child Window Not Working Properly Pin
AmbiguousName27-Jun-11 0:48
AmbiguousName27-Jun-11 0:48 
AnswerRe: Child Window Not Working Properly Pin
Mycroft Holmes27-Jun-11 1:15
professionalMycroft Holmes27-Jun-11 1:15 
AnswerRe: Child Window Not Working Properly Pin
AmbiguousName27-Jun-11 1:17
AmbiguousName27-Jun-11 1:17 
QuestionHow click more that visible row in DataGrid Pin
tâzn27-Jun-11 0:09
tâzn27-Jun-11 0:09 
AnswerRe: How click more that visible row in DataGrid Pin
Mycroft Holmes27-Jun-11 1:17
professionalMycroft Holmes27-Jun-11 1:17 
GeneralRe: How click more that visible row in DataGrid Pin
tâzn27-Jun-11 5:22
tâzn27-Jun-11 5:22 
GeneralRe: How click more that visible row in DataGrid Pin
Mycroft Holmes27-Jun-11 12:54
professionalMycroft Holmes27-Jun-11 12:54 
QuestionAny way to copy / clone XAML resources? Pin
SledgeHammer0124-Jun-11 18:17
SledgeHammer0124-Jun-11 18:17 
lets say I have something like this in XAML:

<GridViewColumnCollection x:Key="Foo">
<GridViewColumn ... />
<GridViewColumn ... />
<GridViewColumn ... />
</GridViewColumnCollection>

if I do FindResource("Foo"), I get a GridViewColumnCollection, no problemo.

However, I'm using docking windows, and in a lot of situations, multiple windows share the same exact instance of MyUserCtrl.xaml and so they share the same exact instance of GridViewColumnCollection. This happens if I open multiple windows of the same type. Its a VisualTree optimization in docking windows.

So what happens is that if I resize a column in MyUserCtrl(instance 1), those values are shared across to MyUserCtrl(instance 2).

I could declare the GridViewColumns in code, but setting up all the properties, bindings, etc. is a PITA.

Is there a way to say "give me a new instance of Foo?

GridViewColumnCollection unfortunately does not implement IClonable. GridViewColumnCollection and GridViewColumn are not serializable either, so I can't do that trick.

Doing a member wise copy seems like another PITA.

Surely there has to be a clever way to keep those columns defined in XAML and be able to copy them or get new instances?
AnswerRe: Any way to copy / clone XAML resources? Pin
SledgeHammer0124-Jun-11 18:30
SledgeHammer0124-Jun-11 18:30 
AnswerRe: Any way to copy / clone XAML resources? Pin
Mark Salsbery24-Jun-11 18:35
Mark Salsbery24-Jun-11 18:35 
GeneralRe: Any way to copy / clone XAML resources? Pin
SledgeHammer0124-Jun-11 18:56
SledgeHammer0124-Jun-11 18:56 
GeneralRe: Any way to copy / clone XAML resources? Pin
Mark Salsbery24-Jun-11 19:00
Mark Salsbery24-Jun-11 19:00 
GeneralRe: Any way to copy / clone XAML resources? Pin
SledgeHammer0124-Jun-11 19:21
SledgeHammer0124-Jun-11 19:21 
AnswerRe: Any way to copy / clone XAML resources? Pin
Abhinav S26-Jun-11 7:24
Abhinav S26-Jun-11 7:24 
QuestionHow to delete a row from a datagrid based upon a value from another in WPF Pin
Member 297299224-Jun-11 11:28
Member 297299224-Jun-11 11:28 
AnswerRe: How to delete a row from a datagrid based upon a value from another in WPF Pin
Abhinav S26-Jun-11 7:28
Abhinav S26-Jun-11 7:28 
GeneralRe: How to delete a row from a datagrid based upon a value from another in WPF Pin
Member 297299227-Jun-11 1:18
Member 297299227-Jun-11 1:18 
GeneralRe: How to delete a row from a datagrid based upon a value from another in WPF Pin
Abhinav S27-Jun-11 6:54
Abhinav S27-Jun-11 6:54 
AnswerRe: How to delete a row from a datagrid based upon a value from another in WPF Pin
Mycroft Holmes26-Jun-11 12:17
professionalMycroft Holmes26-Jun-11 12:17 
GeneralRe: How to delete a row from a datagrid based upon a value from another in WPF Pin
Member 297299227-Jun-11 1:20
Member 297299227-Jun-11 1:20 
GeneralRe: How to delete a row from a datagrid based upon a value from another in WPF Pin
Mycroft Holmes27-Jun-11 2:52
professionalMycroft Holmes27-Jun-11 2:52 
QuestionMVVM: best way to wire up this Command scenario? Pin
SledgeHammer0124-Jun-11 10:29
SledgeHammer0124-Jun-11 10:29 
AnswerRe: MVVM: best way to wire up this Command scenario? Pin
Pete O'Hanlon24-Jun-11 10:37
mvePete O'Hanlon24-Jun-11 10:37 
GeneralRe: MVVM: best way to wire up this Command scenario? Pin
SledgeHammer0124-Jun-11 10:42
SledgeHammer0124-Jun-11 10:42 
QuestionProblem with WPF and removing a row from a datagrid Pin
Member 297299224-Jun-11 10:05
Member 297299224-Jun-11 10:05 

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.