This is a migrated thread and some comments may be shown as answers.

SideDrawerUserCommand namespace?

1 Answer 39 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
Michel
Top achievements
Rank 1
Michel asked on 29 Mar 2017, 08:19 PM

I want to bind a command to the closed event of the sidedrawer. I added a command property "SettingsClosedCommand" to the viewmodel.
I added this namespace to the xaml:

xmlns:drawer="clr-namespace:Telerik.XamarinForms.Primitives.SideDrawer;assembly=Telerik.XamarinForms.Primitives"

And I added the 3 middle lines of code to the sidedrawer:

<telerikPrimitives:RadSideDrawer DrawerLength="180" DrawerLocation="Top" DrawerTransitionType="SlideInOnTop"  IsOpen="{Binding AreSettingsOpen, Mode=TwoWay}" >

  <telerikPrimitives:RadSideDrawer.Commands>

    <drawer:SideDrawerUserCommand Command="{Binding SettingsClosedCommand}" Id="Closed"/>

  </telerikPrimitives:RadSideDrawer.Commands>  

<telerikPrimitives:RadSideDrawer.MainContent>

etc..

When I try to compile I get this error:

SeverityCodeDescriptionProjectFileLineSuppression State ErrorObject reference not set to an instance of an object.

I found the information here. What am I missing here? Is the namespace correct because it is not mentioned in the article?

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 03 Apr 2017, 07:45 AM
Hello Michel,

I cannot be sure what is going wrong with your solution. I tried to recreate it on our side and the code works as expected. I am sending you the page that I used to setup the scenario. The commands are triggered using both approaches. 

Please take a look at the attached file and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
SideDrawer
Asked by
Michel
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or