Expander in wpf with icon button - wpf

I have expander in wpf. I need Expander with header icon(as Notes icon) on right side without change the expander icon. From that i have to drag and drop on chart lines and make it as a small notes.

Try using and changing the controltemplate for the default expander. You can find it here. You use the template found on the website and put your Notes icon somewhere in between (in the header section). Just play around with it and you will find that it is rather easy to customize it. Have fun!

Related

Silverlight Toolkit Expander Button Style/Icon

I'm looking for an easy way to change the styling of the expander button in the Silverlight Toolkit Expander control. For example:
Smaller or larger icon.
Replace the icon with another one.
Change the colours of the icon being used.
TIA
Craig
What you're describing is essentially the bread & butter of what Expression Blend is good for. In Blend you would just right-click your control and choose to edit a copy of the template. Then you would find the Toggle Button, and then edit THAT template.
Otherwise, you'll need to find the Control Template for the expander in your ToolkitStyles.xaml though it's much easier with Expression Blend though. You'll find Templates for all four directions an expander and go.
A quick solution search for;
<Style TargetType="toolkit:Expander" x:Key="DefaultExpanderStyle">
Should produce your default template you can either edit directly or make a copy of (just make sure to rename the Key name if you copy it) and that way you have all your States & Transitions etc already also. Remember your culprit will be the embedded ToggleButton inside the template for whichever direction expander you're wanting to edit.
Hope this helps.

Custom designing of inbuilt Scroll bar or Scroll Viewer of Datagrid in Silverlight

can any one please suggest me how to change style of inbuilt scroll viewer of DataGrid in Silverlight.
Right now my DataGrid is taking the default style of scroll viewer which is used in the project so I want to change that is it possible if yes then please suggest me.
If you use Expression Blend, in design mode you can right-click the datagrid > Edit Template > Edit a Copy.
In the window "Objects and TimeLine" will appear the inbuilt components, including the Horizontal and Vertical ScrollBars:
After that, in the "Objects and TimeLine" window, you right-click the ScrollBars > Edit Template > Edit Current. The XAML Window will show the ScrollBar Style:
I recommend you mannually duplicate the entire Style and make changes in the copy.

Image Button with no border that works like a toolbar button?

I want a button that
Displays an image with NO border, NO background, NO text
If I tab into the imagebutton, THEN it shows the background and border
Also if I hover over it, it shows the background and border
I've searched and I've tried so many different things, but nothing it exactly what I want. I've tried setting various properties on the button to make the background and border transparent, but it still shows up. I've tried a style with a custom control template. I'd rather not have to completely reinvent all the triggers etc to get the button to render on mouse over. The biggest problem with custom control template is that then I loose all existing functionality and I'm basically building a new control from the ground up.
Here is another link that came closest to what I wanted but it doesn't properly work for me.
How do you completely remove the button border in wpf? - BUT.... for some reason the hover effect gets stuck. One I mouse over the image and the button border draws, it stays stuck on until I click somewhere else.
Actually, you will want to override the control template. You're not "losing" any functionality (aside from the UI triggers).
Original/Default Template -- This is a good starting point... copy/paste that into you're XAML (wherever you want to style this button... ie Button resources, UserControl/Window resources, App Resources?). From there make your adjustments.
Another easy way is to use Expression Blend. You can easily create a new template based on the existing template, and the styling/authoring tools it provides are much better than hand-coding XAML (unless you're good at doing that).
As far as displaying an image instead of text, just set the image as the content. A Button is a type of ContentControl which means that it can house any type of content (Object).

WPF ListBox Template/Style (ScrollBar and InnerShadow)

Hy.
Could you help me create the fallowing control style/template?
What do I need:
A (Vertical and Horizontal) ScollBar Style like that. (Without the two arrow button)
Inner shadow on the top and bottom of the "ScrollViewer area".
That's all I need, I can create the rest parts of the control. (Selected Item's color etc)
Thank you.
The scrollbar control in WPF can be thought of as collection of the two repeatbuttons and the track part. You can change the template of the scrollbar and remove the repeatbutton.
For the shadow part, you need to provide the the Zorder index. Refer to the following link - WPF shadow on stackpanel controls
I know is too late for an answer but Style is very easy to get if you understand basic templating. Here you will find a Scrollbar that emulate the one you want, hope you like it.

Change style of Expander ToggleButton in Silverlight Toolkit?

I have an Expander in Silverlight 4 that I am trying to style. Specifically, I want to override the default look of the ToggleButton used in the Expander. How do I go about doing this? I've written some style for the Expander so far, but I can seem to find the place to override the default ToggleButton style.
This MSDN page gives a pretty complete description of what is needed to override the Expander.
If you have Expression Blend, another option is to start a new project in Blend, insert an expander on your window/usercontrol, then right-click on it and choose 'Edit Template'. Then you can change just the pieces you want. For my needs, this functionality in Blend is worth the cost of this software by itself.
You will need to replace the whole expander template since the expander stores the togglebutton templates (it has one for each direction) in its template and offers no way for you to provide your own.

Resources