<Window x:Class="RotateTransform.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
	<Grid>
		<StackPanel Orientation="Horizontal" Margin="157,12,156,69">
			<Button Height="95" Width="95">OK
			</Button>
			<!--RenderTransformOrigin="0.5,0.5"-->
			<Button Background="LightCoral"  Height="94"   Width="{Binding ElementName=slider2, Path=Value}" VerticalContentAlignment="Top">
				<!--napis wyświetlany w przycisku-->
				CenterX='37' CenterY='37'
				<Button.RenderTransform >
					<RotateTransform Angle="{Binding ElementName=slider1, Path=Value}" 
									 CenterX="37" CenterY="37"/>
				</Button.RenderTransform>
			</Button>
			<Button Height="95" Width="95">OK
			</Button>
		</StackPanel>
		<Slider Height="23" Name="slider1" Maximum="360" Margin="106,0,92,40" VerticalAlignment="Bottom" />
		<Slider Height="23" Margin="106,0,92,12" Name="slider2" VerticalAlignment="Bottom" Maximum="400" Minimum="0" />
	</Grid>
</Window>
