How to bind to current riacontext user in xaml
- by Jakob
Hi. I Have a datacontext that has a "getuserbyguid" method, i want to pass in the current logged in user.userid as a parameter, but I don't know how to bind to the current logged in user through xaml. I've tried {Binding Path=User.UserId} but without any luck. I'm using the built in riaservices authentication methods, so the userinfo should be exposed in the riacontext, or am I wrong about this?
I have this for instance
<riaControls:DomainDataSource x:Name="FollowingGridData" AutoLoad="True" QueryName="GetUsersFollowedByIDQuery" LoadSize="20">
<riaControls:DomainDataSource.DomainContext>
<my:NotesDomainContext />
</riaControls:DomainDataSource.DomainContext>
<riaControls:DomainDataSource.QueryParameters>
<riaControls:Parameter ParameterName="userguid" Value="{Binding Path=User.UserId}" />
</riaControls:DomainDataSource.QueryParameters>
</riaControls:DomainDataSource>
But it gives me an error saying that it's not a guid, meaning that it must not be binding correctly