Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating an Office 2010 sidebar like menu in WPF
    primarykey
    data
    text
    <p>I'm relatively new at WPF and I've finally started making my first application with navigation. However I'm stuck at one particular thing. I'd love to create a vertical menu like the one in the Office 2010 sidebar. Like this (nb, I'm not interested in a ribbon to go with that, just a simple menu):</p> <p><img src="https://i.stack.imgur.com/le6l1.png" alt="enter image description here"></p> <p>Which has a hover effect like this:</p> <p><img src="https://i.stack.imgur.com/d3OnZ.png" alt="enter image description here"></p> <p>I guess this is probably a walk in the park for those good at XAML, however I'm stuck, stuck as can be, I've tried googling, tried getting it in Blend and VS but I'm stuck.</p> <p>I don't need the triangle on the right, just a square "button" with a hover like the one seen above would make me a really happy camper. </p> <p>So, any hints and pointers as to what I should look for or read up on?</p> <p>What I have so far (however I'm not sure it's even right) is this:</p> <pre><code> &lt;Button Content="Choice One!" Margin="204,153,231,0" VerticalAlignment="Top" Background="{x:Null}" BorderBrush="{x:Null}"/&gt; &lt;Button Content="Choice One!" Margin="204,191,231,0" VerticalAlignment="Top"&gt; &lt;Button.BorderBrush&gt; &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt; &lt;LinearGradientBrush.RelativeTransform&gt; &lt;TransformGroup&gt; &lt;ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="1.09" ScaleX="1"/&gt; &lt;SkewTransform AngleY="0" AngleX="0" CenterY="0.5" CenterX="0.5"/&gt; &lt;RotateTransform Angle="-179.963" CenterY="0.5" CenterX="0.5"/&gt; &lt;TranslateTransform Y="0.045"/&gt; &lt;/TransformGroup&gt; &lt;/LinearGradientBrush.RelativeTransform&gt; &lt;GradientStop Color="Black" Offset="0"/&gt; &lt;GradientStop Color="White" Offset="1"/&gt; &lt;/LinearGradientBrush&gt; &lt;/Button.BorderBrush&gt; &lt;Button.Background&gt; &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt; &lt;GradientStop Color="#FFCACACA" Offset="0"/&gt; &lt;GradientStop Color="WhiteSmoke" Offset="1"/&gt; &lt;/LinearGradientBrush&gt; &lt;/Button.Background&gt; &lt;/Button&gt; </code></pre> <p>All help is appreciated. :)</p> <p>//JaggenSWE</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload