سلام بر تمامی برنامه نویسان #C 😉 در این پست کد قرار دادن Canvas تودرتو در TabItem با wpf و c#.net را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
تصویر خروجی این کد:
کد قرار دادن Canvas تودرتو در TabItem با wpf و c#.net :
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowTitle="Canvas Sample">
<StackPanel>
<TabControl MinHeight="500" MinWidth="400">
<TabItem Header="Canvas" IsSelected="True">
<Canvas Height="400" Width="400">
<Canvas Height="100" Width="100" Top="0" Left="0">
<Rectangle Width="100" Height="100" Fill="red"/>
</Canvas>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowTitle="Canvas Sample">
<StackPanel>
<TabControl MinHeight="500" MinWidth="400">
<TabItem Header="Canvas" IsSelected="True">
<Canvas Height="400" Width="400">
<Canvas Height="100" Width="100" Top="0" Left="0">
<Rectangle Width="100" Height="100" Fill="red"/>
</Canvas>