Styling WPF slider background - wpf

I'm trying to apply a specific style to a slider control and I'm having trouble figuring out what I need to do for the slider's background. What do I need to do to get something like this triangle to show in the background of my slider?
I initially thought I would define a GeometryDrawing and set something in the tickbar tag to it - but I can't find anything suitable.
This is what I'm looking for. Thanks for any ideas.
Slider background http://img16.imageshack.us/img16/690/slider.png

Check out my Intuipic project, which does something similar (only horizontally):

you need to investigate a bit more into styling and templatiting in wpf. I would expect the easiest way would be to define a Control Template but you 'might' be able to achieve this with just styling
Check out this page on msdn for starters. There is probably loads of other resources out there. Big sections on it in the book i'm reading at the moment - pro wpf in c# 2008
Sorry i'm not coming up with an example... you'd be better off doing a bit of background reading and then coming back with any specific issues.

Related

WPF Customise NavigationUI Control

Good Afternoon,
I am trying to customise the NavigationPanel UI Back and forward button, i basically just want to change the colors. I cannot find a property that can be set so i am a little stuck.
I believe the way forward is to amend an existing template and set the Page.Template property as the new control template? Am i going down the correct route? Where does this Xaml belong to, under the Application.Resources / Page.Resources?
I believe the Template is http://msdn.microsoft.com/en-us/library/aa970054.aspx
Apologies if this is a basic question but i am trying to learn Xaml / Wpf.
Thanks for your help in advance...
I found a good example of this under samples on Msdn:
The link:
http://code.msdn.microsoft.com/Customized-NavigationWindow-ced9d7af
I then used the default template as above and amended the xaml to the effect i wanted. Simple when you can find a sample. :-)

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

Silverlight - Highlight List<> of words/prhases within TextBox

I am new to Silverlight and have a requirement to highlight (or change font color) all words and phrases wtihin a TextBox that match a list of words/phrases. At first I though this would be easy, but the more I look into it, the more confused I get.
My goal is to write something reusable so I can also apply the logic to a RadGridView later. I've seen a few examples of stuff close to what I need, but it's beyond my Silverlight level at this point.
I want to write this myself to get a better understanding of how some of the Silverlight internals work. Can someone point me in the right direction of where to start on something like this? Should this be implemented in a control? Should I use a behavior? I'm using Silverlight 4.
Once I know where to start, I am sure I can get this done - with some help from you guys of course ;-)
Thanks,
-Scott
How about using the RadRichTextBox (I assume you have a licence for it as you mentionned the RadGridView)?
There's also a good sample project on Telerik forum that is doing exactly what you want to do.

Silverlight Spring Effect on TextBlock control

I'd like to create view that if the user clicks on a control, let's say a TextBlock, that the control would spring back and forth in place from where the user clicked.
By spring I mean push back and forth like if there were springs behind the TextBlock in each corner.
I've seen demos of this type of effect, and for the life of me, I can't come up with the name of the effect to help with searches, or find an example of this.
Maybe instead of a TextBlock it would help to image a picture that could be pressed down on, and as if springs were behind it and then would bounce back into place.
I think you are referring to the Gratuitous Graphics Demo that was on display at MIX09. Here is a link to the source code:
http://blogs.msdn.com/henryh/archive/2009/03/20/mix09-the-gratuitous-graphics-demo.aspx
I think you want to change the scale transformation matrix of the text using an animation that has both an ease in and ease out element - most probably a BounceEase or ElasticEase, but you'll need to experiment to see which works best for you.
You'll need to trigger it when you click on the control.
Take a look at this example for some pointers.

Resources