The reason for you side drawer content size not to change the code in your code behind is because you are passing too large value. With a relatively common device with e.g. something like 1080 x 1920 (420dpi) then a value of 400 will set approx 80% width (for left/right side drawer)/ The reason is that the value you are setting is device independent pixels.
@ViewChild(RadSideDrawerComponent) public drawerComponent: RadSideDrawerComponent;
.drawerComponent.drawerContentSize = 400;
will result in the following drawer(on a Nexus-5 device)
When setting the value to 200 on the same device, it will produce the following width:
More about device independent pixels (a.k.a. as dp
) and the formula used for their creation can be found here
Your HTML related code will also work on the same principle but with one correction.
Note that now our property lacks the binding brackets and we are passing the value directly.
The code above was tested and verified with modifying this example
Telerik by Progress