Skip to main content

All Questions

Tagged with
1 vote
1 answer
96 views

On button hover, textblock needs to display some text in c#

I have a button. On mouse hovering on the button, a textblock used in my project should display some value. Button is defined in the library and that library I am using in my project. In my project I ...
mili's user avatar
  • 27
0 votes
1 answer
76 views

Interaction Trigger with condition

Is it possible to Invoke a command action conditionally? Basically I have created a Custom control (DialogHeader) which I am going to use for all of my DialogWindow Headings. In some of the ...
Richard Gale's user avatar
  • 1,952
0 votes
2 answers
70 views

Trigger event when Combobox contains only one item

I need disable a combobox whenever it contains only 1 item. I spent a fair amount of time reading the documentation on the microsoft website, but I cannot see any trigger for this type of events. Is ...
Carlos M's user avatar
  • 230
-1 votes
1 answer
49 views

C# WPF Buttonproperties when mouse hovers or clicks it

I'm trying to make my button theme react to the mouse. So when I hover over the button it should be gray and when I click it, the button should change the color as well. If tried to write my own code ...
Biswind's user avatar
  • 25
0 votes
1 answer
415 views

Make element visible when Validation.HasError is true

I have the following xaml markup: <GroupBox Margin="10" Padding="20" Header="Case 5 - Custom Error Object"> <GroupBox.DataContext> ...
vso's user avatar
  • 21
0 votes
1 answer
733 views

WPF | MultiDataTrigger and Binding to the same property

I'm working on the next task. There are some class and enum: public enum Status { Running, Canceled, Failed, Completed } public class Result { public Status Status { get; set; } ...
5ORBEX's user avatar
  • 129
0 votes
1 answer
373 views

Trigger in code-behind updates border but not button

I have a style that is updated dynamically in my C# code. It applies to a few buttons and a border. This way I can change the theme of every item by simply setting the style background property. ...
Jake's user avatar
  • 1
0 votes
0 answers
57 views

ListViewItem Trigger messed up the ListView

I have already tried googling this problem, but just couldn't find a solution. So my problem is that when putting the trigger into the code, it just messes it up, or to be more exact, the data I ...
Daniela's user avatar
1 vote
1 answer
529 views

How to set a condition for the background color of a CheckBox in Mouse Over state?

I needed a CheckBox that acts as follows Unchecked - The default style is applies Checked - The background is blue and the check mark glyph is white I created a template like this: <Application....
just NF's user avatar
  • 33
1 vote
2 answers
922 views

Can you temporarily disable/override Control Template Triggers in WPF?

I'm setting the BorderBrush of a TextBox if I input invalid Text in it: if (!Regex.IsMatch(txtAddName.Text, @"[^A-Za-z0-9|()& ]")) { txtAddName.BorderBrush = regularBrush; } else { ...
Eddd's user avatar
  • 69
0 votes
1 answer
72 views

Skip storyboard cleanly in ControlTemplate

I have a Style for a ToggleButton which defines a ControlTemplate. My ToggleButton is animated when it changes states, but i don't want it to animate when i navigate to a new page. So, i added an ...
cboittin's user avatar
  • 391
0 votes
2 answers
2k views

Using WPF Triggers to Change Properties of Named Elements in UserControls

Suppose I have a Window or UserControl with a boatload of named elements. I want to change all these elements' property values based on a single property of either my view model or a custom DP on the ...
Emperor Eto's user avatar
  • 3,613
0 votes
2 answers
635 views

Button's trigger IsMouseOver stops working after button's background is set in code-behind

I want the background of a button to change when the cursor hovers over the button. I have managed to do this in a style which use the "IsMouseOver" trigger which sets the button's ...
Mc_Topaz's user avatar
  • 647
0 votes
1 answer
90 views

Accesing parent elements in WPF C#

I have a problem to reach a button which is not in the same grid as event trigger. In one grid we have a trigger: <Grid x:Name="BottomGrid" Margin="0, 30, 0, 0" > <...
Filip Čermák's user avatar
0 votes
2 answers
82 views

How to change Color Inside a Window.Resources C# WPfF

I want to change the color of items inside the Windows.Resources when click a Button. <Window.Resources> <DataTemplate x:Key="Listboxcmmt"> <Border> ...
user avatar

15 30 50 per page
1
2 3 4 5
21