سلام بر تمامی برنامه نویسان سی شارپ 😉 در این پست کد استفاده از TabIndex برای چند دکمه پشت سرهم با wpf و سی شارپ #C را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
تصویر خروجی این کد:
کد استفاده از TabIndex برای چند دکمه پشت سرهم با wpf و سی شارپ #C :
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WPF" Height="200" Width="300">
<StackPanel>
<Button Content="Button _A (1st tab)" TabIndex="0" Margin="2" />
<Button Content="Button _B (4th tab)" TabIndex="3" Margin="2" />
<Button Content="Button _C (2nd tab)" TabIndex="1" Margin="2" />
<Button Content="Button _D (5th tab)" TabIndex="4" Margin="2" />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WPF" Height="200" Width="300">
<StackPanel>
<Button Content="Button _A (1st tab)" TabIndex="0" Margin="2" />
<Button Content="Button _B (4th tab)" TabIndex="3" Margin="2" />
<Button Content="Button _C (2nd tab)" TabIndex="1" Margin="2" />
<Button Content="Button _D (5th tab)" TabIndex="4" Margin="2" />