MacまたはObjectBarでDockBarを模倣しようとしています。このプロセスでは、WPFカスタムコントロールを学び、私とコミュニティのために使用可能なコントロールを作成したいと考えています。これまでのところ、私はこのWPFのMacスタイルのDockBar機能
<Window x:Class="WPFMacStyleTBar.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="356" Width="577">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" x:Name="btnHome" Background="Transparent" BorderBrush="Transparent" Margin="0,0,47,0" Foreground="Transparent">
<Button.Content>
<Image Source="C:\Vikram\Projects\WPFMacStyleTBar\WPFMacStyleTBar\Images\Home.png"></Image>
</Button.Content>
</Button>
<Button Grid.Column="2" x:Name="btnGlobe" Background="Transparent" BorderBrush="Transparent" Margin="0,0,47,0" Foreground="Transparent">
<Button.Content>
<Image Source="C:\Vikram\Projects\WPFMacStyleTBar\WPFMacStyleTBar\Images\Globe.png"></Image>
</Button.Content>
</Button>
<Button Grid.Column="3" x:Name="btnNotes" Background="Transparent" BorderBrush="Transparent" Margin="0,0,49,0" Foreground="Transparent">
<Button.Content>
<Image Source="C:\Vikram\Projects\WPFMacStyleTBar\WPFMacStyleTBar\Images\Notes.png"></Image>
</Button.Content>
</Button>
</Grid>
</Grid>
を持っているそれは少し初歩的だが、私は初心者のために、これは問題ないはずと感じました。私が直面している問題は、背景と境界線を透明に設定した後でさえ、ボタンの境界線がまだ現れることです。その上に私は画像の部分に切り取るためにボタン領域にしたい。私はこれがどのようにできるかについての助けに感謝します。私はhere
可能であれば、ラップパネルを確認してスクリーンショットを投稿します。与えられたXAMLをコピーするだけで、私が何を意味しているのかがわかるはずです。 – vikramjb
このために独自のスタイルやControlTemplateを作成する必要があります。http://msdn.microsoft.com/en-us/library/ms745683.aspx起動します;) – Machinarius
コントロールテンプレートは間違いなく正しい方向に向かいます。リンクありがとう、ありがとう:) – vikramjb