Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

VisualBrush of an expander..

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-04-2007   #1 (permalink)
DickyDick
Guest


 

VisualBrush of an expander..

Problem:

When I create a visualbrush of (an initially) collapsed Expander (with no
explicit Height set) The "first" render of the visualbrush will render the
header only. After I expanded and collapsed the expander back. The
visualbrush renders the header AND the whitespace the Expander control took
when it was expanded. It "remembers" the height someway. Is there a way that
the visualbrush only renders the header again?

I prepared a little test xaml to show the problem. Just expand and collapse
the Expander. The rectangle will be different from the original one.



<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xml:lang="en-US"
x:Class="testvisualbrush.Window1"
x:Name="Window"
Title="Window"
Width="400" Height="200">


<Canvas>
<Expander Canvas.Top="0" Width="300" Name="exp" Background="#FFFF8B00">
<Expander.Header>Header</Expander.Header>
<Label>Content
</Label>
</Expander>
<Rectangle Canvas.Top="50" Stroke="#FF000000" Width="300" Height="100">

<Rectangle.Fill>
<VisualBrush><VisualBrush.Visual>
<Binding ElementName="exp" />
</VisualBrush.Visual></VisualBrush>
</Rectangle.Fill>
</Rectangle>
</Canvas>
</Window>


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
XAML Binding / Animated Expander gregbacchus@hotmail.com Avalon 1 03-14-2007 04:57 AM
DrawingBrush .. VisualBrush in UserControl Ariel Avalon 0 02-03-2007 12:13 PM
Expander control customisation feedfusion@gmail.com Avalon 2 11-06-2006 05:05 PM
BitmapEffect affected by use inside VisualBrush? =?Utf-8?B?QXZlcnkgWg==?= Avalon 1 07-26-2006 12:21 PM
which controls in VisualBrush.Visual alberto.ramacciotti@gmail.com Avalon 0 06-19-2006 10:34 AM


Update your Vista Drivers Update Your Vista Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008
Page generated in 0.24763 seconds with 10 queries