I am writing a simple program and I needed an animation. BUT I do not need animation inside the window (I can do this), I need to go outside the window .
- oneOut what? Controls can not be outside the window, so you have to change the shape of the window itself, or use something from Popup - Andrey NOP
- What would leave the grid. - Kirill Stepankov
- Well, as I wrote above - this is impossible, but you can imitate this behavior by making the window transparent and changing the visible part - Andrey NOP
|
1 answer
You cannot place controls outside the window, but you can simulate this behavior by making the window transparent (but you have to independently implement the buttons for closing / folding, resizing the window, dragging it, and generally the appearance):
<Window ... AllowsTransparency="True" WindowStyle="None" Background="Transparent"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid Background="LightGray"/> <Grid Grid.Column="1" Background="LightGray" VerticalAlignment="Center" Height="100" HorizontalAlignment="Left"> <Grid.Triggers> <EventTrigger RoutedEvent="Loaded"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Width" From="0" To="200" Duration="0:0:5"/> </Storyboard> </BeginStoryboard> </EventTrigger> </Grid.Triggers> </Grid> </Grid> </Window> - thanks a lot) - Kirill Stepankov
|
