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

RadTreeView inside a RadOutlookBar

11 Answers 173 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Manikandan
Top achievements
Rank 1
Manikandan asked on 26 Jul 2013, 04:38 AM
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

11 Answers, 1 is accepted

Sort by
0
Manikandan
Top achievements
Rank 1
answered on 26 Jul 2013, 09:42 AM
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
0
Manikandan
Top achievements
Rank 1
answered on 30 Jul 2013, 01:40 PM
Hi Telerik team,

Do you have any solution for my request?

Please let me know, if you have.

Regards
Manikandan
0
Pavel R. Pavlov
Telerik team
answered on 30 Jul 2013, 03:45 PM
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 >>
0
Manikandan
Top achievements
Rank 1
answered on 31 Jul 2013, 06:16 AM
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
0
Manikandan
Top achievements
Rank 1
answered on 31 Jul 2013, 06:29 AM
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
0
Manikandan
Top achievements
Rank 1
answered on 31 Jul 2013, 01:31 PM
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
0
Pavel R. Pavlov
Telerik team
answered on 05 Aug 2013, 06:31 AM
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 >>
0
Manikandan
Top achievements
Rank 1
answered on 05 Aug 2013, 11:33 AM
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
0
Pavel R. Pavlov
Telerik team
answered on 05 Aug 2013, 03:11 PM
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 >>
0
Manikandan
Top achievements
Rank 1
answered on 05 Sep 2013, 08:09 PM
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
0
Pavel R. Pavlov
Telerik team
answered on 10 Sep 2013, 10:39 AM
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 >>
Tags
OutlookBar
Asked by
Manikandan
Top achievements
Rank 1
Answers by
Manikandan
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or