datatrigger Questions

6

Solved

Is there a way to create a conditional binding in XAML? Example: <Window x:Name="Me" DataContext="{Binding ElementName=Me}"> <TextBlock> <TextBlock.Text> <SelectBinding Bi...
Caricature asked 6/12, 2010 at 13:42

4

Solved

Here's the problem. create table customer ( customer_id int generated by default as identity (start with 100) primary key ); create table cart ( cart_id int generated by default as identity (star...
Eurus asked 13/1, 2023 at 3:13

2

Solved

iv'e got several itemscontrols which i need to attach an event handler for their PreviewMouseLeftButtonDown event only when a certain condition is met . iv'e designed a style for my controls with...
Grantley asked 12/3, 2012 at 20:1

4

I'm trying to check if a binding object value is null in Xamarin Forms XAML DataTrigger but I can't get it to work. I have tried the following: <StackLayout IsVisible="True"> <StackLayou...
Deuno asked 29/6, 2017 at 11:10

4

Solved

How can I provide multiple conditions for data trigger in WPF?
Wichman asked 25/5, 2009 at 8:51

3

It seems to me that there is a major difference between the Blend-style Triggers found in the Interactivity namespace, and the classic Triggers available via Styles, ControlTemplates, etc, in WPF (...
Redmon asked 6/3, 2013 at 21:13

2

In an application with multiple panels or documents to interact with, one needs a clear indication of which area of the app has focus. Visual Studio itself is a good example of this. The followin...
Corri asked 2/10, 2019 at 19:13

2

I encountered a situation where I can easily achieve the same functionality by using a MultiDataTrigger or, alternately, using a DataTrigger with a MultiBinding. Are there any substantive reasons t...
Clausius asked 8/1, 2014 at 10:44

5

Solved

Is there a way to do a comparison on object type for a trigger? <DataTrigger Binding="{Binding SelectedItem}" Value="SelectedItem's Type"> </DataTrigger> Background: I have a Toolbar...
Gail asked 30/10, 2009 at 21:9

2

Solved

I have created a custom WPF element extended from RowDefinition that should collapse rows in a grid when the Collapsed property of the element is set to True. It does it by using a converter and a...
Cottager asked 3/1, 2019 at 10:5

3

Solved

I am trying to update the color of textblock depending on it value. Seems simple however not working. Here's the textblock xaml. <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding P...
Venule asked 11/10, 2011 at 9:38

2

Solved

I have a Column 'Delivery Boy' in a data grid which is bind with a list in code behind. Values of DataGrid change dynamically. <DataTrigger Binding="{Binding Path=delivery_boy}" Value="Not ...
Shortwave asked 8/8, 2018 at 12:31

3

Solved

Why cant I code like this <Border Width="130" Height="70"> <Border.Triggers> <DataTrigger Binding="{Binding Path=CurrentStatus}" Value="0"> <Setter Property="Style" Value="...
Fant asked 26/8, 2010 at 14:37

4

Solved

Is there a way to define an animation somewhere in xaml (eg. as a resource) once and then reuse it multiple times? I have a lot of independent brushes across differnt datatemplates that independent...
Herwin asked 31/10, 2009 at 13:16

1

Solved

I'm attempting to use a data-trigger on a style to change a property. In compliance with the "Minimal, Complete and Verifiable Example" requirements... To reproduce, first create a WPF applicati...
Shoup asked 6/6, 2017 at 3:50

3

Solved

I have a label that I only make visible based on one of my ViewModel Properties. Here is the XAML: <Label HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalContentAlignment="Ce...
Gault asked 4/4, 2013 at 22:0

1

Solved

I would like to use a DataTrigger to modify the opacity of my button. <Button x:Name="StartTreatment" Grid.Column="3" Width="160" Height="30" Content="{x:Static resources:UserMessages.Trcs...
Pyrrho asked 8/2, 2017 at 19:55

1

Solved

I try to work with a concatenated text in the setter of a textblock. textblock looks like that: <TextBlock> <Run Text="{x:Static languages:visuTexts.Lenght}" /> <Run Text="A [LA]...
Ushas asked 2/2, 2017 at 10:30

1

Solved

I am VERY new to WPF AND C#, so there may be a much better way to accomplish what I am attempting. Therefore, I am open to other methods. As far as what I've got, I am trying to program a Digital...
Oliviaolivie asked 20/1, 2017 at 15:8

2

I have three Buttons (1.Male,2.Femal,3.OK),I want to change the CommandParameters Property of Button(OK) by Click Male Button or FeMale Button. I found the question Setting a property with an Event...
Higgledypiggledy asked 8/11, 2016 at 2:53

1

Solved

I have a Style for a Button. Depending on if the Button is enabled or not, I want to change the Background. This is what it looks like: <Style x:Key="MyButtonStyle" TargetType="Button"> &lt...
Latisha asked 15/9, 2016 at 10:35

12

Solved

I know that I can make a setter that checks to see if a value is NULL and do something. Example: <TextBlock> <TextBlock.Style> <Style> <Style.Triggers> <DataTrigger ...
Ibbie asked 10/12, 2008 at 14:19

1

Solved

I want to compare two dynamic values User_id and user_id for equality and setting one property Cursor. Also, when the cursor is hand, I have to execute one function. How to do it? This is the code ...
Turnedon asked 18/5, 2016 at 14:14

2

Solved

This code works (when ControlType="dropDown" then the background yellow): <Window x:Class="TestCollapsed.Views.MainView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmln...
Decoct asked 14/9, 2009 at 15:30

1

Solved

I'm having four int Property ProOne, ProTwo, ProThree and ProFour I have to Implement the Boolean Logic ((ProOne == ProTwo) || (ProThree == ProFour)) in the Multivalue Converter namely VisibilityC...
Dissent asked 8/2, 2016 at 9:53

© 2022 - 2024 — McMap. All rights reserved.