Articles → WPF → Viewbox Control In WPF

Viewbox Control In WPF






Purpose





Example




<Window x:Class="ViewboxDemo.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>
		<Viewbox Stretch="Uniform">
			<Button Content="Test" />
		</Viewbox>
	</Grid>
</Window>





Output


Picture showing the Viewbox control in WPF
Click to Enlarge



Picture showing the Viewbox control in WPF after resize
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, February 1, 2020

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250