DataBinding for Renderer

flix101flix101 USMember ✭✭

Hi,

I have a ViewModel with some properties and want to use them in a custom renderer page.
As far as I've seen, there is no "direct" way to to this. So I should bind my Page to the ViewModel and greate properties in my page, to use them in my custom renderer.

But in this case, I dont use any View elements to use the SetBinding method.
Actually I want to bind properties to each other.

My ViewModel
DemoViewModel.cs

 public string Mode
         {
             get { return _mode; }
             set { SetProperty(ref _mode, value); }
         }

And in my Page Class I use
BindingContext = new DemoViewModel();
in the constructur.

Now i need to create a new propertie in that class to use this in my custom renderer

But how can I do this to get the right value from my ViewModel? In the get or set method, I cant use setBinding or something like that.
Or at least, I can't find a way how to do. I have to do this without xaml, because none of those prop. will be used to display anything.

thanks

Sign In or Register to comment.