RadTreeView inside a RadOutlookBar

12 posts, 0 answers
  1. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 25 Jul 2013 Link to this post

    Hi All,

    We have a RadTreeView inside a RadOutlookBar as its single RadOutlookBaritem. We have the option to minimize the OutlookBar. When i click the button to minimize, the outlookbar gets minimized and the default minimized width of 30 is applied. At this juncture, if i click on the RadOutlookBar item, i.e. Treeview, i get a white band to the right of the outlookbar. And, if i click for the second time, it goes off.

    Note: When i increase the width of RadOutlookBar, the width of white band also gets increased. Even if i remove the width property, the white band exists for some minute length.

    Please look at the screenshot of the issue which i face.

    Kindly help me to solve this UI issue.

    Please let me know, if anyone want to see my code block.

    Thanks
    Manikandan
  2. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 26 Jul 2013 Link to this post

    Hi,

    In the follow up of my previous post, i got to know that, when i click on the outlookbar item when it is in minimized state, the content of that particular item is displayed in the white band besides the outlookbar. I just want to restrict the display of the white band as my outlookbar item is a treeview.

    Is there any option to restrict the display of the white band for item's content? 

    Anyone from Telerik team, please help me.

    Thanks
    Manikandan
  3. DevCraft banner
  4. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 30 Jul 2013 Link to this post

    Hi Telerik team,

    Do you have any solution for my request?

    Please let me know, if you have.

    Regards
    Manikandan
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 30 Jul 2013 Link to this post

    Hi Manikandan,

    The RadOutlookBar is designed so it shows the content of the selected item like you already mentioned. As far as I understand you need to prevent the selection of RadOutlookBarItem when the RadOutlookBar is in Minimized state and the content of that item is a RadTreeView control. In order to achieve this you can subscribe to the PreviewSelectionChanged event of the RadOutlookBar and in its handler you can mark the event as handled if the conditions are fulfilled. You can use the following snippet:

    private void xOutlookBar_PreviewSelectionChanged(object sender, RadSelectionChangedEventArgs e)
    {
        if(((e.AddedItems[0] as RadOutlookBarItem).Content as RadTreeView) != null && (sender as RadOutlookBar).IsMinimized)
            e.Handled = true;
    }
    By following this approach you will be allowed to select the item containing RadTreeView only when the RadOutlookBar is not in minimized state.

    Please give this approach a try and let me know if it works for you.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    Hi Pavel,

    I get the following error, "value does not fall within the expected range".

    We have another event called LayoutUpdated for the RadOutlookbaritem, which uses the IsMinimized property of the Outlookbar.
    Is this problem due to any clash with that event?

    Any help please?

    Thanks
    Manikandan
  7. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    Hi Pavel,

    I tried the code with a sample project of RadOutlookBar.
    But, the output was, when the Bar is minimized, i am not able to select other items in that Bar.

    so, the pop up comes even now.

    When i remove this code, i was able to select other items in that bar, in minimized state.

    Need some other idea for this, as this did not work.

    Thanks
    Manikandan
  8. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    Hi Telerik Team,

    I have a method for loading the RadOutlookBar with a DataTemplate only as a MinimizedButtonContent for the RadOutlookBar.

    And, as you said, I added the PreviewSelectionChanged event for the RadOutlookBar. That is when, the exception "value does not fall within the expected range" was thrown during the page load.

    What might be reason behind this? I need a solution for this exception. If anyone from Telerik team can help me, it would be great.

    And, kindly let me know, how to disable the display of the white band with RadOutlookBarItem's content?

    Thanks
    Manikandan
  9. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 05 Aug 2013 Link to this post

    Hi Manikandan,

    Regarding the reported exception please take a look at this thread.

    On the other hand, the "band" that you need to hide is actually the DropDownContent of a RadDropDownButton. Basically in Silverlight there is no preview event that you can handle in order to disable or hide that pop up. This is why can try extracting the default Template of the RadOutlookBar control (read more) and disable the RadDropDownButton that hosts the content of the minimized item. You can do this by setting the IsEnabled property of the RadDropDownButton called "MinimizedContentElement" to False.

    Furthermore, when you extract the Template you will be able to customize the Disabled state of the same RadDropDownButton in order to make it look like it is enabled.

    I hope this information will help you.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 05 Aug 2013 Link to this post

    Hi Pavel,

    Can you please help me in accessing the IsEnabled property of the RadDropDownButton with the current Outlookbar object?

    Actually, I have the outlookbar object and the outlookbaritem object. How do I access the DropDownButton from here?

    Regards
    Manikandan
  11. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 05 Aug 2013 Link to this post

    Hello Manikandan,

    For your convenience I extracted all the resources and the styles that are used in the RadOutlookBar control. You don't need all of them, but I extracted them so you are able to customize the properties that you need. Please take a look at the attached sample and let me know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  12. Manikandan
    Manikandan avatar
    15 posts
    Member since:
    Jul 2013

    Posted 05 Sep 2013 Link to this post

    Hi Pavel,

    I have installed VS2012 recently along with silverlight 5.0.

    And, when i was trying to open the project which you attached, it showed the following error.



    Kindly help me out.

    Thanks in advance
    Manikandan
  13. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 10 Sep 2013 Link to this post

    Hi Manikandan,

    It looks like the MSBuilder can not find some necessary files for the build. Can you please open the *.csproj file of your project with a text editor and check if the <Import> tag at the bottom is like this:
    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
    If it is the same you can check if you can find the Microsoft.Silverlight.CSharp.targets file on your system. If the file is not there I recommend you to reinstall the Silverlight 5 plugin.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner