2017-09-04 17 views
2

MetroCircleButtonのコンテンツの周りにバッジを配置しようとすると、マージンが大きすぎてそのボタンに属していないように見えます。MetroCircleButtonのMahAppsメトロバッジ

<Controls:Badged Width="45" 
      Grid.Row="0" 
      HorizontalAlignment="Right" 
      VerticalAlignment="Bottom" 
      BadgePlacementMode="BottomRight"        
      Margin="0,0,200,0" 
      Badge="3"> 

     <Button 
      x:Name="btnModificaciones" 
      Width="45" 
      Height="45"    
      BorderBrush="#FF060606" 
      Click="btnModificaciones_Click" 
      Cursor="Hand" 
      Style="{DynamicResource MetroCircleButtonStyle}"> 

       <iconPacks:PackIconFontAwesome 
        Width="20" 
        Height="20" 
        Foreground="#FF080808" 
        Kind="Wrench" /> 
     </Button> 

</Controls:Badged> 

badge in metrocirclebutton

+0

はmahappsを使用いけない、それはとても遅いです。モダイに切り替える – Kokombads

+1

mahappsにはもっと多くの選択肢があり、それは遅いとは思わない。 –

+0

ええと、私はプレースホルダーでテキストボックスが好きだが、私のプロジェクトでは遅かった。それは私のために働いた基本的な学校役員投票システム – Kokombads

答えて

1

あなたが近いButtonにバッジを移動するために、負のPaddingを使用することができます。

<Controls:Badged Width="45" 
      Grid.Row="0" 
      HorizontalAlignment="Right" 
      VerticalAlignment="Bottom" 
      BadgePlacementMode="BottomRight"        
      Margin="20" 
      Padding="0 0 -10 -10" 
      Badge="3"> 

    <Button 
      x:Name="btnModificaciones" 
      Width="45" 
      Height="45"    
      BorderBrush="#FF060606" 
      Cursor="Hand" 
      Style="{DynamicResource MetroCircleButtonStyle}"> 

     <iconPacks:PackIconFontAwesome 
        Width="20" 
        Height="20" 
        Foreground="#FF080808" 
        Kind="Wrench" /> 
    </Button> 

</Controls:Badged> 
+0

でした!ありがとう! –

関連する問題