سلام بر تمامی برنامه نویسان عزیز 😉 در این مطلب کد ساخت دکمه در ToolBar و استفاده از LinearGradientBrush با wpf و #C را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
تصویر خروجی این کد:
کد ساخت دکمه در ToolBar و استفاده از LinearGradientBrush با wpf و #C :
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Top">
<ToolBarTray>
<ToolBar>
<Button>Second toolbar</Button>
<Button>
<Canvas Width="16" Height="16" >
<Polygon Stroke="Black" SnapsToDevicePixels="True" StrokeThickness="0.5" Points="1.5,14.5 4.5,7.5 15.5,7.5 12.5,14.5" >
<Polygon.Fill>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Stretch" VerticalAlignment="Top">
<ToolBarTray>
<ToolBar>
<Button>Second toolbar</Button>
<Button>
<Canvas Width="16" Height="16" >
<Polygon Stroke="Black" SnapsToDevicePixels="True" StrokeThickness="0.5" Points="1.5,14.5 4.5,7.5 15.5,7.5 12.5,14.5" >
<Polygon.Fill>