FAQ Database Discussion Community

Lost Gray On IsEnabled False

Once I set the TextBlock Foreground Property then I lost the gray on IsEnable=False on buttons and also lost the gray on ToolTip. How can I set a the style for TextBlock foreground and not effect the IsEnable=False and ToolTip? <Style TargetType="TextBlock"> <Setter Property="FontFamily" Value="Segoe UI Semilight" /> <Setter Property="FontSize"...

Bring a UI Element to foreground

I would like to implement simple drag and drop with: public void OnDrag (PointerEventData eventData) { transform.position = eventData.position; } The problem is that when i begin the drag, I want to bring the UI Element to the foreground. by doing something like this: public void OnBeginDrag (PointerEventData eventData) {...

WPF C# Set “ContentPresenter.Foreground” by code

I could only find xaml specifiy solutions to this problem using TextElement.Foreground="...". But I'd like to set the Foreground of a ContentPresenter in C#. Can you tell me how that works? Thank you very much!