Lookup default styles in wpf? - wpf

In wpf, is it somehow possible to lookup the definition of the default style of a control?
In this question I saw an example thereof, see: "just for a reference, here's the default MenuItem's style". Where did he/she find it?

using Expressin Blend is the best answer for this.
in Expression blend select the control on which you whould like to see the tamplate then right click and select the template then Edit a copy. this will create a copy os used tempalte will explorer the orignal template if you are not using any theme.
On the other hand you can look for http://wpfinspector.codeplex.com/

Related

How to retrieve a default style with Expression Blend?

From what I know, Expression Blend is the only method to look at a default style for some WPF control. But I find it very unelegant to create a new project, find a directory to save it to, add the element to my empty window designer and find some hidden "edit template copy" command or so.
And it totally fails when I want to get a DataGridCell style because I can't add it to the window.
How is this really correctly and efficiently done?
If Expression Blend is not involved in the better solution, please go ahead and let me know. Something directly available from VS 2010 would be best.
It's not the only method, but it is generally the easiest route since Blend by far makes for a better designing experience.
For you issue, I forget the names of the Default resource dictionaries for WPF. Like with SL you'd just go look into the CoreStyles, SDKStyles, ToolkitStyles (.xaml) files for the full templates. I'm pretty sure the same exists in WPF wherein you could likely locate them with a quick solution search for TargetType="{blah}" or wherever they're referenced to be loaded.
Otherwise you can continue with the right-click "Edit Template" method, and for a child part of a template (like a DataGridCell style) you would instead choose "Edit Additional Templates" and find that part of the template there the same way.
However like I said you can go straight to the templates themselves, just have to find the default dictionaries first. Hope this helps.

Howto edit TopLevelHeaderTemplates PART_Popup in Expression Blend

I am very new to Expression Blend but can't find any solution with google. I would like to style a Menu and it's items. But how can I see the actual look of the PART_Popup? The IsOpen Property is bound to something like {Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}. It seems I am only looking at something complete invisible :). There is also a SystemDropShadowChrome but I actually can't see this thing. The eyes next to all the items are active. And even if I change some background colors all that I see is just a black transparent rectangle.
Is this a toolkit control (dropdownmenu) or a telerik (radmenu) or something? If you've already broken out the template (eg; Right click->Edit Template->Edit Current/Copy) Then there's a couple things you want to try to find it since sometimes they can be oddly embedded.
Go to the root level of the control, try Right Click->Edit Additional Templates->...
If that' doesn't provide your part_ look in your broken out template resource you've created and inspect your object tree. You're looking for embedded controls appearing as objects. Right click the embedded control in your object tree and edit its template (Current or Copy)
You'll potentially sometimes have to drill down multiple layers within a template to expose the objects you wish you to edit. If you specify which control you're working with I'm sure we can tell you exactly how to get to where you need more efficiently. Cheers!
Try exploring the States tab. Most likely some of the parts are only visible in certain states.

Changing the look and feel (like 3d effect) of grids in silverlight

Is it possible to change the look of the data grid in silverlight (or any other object), by look i mean changing the depth or the effect of it so it looks 3d like and stands out?
Thanks,
Michelle
You can change the style of any object in Silverlight.
Search for Styles in Silverlight...
You can change the style for all controls of a certain type in your application or in a part of it. You can also change specific controls.
You can change the style conditionally (in function of the state, responding to a trigger etc.)
ScottGu's basic tutorial
Links to further reading

Blend Slider Control

Is there a free implementation of the text box in Blend's property grid that allows you to change the number by clicking and dragging? Or perhaps another way to ask is what kind of control called so I can google it?
just try this
http://www.codeproject.com/KB/WPF/MicrosoftBlendStyleTextBo.aspx
It's called a numeric UpDown control. (Terrible name, I know).
MS has a sample implementation for WPF, although I think you'll have to provide the draggable part yourself.

Can I partially apply a ControlTemplate in WPF?

I'm pretty green when it comes to WPF, so forgive me if this is an obvious question.
I'm trying to modify an existing code base that is using the Divelements SandRibbon libraries, but am finding that the GalleryButton control doesn't behave quite how I'd like. What I'd like to do is change the way GalleryButton arranges the image and label, but keep the default 'look' for all triggers such as mouse over etc.
Is it possible to apply a ControlTemplate to some parts of a control but not others? I want to specify that the GalleryButton displays its 'Image' and 'Text' properties differently than the defaults, but not touch anything else.
Unfortunately no -- it's all or nothing. However, one solution I've used before is to simply sublass the control and alter the layout in code behind in OnApplyTemplate.

Resources