Skip to content

Commit

Permalink
[Xwt.WPF] Make sure the label of a composite button has the right For…
Browse files Browse the repository at this point in the history
…egroundColor

If the ForegroundColor of the external button is changed by another mean,
we want anything that depends on it also following that update.
  • Loading branch information
garuma committed Jun 19, 2015
1 parent 78193f6 commit 0eb3b00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Xwt.WPF/Xwt.WPFBackend/ButtonBackend.cs
Expand Up @@ -34,6 +34,7 @@
using System.Text.RegularExpressions;
using SWC = System.Windows.Controls;
using Xwt.Backends;
using System.Windows.Data;


namespace Xwt.WPFBackend
Expand Down Expand Up @@ -120,6 +121,7 @@ public void SetContent (string label, bool useMnemonic, ImageDescription image,
labelCtrl.Content = accessText;
else
labelCtrl.Content = label;
labelCtrl.SetBinding (SWC.Label.ForegroundProperty, new Binding ("Foreground") { Source = Button });
grid.Children.Add (labelCtrl);
}
Button.Content = grid;
Expand Down

0 comments on commit 0eb3b00

Please sign in to comment.