SideDrawerUserCommand namespace?

2 posts, 0 answers
  1. Michel
    Michel avatar
    18 posts
    Member since:
    Oct 2016

    Posted 29 Mar Link to this post

    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?

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1236 posts

    Posted 03 Apr Link to this post

    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
Back to Top