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

Place Expander icon right of header

8 Answers 800 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 2
Anders asked on 05 Apr 2011, 11:29 AM
Hi

Is it possible to place the expander icon to the right of the header content?
And is it possible to make it expand only when you click on the icon?
I'm using it inside a treeview, and it overrides the double click of my treeview.

Oh and it looks likes it having problems when used together with a treeview.
When you expand the treeview node for the first time, it moves the child node to far down for a 1 sec, just to be moved back to its correct place.
I can make a small example of this, if you wish. 


EDIT

Spend some more time with it, and I figured out how to place the expander to the right and fixed the overriding problem.
Just used a StackPanel and placed my expander to the right of the rest of the content and made the expander header empty.
Though this solves some problemes, it introduces a new.

How I want it to look

What it look like now

What do I need to do, for the expanded context to be places under all my content, like shown in the first image?

8 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 06 Apr 2011, 01:27 PM
Hi Anders,

Unfortunately there is no such property. You should change the control template of the expander in order to achieve your goal. You can take a look at the following article about changing the style and control template of our controls via Blend: http://www.telerik.com/help/silverlight/common-styling-appearance-edit-control-templates-blend.html
I'm also attaching a sample project demonstrating how to move the button to the right of the content.

As to the tree view, it would be great if you send us a sample project. However the look in first image could not be achieved exactly because the TreeViewItem itself has some indentation (the minimum is the size of the expand arrow).

Hope this helps.

All the best,
Hristo
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Hristo
Telerik team
answered on 06 Apr 2011, 01:27 PM
Hi Anders,

Unfortunately there is no such property. You should change the control template of the expander in order to achieve your goal. You can take a look at the following article about changing the style and control template of our controls via Blend: http://www.telerik.com/help/silverlight/common-styling-appearance-edit-control-templates-blend.html
I'm also attaching a sample project demonstrating how to move the button to the right of the content.

As to the tree view, it would be great if you send us a sample project. However the look in first image could not be achieved exactly because the TreeViewItem itself has some indentation (the minimum is the size of the expand arrow).

Hope this helps.

All the best,
Hristo
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Anders
Top achievements
Rank 2
answered on 07 Apr 2011, 12:33 PM
Thanks for your sample, though it gives a compile error.

Error 1 Cannot find the static member 'HorizontalHeaderAlignmentProperty' on the type 'RadExpander'.

I'm using version 2011.1.328.40 The latest I could find on your site.

I created a sample project to illustrate the RadExpander and RadTreeview problem.

databasa.dk/tmp/TelerikTreeViewDemo.zip

When you expand the treeview root for the first time, its clear that its having problems with the height. 

Here you can see it in the process of expanding the root, for the first time.
http://databasa.dk/tmp/Expanding%20error.png

This it what i looks like when its finish expanding
http://databasa.dk/tmp/Expand%20finish.png
0
Tina Stancheva
Telerik team
answered on 12 Apr 2011, 05:04 PM
Hello Anders,

Can you test the example Hristo attached with the latest internal build - 2011.1.411.40, you can download it form your account. The HorizontalHeaderAlignment property is introduced there.

Also thank you for sending the sample project, it helped us identify the issue. I logged it in our PITS under the name Expander: When the control is loaded, it is first expanded and then collapsed. The item will be available for tracking from tomorrow the latest. I also updated your Telerik account accordingly.

Kind regards,
Tina Stancheva
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Anders
Top achievements
Rank 2
answered on 14 Apr 2011, 02:08 PM
Thanks for the update.
Now were are getting closer :-)

But if the Content is longer than the Header is pushes the expander icon, when its expanded.

Try with this code in your sample app.

<telerik:RadExpander Margin="43,24,0,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Content="Very Very Long Content"
                    Header="Header"
                    Style="{DynamicResource RadExpanderStyle1}" />

The Icon jumps depending on it being expanded or not.
0
Tina Stancheva
Telerik team
answered on 19 Apr 2011, 03:53 PM
Hi Anders,

You can set the RadExpander.HorizontalHeaderAlignment to "Left". This way the ExpanderButton will be left aligned and when the RadExpander is expanded and its width extends due to the content's width, the button won't move.

Give this a try and let us know if it works for you.

Regards,
Tina Stancheva
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Accepted
Vladislav
Telerik team
answered on 09 May 2011, 10:43 AM
Hi Anders,

We want to inform you, that the issue named: "Expander: When the control is loaded, it is first expanded and then collapsed" is already fixed.
You can check it in our latest internal build (released on 2 of May).
Any feedback/comments on the subject are highly appreciated.

Best wishes,
Vladislav
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Anders
Top achievements
Rank 2
answered on 09 May 2011, 11:40 AM
Thats great looks like its expanding correct now, thx :-D
Tags
Expander
Asked by
Anders
Top achievements
Rank 2
Answers by
Hristo
Telerik team
Anders
Top achievements
Rank 2
Tina Stancheva
Telerik team
Vladislav
Telerik team
Share this question
or