Click here to Skip to main content
15,905,144 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Create event in UserControl Pin
jadughar1-Jul-11 10:45
jadughar1-Jul-11 10:45 
GeneralRe: Create event in UserControl Pin
Mark Salsbery1-Jul-11 12:04
Mark Salsbery1-Jul-11 12:04 
GeneralRe: Create event in UserControl Pin
jadughar2-Jul-11 0:11
jadughar2-Jul-11 0:11 
GeneralRe: Create event in UserControl Pin
Mark Salsbery2-Jul-11 6:19
Mark Salsbery2-Jul-11 6:19 
GeneralRe: Create event in UserControl Pin
jadughar3-Jul-11 22:15
jadughar3-Jul-11 22:15 
QuestionTwo-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 6:46
SledgeHammer0130-Jun-11 6:46 
AnswerRe: Two-way binding requires Path or XPath error Pin
Pete O'Hanlon30-Jun-11 6:56
mvePete O'Hanlon30-Jun-11 6:56 
GeneralRe: Two-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 7:08
SledgeHammer0130-Jun-11 7:08 
Originally the DP was 1-way, so it didn't have this issue and both methods worked fine.

{Binding ElementName=filenameColumn}

This binding DOES work fine (when the DP is one way). The DP was correctly set to filenameColumn. This method:

{Binding SomePropertyInVM}

worked fine as well. Well, sort of. The 2nd method didn't update the property in the VM which is why I made it 2-way. If I change the property back to 1-way, then both methods work again (except for the fact that the 2nd method doesn't update the property in the VM).

What I was saying in my original post was that I don't have this issue with another similiar DP that I changed to 2-way as well. Except that type is a ListViewSortDirection enum and this DP is a GridViewColumn.

So on the other DP, I can do:

TheDP="Ascending" AND TheDP="{Binding SomePropInTheVM}"

if I bind to the prop in the VM, it works fine as 2 way. I guess the first method here isn't using binding, so it doesn't have that issue.

I did try adding a Path=. to the binding as you suggested and it does fix the problem, but I dunno which one is uglier lol:

Having to do this for hard coding in the XAML:

{Binding ElementName=filenameColumn, Path=.}

vs having to do this for MVVM:

{Binding SomePropInTheVM, Mode=TwoWay}
GeneralRe: Two-way binding requires Path or XPath error Pin
SledgeHammer0130-Jun-11 9:20
SledgeHammer0130-Jun-11 9:20 
QuestionRuntime Error 4008... Layout Cycle Detected... Layout Could Not Complete. Pin
NTheOne30-Jun-11 1:59
NTheOne30-Jun-11 1:59 
AnswerRe: Runtime Error 4008... Layout Cycle Detected... Layout Could Not Complete. Pin
Pete O'Hanlon30-Jun-11 2:34
mvePete O'Hanlon30-Jun-11 2:34 
QuestionIs this possible with HierarchicalDataTemplates? Pin
SledgeHammer0129-Jun-11 11:47
SledgeHammer0129-Jun-11 11:47 
QuestionShift path Pin
Lutosław27-Jun-11 22:37
Lutosław27-Jun-11 22:37 
AnswerRe: Shift path Pin
Mark Salsbery28-Jun-11 10:21
Mark Salsbery28-Jun-11 10:21 
GeneralRe: Shift path Pin
Lutosław28-Jun-11 10:48
Lutosław28-Jun-11 10:48 
GeneralRe: Shift path Pin
Mark Salsbery28-Jun-11 10:59
Mark Salsbery28-Jun-11 10:59 
QuestionHow to keep two Combo Boxes in sync with WPF [modified] Pin
Member 297299227-Jun-11 9:42
Member 297299227-Jun-11 9:42 
AnswerRe: How to keep two Combo Boxes in sync with WPF Pin
SledgeHammer0127-Jun-11 11:22
SledgeHammer0127-Jun-11 11:22 
AnswerRe: How to keep two Combo Boxes in sync with WPF Pin
Mycroft Holmes27-Jun-11 12:59
professionalMycroft Holmes27-Jun-11 12:59 
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 

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.